本文整理汇总了C++中CDialog::OnNotify方法的典型用法代码示例。如果您正苦于以下问题:C++ CDialog::OnNotify方法的具体用法?C++ CDialog::OnNotify怎么用?C++ CDialog::OnNotify使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CDialog
的用法示例。
在下文中一共展示了CDialog::OnNotify方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DialogProc
INT_PTR WINAPI CDialog::DialogProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
if(msg == WM_INITDIALOG)
{
return TRUE;
}
CDialog* pThis = static_cast<CDialog*>(GetClassPtr(hWnd));
if(pThis == NULL)
{
return FALSE;
}
switch(msg)
{
case WM_CLOSE:
if(!pThis->OnClose()) return FALSE;
break;
case WM_CTLCOLORSTATIC:
return pThis->OnCtlColorStatic((HDC)wParam, (HWND)lParam);
break;
case WM_SIZE:
if(!pThis->OnSize(static_cast<unsigned int>(wParam), LOWORD(lParam), HIWORD(lParam))) return FALSE;
break;
case WM_TIMER:
if(!pThis->OnTimer(wParam)) return FALSE;
break;
case WM_COMMAND:
if(!pThis->OnCommand(LOWORD(wParam), HIWORD(wParam), (HWND)lParam)) return FALSE;
break;
case WM_SYSCOMMAND:
if(!pThis->OnSysCommand(static_cast<unsigned int>(wParam), lParam)) return FALSE;
break;
case WM_NOTIFY:
return pThis->OnNotify(wParam, reinterpret_cast<NMHDR*>(lParam));
break;
case WM_NCDESTROY:
pThis->m_hWnd = NULL;
return FALSE;
break;
}
if(!pThis->OnWndProc(msg, wParam, lParam)) return FALSE;
return FALSE;
}