| | | | Browse by category |
Article ID: 384
Last updated: 27 Apr, 2018
Problem
How can I handle combo box notifications in a CGXComboBoxWnd derived class?
Cause
Action
This can be done by overriding the OnCommand( ) method.
Example:
BOOL CMyComboBoxWnd::OnCommand(WPARAM wParam, LPARAM lParam) { #if _MFC_VER <0x0300 |
||||
UINT nNotification = HIWORD(lParam); HWND hCtl = (HWND) LOWORD(lParam); |
||||
#else | ||||
UINT nNotification = HIWORD(wParam); HWND hCtl = (HWND) lParam; |
||||
#endif | ||||
if (hCtl == m_hWnd) // is it really this wnd? { |
||||
if (nNotification == CBN_SELCHANGE) { |
||||
TRACE("Dropdown list changed "); | ||||
} | ||||
}
return CGXComboBoxWnd::OnCommand(wParam, lParam); |
||||
} |
This article was:
Helpful |
Not helpful
Report an issue
Article ID: 384
Last updated: 27 Apr, 2018
Revision: 3
Views: 1827
Posted: 10 Jan, 2001 by
Meltreger B.
Updated: 27 Apr, 2018 by
Meltreger B.
Others in this category
Powered by KBPublisher (Knowledge base software)