函数参考


_GUICtrlMenu_GetMenuContextHelpID

检索上下文帮助标识符

#Include <GuiMenu.au3>
_GUICtrlMenu_GetMenuContextHelpID($hMenu)

参数

$hMenu 菜单句柄

返回值

返回上下文帮助标识符

注意/说明

None.

相关

_GUICtrlMenu_SetMenuContextHelpID

示例/演示


#include <GuiMenu.au3>

_Main()

Func _Main()
    Local $hWnd, $hMain, $hFile

    ; 打开记事本
    Run("notepad.exe")
    WinWaitActive("[CLASS:Notepad]")
    $hWnd = WinGetHandle("[CLASS:Notepad]")
    $hMain = _GUICtrlMenu_GetMenu($hWnd)
    $hFile = _GUICtrlMenu_GetItemSubMenu($hMain, 0)

    ; Get/Set File menu help context ID
    Writeln("File help context ID: " & _GUICtrlMenu_GetMenuContextHelpID($hFile))
    _GUICtrlMenu_SetMenuContextHelpID($hFile, 1234)
    Writeln("File help context ID: " & _GUICtrlMenu_GetMenuContextHelpID($hFile))

EndFunc   ;==>_Main

; 写入一行文本到记事本
Func Writeln($sText)
    ControlSend("[CLASS:Notepad]", "", "Edit1", $sText & @CR)
EndFunc   ;==>Writeln