请各路神仙帮我解读一下代码:
BOOL CSplashWnd::PreTranslateAppMessage(MSG* pMsg)
{
if (c_pSplashWnd == NULL)
return FALSE;
// If we get a keyboard or mouse message, hide the splash screen.
if (pMsg->message == WM_KEYDOWN ||
pMsg->message == WM_SYSKEYDOWN ||
pMsg->message == WM_LBUTTONDOWN ||
pMsg->message == WM_RBUTTONDOWN ||
pMsg->message == WM_MBUTTONDOWN ||
pMsg->message == WM_NCLBUTTONDOWN ||
pMsg->message == WM_NCRBUTTONDOWN ||
pMsg->message == WM_NCMBUTTONDOWN)
{
c_pSplashWnd->HideSplashScreen();
return TRUE; // message handled here
}
return FALSE; // message not handled
}
现在的主要问题是类MSG的指针指向的对象message要求响应的消息事件不清楚。
例如:
pMsg->message == WM_KEYDOWN ||
键盘按下事件
pMsg->message == WM_LBUTTONDOWN ||
鼠标左键按下事件
pMsg->message == WM_RBUTTONDOWN ||
鼠标右键按下事件