Share via


CWinApp::OnHelp

Handles F1 Help within the application (using the current context).

afx_msg void OnHelp( );

Remarks

Usually you will also add an accelerator-key entry for the F1 key. Enabling the F1 key is only a convention, not a requirement.

You must add an ON_COMMAND( ID_HELP, OnHelp ) statement to your CWinApp class message map to enable this member function. If enabled, called by the framework when the user presses the F1 key.

The default implementation of this message-handler function determines the Help context that corresponds to the current window, dialog box, or menu item and then calls WINHELP.EXE. If no context is currently available, the function uses the default context.

Override this member function to set the Help context to something other than the window, dialog box, menu item, or toolbar button that currently has the focus. Call WinHelp with the desired Help context ID.

Requirements

Header: afxwin.h

See Also

Reference

CWinApp Class

Hierarchy Chart

CWinApp::OnContextHelp

CWinApp::OnHelpUsing

CWinApp::OnHelpIndex

CWinApp::WinHelp

Other Resources

CWinApp Members