Graphics Reference
In-Depth Information
BOOL CTutorialDlg::OnInitDialog() {
.
ReplaceDialogControl( * this , IDC _ PLACEHOLDER, m _ circle _ controls, IDD _ CONTROLS _ CHILDDLG);
// this -- is the main application window
// IDC _ PLACEHOLDER -- defines the region for the circle control
// m _ circle _ controls -- control variable for the circle control
// textbfIDD _ CONTROLS _ CHILDDLG -- GUI ID of the circle radius control window
.
Source file.
TutorialDlg.cpp file in
the Source file folder of the
MFC _ GroupControls project.
Listing 2.14. CTutorialDlg::OnInitDialog() (Tutorial 2.8).
3. Reuse. We can instantiate multiple copies of the newly defined interaction
object. For example, suppose I have an application with two circles and
would like to have a separate radius control for each circle. In this case,
we can instantiate two CircleRadiusControls objects to accomplish the
task. In addition, it is straightforward to reuse the CircleRadiusControls
in another application.
Search WWH ::




Custom Search