Well I tried what you were doing and it worked fine, all the keys presses
resulted in OnChar getting called.
And to catch the Enter key I overwrote PreTranslateMessage.
BOOL CMyEdit::PreTranslateMessage(MSG* pMsg)
{
if (pMsg->message == WM_KEYDOWN || pMsg->message == WM_KEYUP)
{
if (pMsg->wParam == VK_RETURN)
{
//the enter key was pressed
}
}
return CEdit::PreTranslateMessage(pMsg);
}
AliR.
Thanks for your fast reply. Here is the line that creates the
combobox:
m_wndAddress.Create(CBS_DROPDOWN | WS_CHILD, CRect(0, 0, 200, 120),
this, AFX_IDW_TOOLBAR + 1)
And here is the line that adds it to the toolbar:
m_wndReBar.AddBar(&m_wndAddress, str, NULL, RBBS_FIXEDBMP |
RBBS_BREAK);
Both of these are in the OnCreate of my main CFrameWnd frame.
And yes, the subclasswindow call is hit and it returns "1". According
to the docs, a nonzero return is a success.
Thanks Again.
Jeff- Hide quoted text -
- Show quoted text -
Well that is frustrating. I am not sure what could be causing those
messages to get buried. If I watch with Spy++ I see the keydown and
raised anywhere else and they are not hitting my handlers.