|
-
May 7th, 1999, 08:18 PM
#1
Anyone tell me how a CComboBox can capture a WM_CHAR ?
I derived MyComboBx from CComboBox and added a message map entry to catch a WM_CHAR, the resulting function never gets called . . . (?) Appreciate any input from you experts. Thanks! JD
-
May 7th, 1999, 09:31 PM
#2
Re: Anyone tell me how a CComboBox can capture a WM_CHAR ?
Create a variable for tracking when the combo box has focus. Let's call it m_bFocus.
Map messages for CBN_SETFOCUS and CBN_KILLFOCUS. In the SetFocus handler, set m_bFocus to true; in the KillFocus handler, set m_bFocus to false.
Map PreTranslateMessage and in that function, place code like the following:
if(pMsg->message == WM_CHAR && m_bFocus)
{
// do soemthing now that you have the char
}
-
May 8th, 1999, 08:44 AM
#3
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|