共用方式為


Help Topics: Context-Sensitive Help for Your Programs

OverviewHow Do I

This group of articles describes support provided by the Microsoft Foundation Class Library (MFC) for context-sensitive Windows Help for your applications.

Applications written for Windows usually provide context-sensitive Help, allowing the user to get help on a particular window, dialog box, command, or toolbar button. MFC makes it simple to add context-sensitive Help to your application.

The user can access Help in the following ways:

  • Pressing the F1 key

    The user can press the F1 key from an active window, dialog box, or message box, or with a menu item or toolbar button selected, to invoke a Help topic relevant to the selected item. For menu items, help is summoned for the item currently highlighted.

    Note   You can define a key other than F1 for Help, but it is common among Windows applications to use F1.

  • Entering Help mode

    From within an active application, the user can press SHIFT+F1 or click on the Help toolbar button to put the application into “Help mode.”

    In Help mode, the mouse cursor changes to an arrow with a question mark. While the application is in this mode, the user can click any window, dialog box, message box, menu item, or toolbar button to summon help specific to the item. Help mode ends when Help is displayed. Pressing ESC or switching away from the application and back also ends Help mode.

  • Using the Help menu

    Most applications provide help support through one or more menu items. For instance, most Windows applications include a Help menu item that invokes the application’s Help file when chosen. Additional items on the Help menu might, for example, display a Search dialog.

The following articles present an overview of the MFC help subsystem:

The following additional articles explain MFC help support in more detail:

For a detailed example, see in Tutorials. For additional technical information, see .