void CMainFrame::OnSysCommand(UINT nID, LPARAM lParam)
{
switch(nID & 0xFFF0)
{
case SC_MOVE:
return;
case SC_RESTORE:
if(!IsIconic())return;
break;
}
CFrameWnd::OnSysCommand(nID, lParam);
}
截取WM_SYSCOMMAND消息。
该消息参数为:
uCmdType = wParam; // type of system command requested
xPos = LOWORD(lParam); // horizontal postion, in screen coordinates
yPos = HIWORD(lParam); // vertical postion, in screen coordinates
其 中 uCmdType表 示 用 户 的 选 择 :
SC_CLOSE Closes the window.
SC_CONTEXTHELP Changes the cursor to a question mark with a pointer.
{
switch(nID & 0xFFF0)
{
case SC_MOVE:
return;
case SC_RESTORE:
if(!IsIconic())return;
break;
}
CFrameWnd::OnSysCommand(nID, lParam);
}
截取WM_SYSCOMMAND消息。
该消息参数为:
uCmdType = wParam; // type of system command requested
xPos = LOWORD(lParam); // horizontal postion, in screen coordinates
yPos = HIWORD(lParam); // vertical postion, in screen coordinates
其 中 uCmdType表 示 用 户 的 选 择 :
SC_CLOSE Closes the window.
SC_CONTEXTHELP Changes the cursor to a question mark with a pointer.