ホーム › UI.Input.Pointer › EnableMouseInPointer
EnableMouseInPointer
関数マウス入力をポインタメッセージとして受け取る設定を有効化する。
シグネチャ
// USER32.dll
#include <windows.h>
BOOL EnableMouseInPointer(
BOOL fEnable
);パラメーター
| 名前 | 型 | 方向 | 説明 |
|---|---|---|---|
| fEnable | BOOL | in | TRUEでマウス入力をポインタ入力スタックで処理する設定を有効化する。 |
戻り値の型: BOOL
各言語での呼び出し定義
// USER32.dll
#include <windows.h>
BOOL EnableMouseInPointer(
BOOL fEnable
);[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("USER32.dll", SetLastError = true, ExactSpelling = true)]
static extern bool EnableMouseInPointer(
bool fEnable // BOOL
);<DllImport("USER32.dll", SetLastError:=True, ExactSpelling:=True)>
Public Shared Function EnableMouseInPointer(
fEnable As Boolean ' BOOL
) As Boolean
End Function' fEnable : BOOL
Declare PtrSafe Function EnableMouseInPointer Lib "user32" ( _
ByVal fEnable As Long) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
EnableMouseInPointer = ctypes.windll.user32.EnableMouseInPointer
EnableMouseInPointer.restype = wintypes.BOOL
EnableMouseInPointer.argtypes = [
wintypes.BOOL, # fEnable : BOOL
]
# GetLastError: use ctypes.GetLastError() (or ctypes.WinDLL(use_last_error=True))require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('USER32.dll')
EnableMouseInPointer = Fiddle::Function.new(
lib['EnableMouseInPointer'],
[
Fiddle::TYPE_INT, # fEnable : BOOL
],
Fiddle::TYPE_INT)#[link(name = "user32")]
extern "system" {
fn EnableMouseInPointer(
fEnable: i32 // BOOL
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("USER32.dll", SetLastError = true)]
public static extern bool EnableMouseInPointer(bool fEnable);
"@
$api = Add-Type -MemberDefinition $sig -Name 'USER32_EnableMouseInPointer' -Namespace Win32 -PassThru
# $api::EnableMouseInPointer(fEnable)#uselib "USER32.dll"
#func global EnableMouseInPointer "EnableMouseInPointer" sptr
; EnableMouseInPointer fEnable ; 戻り値は stat
; fEnable : BOOL -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "USER32.dll"
#cfunc global EnableMouseInPointer "EnableMouseInPointer" int
; res = EnableMouseInPointer(fEnable)
; fEnable : BOOL -> "int"; BOOL EnableMouseInPointer(BOOL fEnable)
#uselib "USER32.dll"
#cfunc global EnableMouseInPointer "EnableMouseInPointer" int
; res = EnableMouseInPointer(fEnable)
; fEnable : BOOL -> "int"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
user32 = windows.NewLazySystemDLL("USER32.dll")
procEnableMouseInPointer = user32.NewProc("EnableMouseInPointer")
)
// fEnable (BOOL)
r1, _, err := procEnableMouseInPointer.Call(
uintptr(fEnable),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // BOOLfunction EnableMouseInPointer(
fEnable: BOOL // BOOL
): BOOL; stdcall;
external 'USER32.dll' name 'EnableMouseInPointer';result := DllCall("USER32\EnableMouseInPointer"
, "Int", fEnable ; BOOL
, "Int") ; return: BOOL●EnableMouseInPointer(fEnable) = DLL("USER32.dll", "bool EnableMouseInPointer(bool)")
# 呼び出し: EnableMouseInPointer(fEnable)
# fEnable : BOOL -> "bool"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。