- Add a
member Variable.
- On
the View menu, click ClassWizard.
The
MFC ClassWizard
dialog box appears, click
the Member Variables
tab.
Note:
This tab, contains a list
box displaying the
mapping between controls
and member variables.
- In
the Class name box,
select the class CTestVC0Dlg.
- Select
the name of the Control
ID you want to
add a variable - IDC_
TAB1.
- Click
Add Variable, the
Add Member Variable
dialog box appears.
- In
the Member variable
name text box, type
the name of the variable
- m_tab1.
- In
the Category drop-down
list, select the
appropriate type of
variable - Control.
- In
the Variable type drop-down
list, select the
appropriate class that
defines the
variable's data type - CTabCtrl.
- Click
OK.
Note:
The member name and type
you specified now appear
in the Control IDs
list.
|
- ClassWizard makes
changes to TestVC0Dlg.h
and TestVC0Dlg.cpp files
after you’ve mapped
the control - IDC_TAB1 to member variable.
Examine these changes, click
here.
- Initialize
the Tab control
- IDC_TAB1.
To set the number of the tab pages and
specify the tab labels.
Note:
The Tab control consists of two tab
pages, the 1st tab label is 'By
Word' and the 2nd tab
label is 'By address'.
This operation makes changes to TestVC0Dlg.cpp
file. Examine these changes, click
here.
- Save this
application.
Run it, from Build
menu, choose and click Execute
TestVC0.exe.
|