Graphics Reference
In-Depth Information
// Microsoft Visual C++ generated resource script.
.
Source file.
MFC _ SimpleDialog.rc file
in the Resource Files folder
of the MFC _ SimpleDialog
project.
#include "Resource.h"
.
IDD_MFC_SIMPLEDIALOG_DIALOG is the identifier for the main application
window. The following describes the dimension and appearance of this GUI element.
IDD _ MFC _ SIMPLEDIALOG _ DIALOG DIALOGEX 0, 0, 320, 200
STYLE DS _ SHELLFONT | WS _ POPUP | WS _ VISIBLE | WS _ CAPTION | DS _ MODALFRAME
EXSTYLE WS _ EX _ APPWINDOW
CAPTION "MFC _ SimpleDialog"
.
The following lines descrbe the locations and dimenstions of OK and Cancel buttons.
BEGIN
DEFPUSHBUTTON
"OK",IDOK,263,7,50,16
PUSHBUTTON
"Cancel",IDCANCEL,263,25,50,16
.
Listing 2.1. Snippet from MFC _ SimpleDialog.rc (Tutorial 2.1).
Debug. The IDE uses this folder to record all the compile results, including
all the .obj files and the eventual .exe file (executable program). The con-
tents of this folder support interactive debugging in the IDE. All the .obj
and the .exe files contain intermediate symbols for interactive debugging.
As a result, files from this folder are much larger than they need be.
Release. The IDE uses this folder to record all the compiled results. In
contrast to the Debug folder, the files in this folder are for supporting final
release of the program (after development is done).
The executable file
from this folder is optimized for size and speed.
Here are the details of the seven source files:
Resource.h .
This file defines the symbolic names (or GUI ID) of GUI
GUI ID. The GUI ID is
a unique identifier associated
with each GUI element. The
GUI ID is used mainly by the
MFC resource editor.
elements used in the resource editor. For example, as shown in Listing 2.2,
IDD _ MFC _ SIMPLEDIALOG _ DIALOG is the symbolic name of the GUI ele-
ment that represents the main application window. In this case, we see that
this symbol is being defined to be a unique integer.
Notice that in List-
Search WWH ::




Custom Search