次の方法で共有


Switching Between the Dialog Editor and Code

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

You can double-click on dialog box controls to jump to their handler code, or to quickly create stub handler functions. In addition, you can double-click on the dialog box itself to jump to its definition. With a dialog box or control selected, click Events from the shortcut menu to view a complete list of Windows messages and events available for this item. Choose from the list to create or edit handler functions

You can also jump to the Dialog editor from other contexts within the Visual C++ development environment, such as ClassView or WizardBar.

What do you want to know more about?

The Visual C++ Dialog editor

What do you want to do?

Jump to code from the Dialog editor

Choose from available Windows messages and events

Use WizardBar to jump to the Dialog editor

Use ClassView to jump to the Dialog editor

To jump to code from the Dialog editor

  • Double-click the dialog box to jump to its class definition, or double-click on a control within the dialog box to jump to the declaration for its most-recently implemented message handling function. (For ATL-based dialog classes, you always jump to the constructor definition.)

To choose from available Windows messages and events

  1. With a dialog box or control selected, click the right mouse button and then click Events in the shortcut menu.

    The New Windows Message and Events Handlers dialog box appears. This dialog box is class-specific, so you will see the class that implements this dialog box displayed in the title bar and in the Class or object to handle list. All controls in the dialog box also appear in the list.

  2. Use the Class or object to handle list to select the control for which you want to create a handler. You can also select the dialog box.

    The New Windows messages/events list displays all possible Windows messages for which you can create handlers. The Existing message/event handlers list shows those Windows messages or events for which handlers have already been created. You can choose any of the following actions:

    • With a new message or event selected, choose Add Handler to create a new stub handler function, or choose Add and Edit to create the stub function and exit this dialog box, jumping directly to the handler code in the Text editor.

    • With an existing message or event selected, choose Edit Existing to jump to the existing handler code in the Text editor.

To use WizardBar to jump to the Dialog editor

  • With the class that implements the dialog box selected in the Classes combo box, select the dialog ID from the Members combo box, or select Go To Dialog Editor from the Action menu.

To use ClassView to jump to the Dialog editor

  • Right-click on the class that implements the dialog box, and click Go To Dialog Editor on the shortcut menu.