In this article, Mitchell will describe how to add several controls to your dialog windows, including the edit box, group box, check box, list box and radio button. He will also describe what DDX and DDV functions are, and show you how to use them to automatically get and set the values of the controls on a dialog.
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:
The group box shown in the example image above is declared like this:
GROUPBOX "Test Group Box", IDGB_TEST, 5, 5, 290, 190, WS_VISIBLE
Group 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.