Disable snap-to-fit in Windows 7


#1

Is there a way to disable the Windows 7 auto window resizing for my Juce application, which happens when the user drags the DocumentWindow to the screen boundaries? Couldn’t find anything in DocumentWindow/ ResizableWindow.

Cheers,
Luke


#2

I have no idea, I don’t know what API calls are available. It wouldn’t be a cross-platform option anyway, so wouldn’t belong in a class like DocumentWindow. If there is a way to disable it, you’re probably better off just getting the HWND and calling it yourself.


#3

After a bit of digging around it seems that there isn’t a clean and tidy solution for this, however the sequence of control messages is different: WM_MOVE is sent when the window is dragged around the screen, followed by a WM_SIZE message when the snap kicks in on mouse up. Resizing the borders is just a stream of interleaved WM_MOVE/WM_SIZE messages.

Implementation details to follow… just not now (yawn).

Luke