Graphics Reference
In-Depth Information
GUI Element: Application Window
GUI ID: IDD_ECHOBUTTONEVENT_DIALOG
Control Variable: m_pMainWnd (CTutorialApp)
GUI Element: Click to Add Button
GUI ID: IDC_BTN_ADD
Control Variable: none
GUI Element: Output Echo Area
GUI ID: IDC_ECHO_AREA
Control Variable: m_EchoArea
GUI Element: Button Click Label
GUI ID: IDC_STATIC
Control Variable: none
GUI Element: Quit Button
GUI ID: IDCANCEL
Control Variable: none
Figure 2.6.
GUI elements of Tutorial 2.2.
never changes its state. Our application is only interested in receiving click
events generated by this button. Because our application does not have any
need to refer to this element, we do not need to define a control variable for
this element.
The output echo area. We assigned IDC _ ECHO _ AREA to be the GUI ID
this element. This is the echo area where the application state information
(number of clicks) will be displayed. At run time, our application needs to
change the content of this GUI element. In our implementation, we define
m _ EchoText to be the control variable of this GUI element.
The “Button Clicks” label. This is a static GUI element because it pro-
vides neither input nor output functionality. It is a simple label.
The “Quit” button. This is the same button from Tutorial 2.1. Our appli-
cation has no reference to this GUI element. This GUI element supports
the default MFC service, where it reacts to a click event by quitting the
application.
Back-End Implementation
The development environment structure for Tutorial 2.2 is identical to that of
Tutorial 2.1 with the same folder structure and same seven source code files.
Search WWH ::




Custom Search