Visual C++ and MFC Programming 2nd Edition

(Martin Jones) #1

Chapter 16: Text-Based Controls Visual C++ and MFC Fundamentals



  1. Test the application

  2. Close the application and return to MSVC


16.2.4..Edit Control Messages........................................................................


To manage its role on a form or dialog box, an edit control is equipped with some
messages known as notifications. These notifications messages are:

ON_EN_SETFOCUS: The event name for this notification is called OnSetFocus. It is
sent when an edit box receives focus. This happens when the user clicks the edit box or
after previously pressing Tab, to give focus to the control:

BEGIN_MESSAGE_MAP(CDialog3aDlg, CDialog)
//{{AFX_MSG_MAP(CDialog3aDlg)
ON_WM_SYSCOMMAND()
ON_WM_PAINT()
Free download pdf