Share via


About Adding Controls to Dialog Boxes

Home Page (Dialog Editor)OverviewHow Do I ... Topics

You add controls to a dialog box by using the Controls toolbar, which enables you to choose the control you want and to drag it to the dialog box. When displayed, the toolbar stays positioned above other open windows in your workspace. You can add ActiveX controls to the Controls toolbar. You can also add ActiveX controls, which may not be on the toolbar, directly to a dialog box by using the Insert ActiveX Controls command from the Dialog editor shortcut menu.

The fastest way to add controls to a dialog box, reposition existing controls, or move controls from one dialog box to another is to use the drag-and-drop method. The control’s position is outlined in a dotted line until it is dropped into the dialog box. When you add a control to a dialog box with the drag-and-drop method, the control is given a standard height appropriate to that type of control.

When you add a control to a dialog box or reposition it, its final placement may be determined by guides or margins, or whether you have the layout grid turned on.

Once you have added a control to the dialog box, you can change properties such as its caption by using its property page. You can select multiple controls and change their properties all at once.

What do you want to do?

Add controls to dialog boxes

Jump to a control's message handler code

Select specific controls or groups of controls

Size individual controls

Show or hide the Controls toolbar

Use guides and margins