![]() |
Group Boxes |
|
Overview |
|
A group box is a static control used to create "physical" limits or sections on a dialog box or a form. It belongs to the family of MFC static controls. To create
a group box, from the Controls toolbox, click the Group Box button |
The most significant property of a group box is probably the text it is displaying. This is set using the Caption field. If you are programmatically creating the control, the first argument of the CStatic::Create() method allows you to set its caption. At run time, to change this text, call the CWnd::SetWindowText() method. The text of a group box can be aligned to the left, the center, or the right sides of its allocated rectangle. This is specified at design time using the Horizontal Alignment combo box. Instead of
using its own caption, you may want to display a check box that would
validate or invalidate the content of the group box. To do this, after
adding the group box, delete its caption. Then add a Check Box control
Of course, it is up to you to implement the behavior of controls inside or outside the group box.
If you plan to send message from the group box itself (not the controls inside of it), check the Notify check box or set it to True. This is equivalent to adding the SS_NOTIFY style when dynamically creating the button. Articles implementing a Group Box control: |
| Net Price |
| Danillo Pizza |
| Strings in Dialog Box Controls |
| Dialog Data Transfer |
|
|
| Copyright © 2004-2007 FunctionX, Inc. |
|
|