Reference : here and here and here for dialogs.
A possible "easy" strategy for context help without a help file is just to use Traytip. Looking at something like:
Code: Select all
HELPINFO_WINDOW := 1, iCtrlId := 0, iCtrlHwnd := 0, dwContextId := 0, MousePosX := 0, MousePosy := 0
;WM_Help
WS_EX_CONTEXTHELP := 0x00000400
VarSetCapacity(lpHelpInfo, 28)
NumPut(28, lpHelpInfo, 28, "UInt")
NumPut(28, lpHelpInfo, 0, "UInt")
NumPut(HELPINFO_WINDOW, lpHelpInfo, 4, "UInt")
NumPut(iCtrlId, lpHelpInfo, 8, "UInt")
NumPut(iCtrlHwnd, lpHelpInfo, 12, "UInt")
NumPut(dwContextId, lpHelpInfo, 16, "UInt")
NumPut(MousePosX, lpHelpInfo, 20, "UInt")
NumPut(MousePosY, lpHelpInfo, 24, "UInt")
Gui -MaximizeBox -MinimizeBox +E%WS_EX_CONTEXTHELP%
Gui, Add, Button, gCloseMe w100 default
OnMessage(0x0053, "WM_Help")
Gui, show
Return
CloseMe:
GuiClose:
ExitApp
WM_HELP(wp_notused, lpHelpInfo, _msg, _hwnd)
{
iCtrlID := Numget(lpHelpInfo, 8) ; constant value
iCtrlHwnd := Numget(lpHelpInfo, 12) ; blank
traytip,, % " iCtrlID: " iCtrlID " iCtrlHwnd: " iCtrlHwnd
}
This Delphi thread looked promising, but the linked pas file at the end has moved on.
However we see from the bottom of this How To that the ContextIDs are mapped to the HWND anyway, so it looks as if what we are seeking is not very practical.
Any ideas appreciated.
Thanks.