15,980
社区成员




BOOL CDlgPanel::OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo)
{
if (CDialog::OnCmdMsg(nID, nCode, pExtra, pHandlerInfo))
return TRUE;
CWnd* pParent = GetParent();
if (pParent != NULL)
{
return pParent->OnCmdMsg(nID, nCode, pExtra, pHandlerInfo);
}
return FALSE;
}
PostMessage(GetParent(HWND_BUTTON), WM_COMMAND, MAKEWPARAM(nID, BN_CLICKED), (LPARAM)HWND_BUTTON);
BOOL MyPanel::PreTranslateMessage(MSG* pMsg)
{
// TODO: Add your specialized code here and/or call the base class
CWnd *pcwnd = this->GetParent();
pcwnd->PostMessage(WM_MY_MESSAGE_PANEL_MESSAGE, pMsg->message, pMsg->lParam);
return MyImage::PreTranslateMessage(pMsg);
}