Chapter 16: Text-Based Controls Visual C++ and MFC Fundamentals
16.1 Labels............................................................................................................
16.1.1..Overview...............................................................................................
A label is a static control that serves as a guide to the user. It displays text that the user
cannot change but can read to get information about a message from the programmer or
an indication about another control on the dialog box or form. Most controls on the form
or dialog box are not explicit at first glance and the user would not know what they are
used for. Therefore, you can assign a label to the control as a help to the user.
Practical Learning: Creating a Label-Based Application
- Start a new MFC Application named Clarksville Ice Scream1
- Set the Application Type to Single Document
- Remove the check mark of Printing and Print Preview
- Remove the Minimize Box and the Maximize Box
- Change the view Class Name to CExerciseView
- Change its header file to Exercise.h and its source file to Exercise.cpp
- Set the Base Class to CFormView