方法一
WINDOWPLACEMENT ws;
ws.length = sizeof(WINDOWPLACEMENT);
GetWindowPlacement(Handle, &ws);
switch (ws.showCmd)
{
case 1://正常;
case 2://最小化;
case 3://最大化;
}
方法二
判断最小化:
IsIconic()
The IsIconic function determines whether the specified window is minimized (iconic).
BOOL IsIconic(
HWND hWnd // handle of window
);
Parameters
hWnd
Identifies the window.
Return Values
If the window is iconic, the return value is nonzero.
If the window is not iconic, the return value is zero.
判断最大化
IsZoomed()
The IsZoomed function determines whether a window is maximized.
BOOL IsZoomed(
HWND hWnd // handle of window
);
Parameters
hWnd
Identifies the window.
Return Values
If the window is zoomed, the return value is nonzero.
If the window is not zoomed, the return value is zero.
本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/zblue78/archive/2008/12/02/3428025.aspx