Skip to content

Latest commit

 

History

History
37 lines (29 loc) · 970 Bytes

sample_025.md

File metadata and controls

37 lines (29 loc) · 970 Bytes

Home

Retrieving window and menu help context identifiers

Code:

DO decl

LOCAL hWindow, hMenu
hWindow = GetFocus()
hMenu = GetMenu(hWindow)

ACTI SCREEN
? "Window handle:", hWindow
? "Window Help Context ID:", GetWindowContextHelpId(hWindow)

IF hMenu <> 0
	? "Menu handle:", hMenu
	? "Menu Help Context ID:", GetMenuContextHelpId(hMenu)
ELSE
	? "No menu attached to this window"
ENDIF

PROCEDURE decl
	DECLARE INTEGER GetWindowContextHelpId IN user32 INTEGER hWnd
	DECLARE INTEGER GetMenuContextHelpId IN user32 INTEGER hmenu
	DECLARE INTEGER GetFocus IN user32
	DECLARE INTEGER GetMenu IN user32 INTEGER hWnd  

Listed functions:

GetFocus
GetMenu
GetMenuContextHelpId
GetWindowContextHelpId