|
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.
| Last news from Greatis Software |
 |
|
Nostalgia .Net |
|
.Net is powerful, but not all-powerful, so sometimes we need to use Win32 API for our .Net applications. It's simple enough with Platform Invoke if you have Win32 skill, but we do not always have time to dig the ancient documentation, declare the special types that are compatible with Win32, find the values of the Win32's constants and so on. Nostalgia .Net offers several simple-to-use classes, and components that will allow you to forget about the headache of Win32 and just use the power of Win32 in your application the same way as you use the native. Net classes. More » |
| Recommended software for developers |
 |
|
Ultimate Pack |
|
Component pack for Delphi and C++ Builder that contains runtime form designer, runtime object inspector, print suite and much more for the very special price. More » |
 |
|
Form Designer .Net |
|
Unique runtime form design solution that allows to edit any form in .Net WinForms application at runtime with full source codes for only 300 euro! More » |
 |
|
Print Suite .Net |
|
Print Suite .Net is a set of components for easy printing texts, images and grids from your WinForms applications. Full C# source codes are available More » |
 |
|
Gradient Controls .Net |
|
Gradient Controls .Net offers controls with gradient background feature. Labels, panels and so on... Full C# source codes are available More » |
 |
|
Greatis iGrid |
|
iGrid plots drawing grid right over your desktop, so you can use it everywhere, with any drawing application without any special plugins for different graphic editors. More » |
All the contacts and projectsDmitry Vasiliev (just.dmitry)
Related LinksSoftware for Visual Studio .NET developers Software for Delphi and C++ Builder developers Software for Visual Basic 6 developers Delphi Tips&Tricks MegaDetailed.NET More Online Helps Win32 Programmer's Reference Win32 Multimedia Programmer's Reference OLE Programmer's Reference Microsoft Windows Pen API Programmer's Reference Microsoft Windows Sockets 2 Reference Microsoft Windows Telephony API (TAPI) Programmer's Reference Unix Manual Pages
|