Context help message loop
-
Hello *, dialog boxes can have a question mark button in their caption that (when clicked) changes cursor and provides help for selected control. I'd like to have the same functionality in the main window of the application, triggered for example by a toolbar button. I guess a specialized message loop is needed to provide all the functionality (changing cursor, sending the WM_HELP, cancelling on ESC, ...) Is this piece of code avaiable or would I need to implement it myself :sigh: ? One more thing - no MFC if possible, just pure Win32. Thanks in advance, Vlasta
-
Hello *, dialog boxes can have a question mark button in their caption that (when clicked) changes cursor and provides help for selected control. I'd like to have the same functionality in the main window of the application, triggered for example by a toolbar button. I guess a specialized message loop is needed to provide all the functionality (changing cursor, sending the WM_HELP, cancelling on ESC, ...) Is this piece of code avaiable or would I need to implement it myself :sigh: ? One more thing - no MFC if possible, just pure Win32. Thanks in advance, Vlasta
This is what I would try, When user clicks on '?' button:
- capture mouse to main window
- set flag variable that context help is active
In main window's WM_SETCURSOR function set cursor to question mark. In main window's WM_LBUTTONDOWN:
- use ChildWindowFromPoint() to get the window clicked on.
- Post WM_HELP to that window
- Release the capture
- Clear the flag variable
-
This is what I would try, When user clicks on '?' button:
- capture mouse to main window
- set flag variable that context help is active
In main window's WM_SETCURSOR function set cursor to question mark. In main window's WM_LBUTTONDOWN:
- use ChildWindowFromPoint() to get the window clicked on.
- Post WM_HELP to that window
- Release the capture
- Clear the flag variable