tags:

views:

620

answers:

3

When I try to move my window(with a mouse) above my screen so that the title bar would be hidden windows will move it back. And If I try to rezise the window larger then the screen space, windows will resize it back to "fit" the screen resolution. It seems that windows is sending a wm_move message if it does not like the size or position. Is there a way to prevent this?

It seems that I can call setwindowpos and place the window where ever I would like with what ever size I would like.

+1  A: 

What OS? XP, Vista?

In XP it seems like you can move the title bar 90% off the screen with the mouse. You can also try right clicking on the title bar and selecting move. Then move your mouse to the bottom of the screen and out of the way and use the Up arrows on the keyboard to move it out. Not really that convenient though.

Edit: on second though the Move method with the arrows doesn't work because once you hit enter it resets it.

Maybe try out the program grid move. I know you can create a custom layout, but I'm not sure you can make it outside the screen.

MaxGeek
A: 

If you're trying to hide the Title bar (called the non-client area) then you should be able to catch NC_PAINT messages and prevent them being processed...there are a bunch of NC_ message that control the display of the non-client area of a window.

Michael Prewecki
+1  A: 

In Win32 land, you would handle WM_MOVING, WM_SIZING, and WM_WINDOWPOSCHANGING and turn them into a no-op. You would also probably want to handle WM_ENTERSIZEMOVE and WM_EXITSIZEMOVE.

It's actually quite annoying unless you are writing the app for yourself.

MSN