Your question, your audience. Choose who sees your identity—and your question—with question security.
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
From novice to tech pro — start learning today.
U can create Ur class, for example CMyComboBox : public CComboBox,
And override methods OnSelchange, OnDropdown ..., by following way:
void CMyComboBox::OnSelchange()
{
//wParam contain action code (for example OnSelchange = 0, OnDropdown = 1, etc)
//lParam contain pointer to CMyComboBox
GetParent()->SendMessage(W
}
void CMyComboBox::OnDropdown()
{
//wParam contain action code (for example OnSelchange = 0, OnDropdown = 1, etc)
//lParam contain pointer to CMyComboBox
GetParent()->SendMessage(W
}
//...
....And in Ur dialog class add:
BEGIN_MESSAGE_MAP(CMyCombo
//...
ON_MESSAGE(WM_USER+0x100, OnCBChange)
END_MESSAGE_MAP()
//...
void CMyDlg::OnCBChange(WPARAM wParam, LPARAM lParam) {
//Get pointer to ComboBox witch send this messge
CMyComboBox *cb = (CMyComboBox *)(DWORD)lParam;
//Get Action code
int nActionCode = wParam;
//cb - pointer to combobox
swich (nActionCode) {
case 0: //Handle OnSelchange for "cb"
break;
case 1: //Handle OnDropdown for "cb"
break;
}
}
....and in *Dlg*.h file add:
//{{AFX_MSG(CCallRoutingMa
//...
afx_msg void OnCBChange(WPARAM wParam, LPARAM lParam);
//}}AFX_MSG
Hope that helps,
mahno