In my C# .NET 4 application, I use WndProc
to process some messages mostly dealing with resizing the application to and from full screen.
Right now I am just handling SC_MAXIMIZE
and WM_NCLBUTTONDBLCLK
to determine if the window is being resized to or from a maximized state (I know I don't need WndProc to handle SC_MAXIMIZE
, but Form_Resize
didn't seem to fire for a WM_NCLBUTTONDBLCLK
message when I double-click on the application's title bar.
Now I noticed that if I Aero Snap the window to the top of the screen to maximize it, neither of the above messages are posted so certain logic is not applied when the window is maximized via Aero Snap. I only want to handle the message if the window is snapped to the top of the screen rather than the right or left, or if a window is unsnappped from maximized position.
I couldn't find any of the window messages related to Aero Snap. Does anyone know of any references for those messages?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…