The information in this article applies to:
SUMMARYUsing the Microsoft Foundation Classes (MFC), if an application derives an edit control of the CEdit class, it can capture messages for that control, process the messages, and then pass them to the Default member function for default processing, if desired. MORE INFORMATION
One of the messages a control receives is the WM_CHAR message, which is
processed by the OnChar member function. By default, OnChar calls the
Default member function. NOTE: This code attempts to change every "A" or "a" character into an
"X" character by changing the wChar value before calling the base class
CEdit::OnChar function. However, CEdit::OnChar calls the Default member
function inherited from CWnd. Default uses the original wParam sent to the
edit control with the WM_CHAR message and not the wChar value passed to the
CEdit::OnChar member function.To perform this type of processing, the application must directly call the DefWindowProc member function. The following code demonstrates this technique:
Additional query words:
Keywords : kbCtrl kbKeyIn kbMFC KbUIDesign kbVC100 kbVC150 kbVC200 kbVC400 kbVC500 kbVC600 kbGrpMFCATL kbArchitecture |
Last Reviewed: November 25, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |