PRB: Rich Edit Control Message Handlers Are Not Called (181664)
The information in this article applies to:
- Microsoft Visual C++, 32-bit Enterprise Edition 5.0
- Microsoft Visual C++, 32-bit Enterprise Edition 6.0
- Microsoft Visual C++, 32-bit Professional Edition 5.0
- Microsoft Visual C++, 32-bit Professional Edition 6.0
- Microsoft Visual C++, 32-bit Learning Edition 6.0
This article was previously published under Q181664 SYMPTOMS
There is a problem with the message-map entries that ClassWizard creates to
handle the following Rich Edit control messages: EN_SETFOCUS, EN_KILLFOCUS.
The message-map entry created by ClassWizard does not call the handler for
these messages.
CAUSE
The wrong message map entries are added.
RESOLUTION
Replace the message-map entries generated for EN_SETFOCUS and EN_KILLFOCUS
with
the following entries:
ON_EN_SETFOCUS(IDC_RICHEDIT1, OnSetfocusRichedit1)
ON_EN_KILLFOCUS(IDC_RICHEDIT1, OnKillfocusRichedit1)
Note: You need to alter IDC_RICHEDIT1 to match the ID of your control.
You will also need to change the prototypes for the message handlers
generated by the wizard to:
afx_msg void OnSetfocusRichedit1();
afx_msg void OnKillfocusRichedit1();
STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed
at the beginning of this article.
REFERENCES
For additional information, please see the following articles in the
Microsoft Knowledge Base:
166132
PRB: Dialog With RichEdit May Fail During Creation
165744
BUG: RichEditCtrl IDs Not Shown in Member Variables Tab
Modification Type: | Major | Last Reviewed: | 12/8/2003 |
---|
Keywords: | kbbug kbCtrl kbpending kbprb kbwizard KB181664 |
---|
|