I want to capture the shift+tab event when my combo got focus, it is ok when I set the combobox DROPDOWNLIST, but when the combobox set to DROPDOWN, I can not capture the event if the focus is hold by the combobox, code like this:
BOOL CMyDlg:reTranslateMessage(MSG* pMsg)
{
if( pMsg->message == WM_KEYDOWN )
{
if( (pMsg->hwnd == GetDlgItem(IDC_COMBO_FIND)->m_hWnd)
{
AfxMessageBox("IDC_COMBO_FIND-mhWnd");
return TRUE;
}
else if(GetFocus()==GetDlgItem(IDC_COMBO_FIND) )
{
AfxMessageBox("IDC_COMBO_FIND-getfocus");
}
else if(pMsg->hwnd == GetDlgItem(IDC_COMBO_FIND)->GetSafeHwnd())
{
AfxMessageBox("IDC_COMBO_FIND-GetSafeHwnd");
}
else
{
//AfxMessageBox("not hit");
}
}
return CDialog:reTranslateMessage(pMsg);
}
BOOL CMyDlg:reTranslateMessage(MSG* pMsg)
{
if( pMsg->message == WM_KEYDOWN )
{
if( (pMsg->hwnd == GetDlgItem(IDC_COMBO_FIND)->m_hWnd)
{
AfxMessageBox("IDC_COMBO_FIND-mhWnd");
return TRUE;
}
else if(GetFocus()==GetDlgItem(IDC_COMBO_FIND) )
{
AfxMessageBox("IDC_COMBO_FIND-getfocus");
}
else if(pMsg->hwnd == GetDlgItem(IDC_COMBO_FIND)->GetSafeHwnd())
{
AfxMessageBox("IDC_COMBO_FIND-GetSafeHwnd");
}
else
{
//AfxMessageBox("not hit");
}
}
return CDialog:reTranslateMessage(pMsg);
}