Windows "Snap" feature

Couldn’t find much in the API or forums regarding Windows snap feature for applications. I am referring to the windows feature where an application will fill a certain region of the monitor and snap to that size.
Do other peoples stand-alone applications do this automatically? It seems like the type of thing JUCE would have some sort of interface for but it may be that I need to interact with the Windows API directly.

This isn’t an app feature, it’s an OS one - so yeah, it’s automatically handled if the Windows version supports it. If you hold the Windows key and press an arrow key with any app (that doesn’t override the shortcut) it will “snap.”

That’s what I thought but for some reason my application doesn’t do it not sure if I have mistakenly disabled it by setting re-size limits. There are no key bindings so I don’t think I have overwritten the shortcut…hmm

IIRC the Windows snap feature works “automatically” if you use a native titlebar. Not sure if this is the best route to achieve what you want, though.

If this is a workable solution, this thread has some solutions for how to modify the standalone plugin window.


Thank you will check it out!

Is anyone aware if its possible to get this working without the native titlebar? is it a case of rolling your own solution and handling the same key presses?

This is exactly what I’m trying to achieve. I’m sure it’s possible but may involve implementing your own document window class or interacting with the windows API. Working on something else at the moment and this is a relatively low priority so not sure when I will get to circle back but will update this thread when I do…Let me know if you find a good solution!