Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Window Info ? No MFC

Status
Not open for further replies.

lGOOODl

Programmer
Dec 4, 2001
31
DK
Hi,

I have a little problem, I want to detect when my window is maxsized or minisized ? I just simply cant find a way to handle that. It would help my alot, if some of could come whit a good solution !!!

Thanks
-=<GOOOD>=-
 
Could you catch and monitor the WM_SHOWWINDOW message (at least to detect the minimized or visible states)?

The WM_SHOWWINDOW message is sent to a window when the window is about to be hidden or shown.

wParam - Specifies whether a window is being shown. If wParam is TRUE, the window is being shown. If wParam is FALSE, the window is being hidden.

lParam - Specifies the status of the window being shown. If lParam is zero, the message was sent because of a call to the ShowWindow function; otherwise, lParam is one of the following values:

SW_OTHERUNZOOM The window is being uncovered because a maximize window was restored or minimized.
SW_OTHERZOOM The window is being covered by another window that has been maximized.
SW_PARENTCLOSING The window's owner window is being minimized.
SW_PARENTOPENING The window's owner window is being restored
 
Call a couple api functions to determine the state of your window ->

BOOL IsZoomed( HWND hWnd ); //Returns true if window is
//Maximized.

BOOL IsIconic( HWND hWnd ); //Returns true if window is
//Minimized. Mike L.G.
mlg400@blazemail.com
 
Thanks To all of you, this is a great help! Now I can continue whit my program :)

-=<GOOOD>=-
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top