Using MFC in C++ Part 4: Controls, DDX and DDV - The group box control
(Page 7 of 9 )
The last control we will look at in this article is the GROUPBOX control. To Visual Basic developers, this is exactly the same as the frame control. A group box looks like a border, and should be used to separate your programs windows into logical areas. A GROUPBOX control looks like this:

We add a group box to our resource file with the following syntax:
GROUPBOX
[Caption], [Control Id], [X Pos], [Y Pos], [Width], [Height], [Style Options]The group box shown in the example image above is declared like this:
GROUPBOX "Test Group Box", IDGB_TEST, 5, 5, 290, 190, WS_VISIBLEGroup boxes not only separate your dialog boxes into logical sections, but they also enhance the look of your dialogs as well.
Now that we have a good grasp on some of the most popular MFC controls, I will now describe a much easier way to get and set the values of these controls.
Next: DDX and DDV explained >>
More C++ Articles
More By Mitchell Harper