BOOL IsIconic( ) const; Specifies whether CWnd is minimized (iconic).
OnSize ( UINT nType, int cx, int cy ); 判断nType nType Specifies the type of resizing requested. This parameter can be one of the following values: SIZE_MAXIMIZED Window has been maximized. SIZE_MINIMIZED Window has been minimized. SIZE_RESTORED Window has been resized, but neither SIZE_MINIMIZED nor SIZE_MAXIMIZED applies. SIZE_MAXHIDE Message is sent to all pop-up windows when some other window is maximized. SIZE_MAXSHOW Message is sent to all pop-up windows when some other window has been restored to its former size.
Specifies whether CWnd is minimized (iconic).
UINT nType,
int cx,
int cy );
判断nType
nType
Specifies the type of resizing requested. This parameter can be one of the following values:
SIZE_MAXIMIZED Window has been maximized.
SIZE_MINIMIZED Window has been minimized.
SIZE_RESTORED Window has been resized, but neither SIZE_MINIMIZED nor SIZE_MAXIMIZED applies.
SIZE_MAXHIDE Message is sent to all pop-up windows when some other window is maximized.
SIZE_MAXSHOW Message is sent to all pop-up windows when some other window has been restored to its former size.
void CMainFrame::OnSysCommand(UINT nID, LPARAM lParam)
{
if (nID == SC_MINIMIZE)
{
// Do something
}
else
CFrameWnd::OnSysCommand(nID, lParam);
}
就行了。