GetMenuContextHelpId
関数メニューのコンテキストヘルプIDを取得する。
シグネチャ
// USER32.dll
#include <windows.h>
DWORD GetMenuContextHelpId(
HMENU param0
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| param0 | HMENU | in |
戻り値の型: DWORD
各言語での呼び出し定義
// USER32.dll
#include <windows.h>
DWORD GetMenuContextHelpId(
HMENU param0
);[DllImport("USER32.dll", ExactSpelling = true)]
static extern uint GetMenuContextHelpId(
IntPtr param0 // HMENU
);<DllImport("USER32.dll", ExactSpelling:=True)>
Public Shared Function GetMenuContextHelpId(
param0 As IntPtr ' HMENU
) As UInteger
End Function' param0 : HMENU
Declare PtrSafe Function GetMenuContextHelpId Lib "user32" ( _
ByVal param0 As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
GetMenuContextHelpId = ctypes.windll.user32.GetMenuContextHelpId
GetMenuContextHelpId.restype = wintypes.DWORD
GetMenuContextHelpId.argtypes = [
wintypes.HANDLE, # param0 : HMENU
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('USER32.dll')
GetMenuContextHelpId = Fiddle::Function.new(
lib['GetMenuContextHelpId'],
[
Fiddle::TYPE_VOIDP, # param0 : HMENU
],
-Fiddle::TYPE_INT)#[link(name = "user32")]
extern "system" {
fn GetMenuContextHelpId(
param0: *mut core::ffi::c_void // HMENU
) -> u32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("USER32.dll")]
public static extern uint GetMenuContextHelpId(IntPtr param0);
"@
$api = Add-Type -MemberDefinition $sig -Name 'USER32_GetMenuContextHelpId' -Namespace Win32 -PassThru
# $api::GetMenuContextHelpId(param0)#uselib "USER32.dll"
#func global GetMenuContextHelpId "GetMenuContextHelpId" sptr
; GetMenuContextHelpId param0 ; 戻り値は stat
; param0 : HMENU -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "USER32.dll"
#cfunc global GetMenuContextHelpId "GetMenuContextHelpId" sptr
; res = GetMenuContextHelpId(param0)
; param0 : HMENU -> "sptr"; DWORD GetMenuContextHelpId(HMENU param0)
#uselib "USER32.dll"
#cfunc global GetMenuContextHelpId "GetMenuContextHelpId" intptr
; res = GetMenuContextHelpId(param0)
; param0 : HMENU -> "intptr"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
user32 = windows.NewLazySystemDLL("USER32.dll")
procGetMenuContextHelpId = user32.NewProc("GetMenuContextHelpId")
)
// param0 (HMENU)
r1, _, err := procGetMenuContextHelpId.Call(
uintptr(param0),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // DWORDfunction GetMenuContextHelpId(
param0: THandle // HMENU
): DWORD; stdcall;
external 'USER32.dll' name 'GetMenuContextHelpId';result := DllCall("USER32\GetMenuContextHelpId"
, "Ptr", param0 ; HMENU
, "UInt") ; return: DWORD●GetMenuContextHelpId(param0) = DLL("USER32.dll", "dword GetMenuContextHelpId(void*)")
# 呼び出し: GetMenuContextHelpId(param0)
# param0 : HMENU -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。