Pop-up Topics
You can display a pop-up topic that contains information for a specific
control or menu by calling the
WinHelp function with the HELP_WM_HELP or HELP_CONTEXTMENU command. These commands
display a topic in a pop-up window near the corresponding control or menu. To let
the user return immediately to work in the application, the pop-up window is
destroyed as soon as the user presses a key or clicks the left mouse button.
You use the HELP_WM_HELP command when processing WM_HELP messages for control
windows. Because most controls pass the WM_HELP message to the
DefWindowProc function, the corresponding dialog box procedure (or parent window procedure)
processes this message. Rather than give a specific context identifier, the
dialog box procedure must pass an array of control and context identifier pairs
to
WinHelp along with the control handle specified in the
hItemHandle member of
HELPINFO structure passed with the WM_HELP message. The function determines the
identifier of the control for which the WM_HELP message was generated and uses the
matching context identifier to display the appropriate topic.
You use the HELP_CONTEXTMENU command when processing WM_CONTEXTMENU messages.
Because most controls pass the WM_CONTEXTMENU message to the
DefWindowProc function, the corresponding dialog box procedure (or parent window procedure)
processes this message. Again, the procedure specify an array of control and
context identifier pairs and the handle in
wParam when calling
WinHelp so that the function can pick the appropriate context identifier from the
array and display the appropriate topic. Unlike the HELP_WM_HELP command,
HELP_CONTEXTMENU first displays a What's This? command in a menu. If the user chooses
the command,
WinHelp displays the topic. Otherwise, the request is canceled.
You can also display pop-up topics by using the HELP_CONTEXTPOPUP command and
specifying a context identifier of the topic. This command is similar to the
HELP_CONTEXT command but invokes the pop-up instance of Windows Help used by
HELP_WM_HELP and HELP_CONTEXTMENU. Applications can use this command in response to
WM_HELP messages to display help for menus and for windows that are not controls in a
dialog box. To use this command most effectively, the application should
assign context identifiers to these menus and windows.
You can assign a context identifier to any window or menu in the application.
When the user's help requests generates a WM_HELP message, the system includes
the context identifier in the
HELPINFO structure that it passes to the parent window along with the WM_HELP message.
The parent window can then pass the context identifier to
WinHelp to display the requested help topic.
You use the
SetWindowContextHelpId function to assign a context identifier to a window or control and the
SetMenuContextHelpId function to assign a context identifier to a menu. You can retrieve the
context identifier for a window or menu by using the
GetWindowContextHelpId or
GetMenuContextHelpId function.
- Software for developers
-
Delphi Components
.Net Components
Software for Android Developers
- More information resources
-
MegaDetailed.Net
Unix Manual Pages
Delphi Examples
- Databases for Amazon shops developers
-
Amazon Categories Database
Browse Nodes Database