Share via


Shortcut for Defining Member Variables for Dialog Controls

OverviewHow Do I

To define a member variable for any dialog box control except buttons, you can use the following shortcut to bypass explicitly invoking ClassWizard from the dialog editor.

Note   This article applies only to dialog controls within an MFC project. ATL projects should use the New Windows Messages and Event Handlers dialog box.

To define a member variable for a (non-button) dialog box control

  1. In the dialog editor, select a control.

  2. While holding down the CTRL key, double-click the dialog box control.

    The Add Member Variable dialog box appears.

  3. Type the appropriate information in the Add Member Variable dialog box. For more information, see Defining Member Variables for DDX.

  4. Click OK.

    ClassWizard returns you to the dialog editor.

Tip   To jump from any dialog box control to its existing handler, double-click the control.