Graphics Reference
In-Depth Information
class
CCircleRadiusControls :
public
CDialog {
A1:
virtual BOOL
OnInitDialog();
B1:
CSliderCtrlWithEcho m
_
CircleRadiusBar;
// control variable for the slider bar
BOOL
m
_
bSliderControl;
// control variable for the check box
C1:
afx
_
msg void
OnBnClickedControlRadiusCheck();
// service routine for the check box
.
};
.
// for the ease of reading, some code is removed (e.g. constructor, etc.)
void
CCircleRadiusControls::DoDataExchange(CDataExchange
*
pDX) {
B2:
DDX
_
Control(pDX, IDC
_
RADIUS
_
SLIDER
_
BAR, m
_
CircleRadiusBar);
DDX
_
Check(pDX, IDC
_
CONTROL
_
RADIUS
_
CHECK, m
_
bSliderControl);
.
BEGIN
_
MESSAGE
_
MAP(CCircleRadiusControls, CDialog)
C2:
ON
_
BN
_
CLICKED(IDC
_
CONTROL
_
RADIUS
_
CHECK, OnBnClickedControlRadiusCheck)
.
A2:
BOOL
CCircleRadiusControls::OnInitDialog() {
Source file.
CircleRadiusControls.h/
.cpp
file in the
Controls
folder
of the
MFC
_
GroupControls
project.
B3:
m
_
CircleRadiusBar.Initialize(0.0f, 100.0f, 10.0f);
.
C3:
void
CCircleRadiusControls::OnBnClickedControlRadiusCheck()
.
Listing 2.11.
The
CCircleRadiusControls
class (Tutorial 2.8).
class
CTutorialDlg :
public
CDialog {
Source file.
TutorialDlg.h
file in the
Header
file folder of the
MFC
_
GroupControls
project.
.
CCircleRadiusControls m
_
circle
_
controls;
.
};
Listing 2.12.
CTutorialDlg
class (Tutorial 2.8).
Search WWH ::
Custom Search