在OnCmdMsg之前調用ReflectLastMsg完成消息反射,
ReflectLastMsg->SendChildNotifyLastMsg(PS:此時使用CWnd對象調用的)->OnChildNotify->ReflectChildNotify
ReflectChildNotify中調用
case WM_COMMAND:
{
// reflect the message through the message map as OCM_COMMAND
int nCode = HIWORD(wParam);
if (CWnd::OnCmdMsg(0, MAKELONG(nCode, WM_REFLECT_BASE+WM_COMMAND), NULL, NULL))
{
if (pResult != NULL)
*pResult = 1;
return TRUE;
}
}
其中nCode是一個標識,0是單擊,1是雙擊,2是setfocus
對於wm_notify消息來說是一樣的路線,完畢···