PlanetSquires Forums

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: WS_EX_CONTEXTHELP message processing  (Read 559 times)

Roger Garstang

  • Guest
WS_EX_CONTEXTHELP message processing
« on: June 08, 2004, 07:36:26 PM »

Can we add functions/messages to the list for WM_HELP and maybe WM_CONTEXTMENU.  I also noticed when WS_EX_CONTEXTHELP is given to a window it doesn't show the ? button on the bar...it only shows when Maximize and Minimize are off too.
Logged

TechSupport

  • Guest
WS_EX_CONTEXTHELP message processing
« Reply #1 on: June 08, 2004, 08:56:18 PM »

Suggestions noted. Thanks.  :)
Logged

Roger Garstang

  • Guest
WS_EX_CONTEXTHELP message processing
« Reply #2 on: June 09, 2004, 03:26:02 AM »

To help out a little bit, I just implemented a simple little help scheme in my app using msgboxes.

WM_HELP can be processed as it stands in each control type, or you can let the def proc send it back to your main form callback and it sends a pointer to a HELPINFO in lParam, so I do something like this in the main callback (Custom at the moment since it isn't implemented)-

Code: [Select]
LOCAL hi AS HELPINFO PTR

    SELECT CASE wMsg
         CASE %WM_HELP
            hi= lParam
            SELECT CASE @hi.hItemHandle
                CASE HWND_HTML_USERNAMETXT
                    MSGBOX "Enter a Username here.", %MB_ICONINFORMATION OR %MB_TASKMODAL, "Help"
                CASE HWND_HTML_PASSWORDTXT
                    MSGBOX "Enter a Password here.", %MB_ICONINFORMATION OR %MB_TASKMODAL, "Help"
            END SELECT
    END SELECT

There is probably more that could be done and I could create my own help file, but I don't need it.  Hitting F1 or click on the control with the context help either one shows the help.  I wish clicking anywhere in the window or pressing F1 with no control selected and having CASE ELSE process the message would work, but the window doesn't seem to return the message and it is difficult to not have a control selected, so you still have to click a control that just isn't handled...statusbars are pretty good.
Logged

Roger Garstang

  • Guest
WS_EX_CONTEXTHELP message processing
« Reply #3 on: June 10, 2004, 02:42:42 AM »

Anyone know what Windows does with the structure this points to with the lparam?  There is no mention in the documentation about needing to clean up any memory or anything, so I'm guessing Windows cleans it up on Callback exit or when another is sent or it is reused and cleaned up later...
Logged