ホーム › UI.WindowsAndMessaging › WindowFromPhysicalPoint
WindowFromPhysicalPoint
関数指定物理座標にあるウィンドウのハンドルを取得する。
シグネチャ
// USER32.dll
#include <windows.h>
HWND WindowFromPhysicalPoint(
POINT Point
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| Point | POINT | in |
戻り値の型: HWND
各言語での呼び出し定義
// USER32.dll
#include <windows.h>
HWND WindowFromPhysicalPoint(
POINT Point
);[DllImport("USER32.dll", ExactSpelling = true)]
static extern IntPtr WindowFromPhysicalPoint(
POINT Point // POINT
);<DllImport("USER32.dll", ExactSpelling:=True)>
Public Shared Function WindowFromPhysicalPoint(
Point As POINT ' POINT
) As IntPtr
End Function' Point : POINT
Declare PtrSafe Function WindowFromPhysicalPoint Lib "user32" ( _
ByVal Point As LongPtr) As LongPtr
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
WindowFromPhysicalPoint = ctypes.windll.user32.WindowFromPhysicalPoint
WindowFromPhysicalPoint.restype = ctypes.c_void_p
WindowFromPhysicalPoint.argtypes = [
POINT, # Point : POINT
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('USER32.dll')
WindowFromPhysicalPoint = Fiddle::Function.new(
lib['WindowFromPhysicalPoint'],
[
Fiddle::TYPE_VOIDP, # Point : POINT
],
Fiddle::TYPE_VOIDP)#[link(name = "user32")]
extern "system" {
fn WindowFromPhysicalPoint(
Point: POINT // POINT
) -> *mut core::ffi::c_void;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("USER32.dll")]
public static extern IntPtr WindowFromPhysicalPoint(POINT Point);
"@
$api = Add-Type -MemberDefinition $sig -Name 'USER32_WindowFromPhysicalPoint' -Namespace Win32 -PassThru
# $api::WindowFromPhysicalPoint(Point)#uselib "USER32.dll"
#func global WindowFromPhysicalPoint "WindowFromPhysicalPoint" sptr
; WindowFromPhysicalPoint Point ; 戻り値は stat
; Point : POINT -> "sptr"
; ※値渡し構造体は直接渡せません。intにパック、または var で構造体変数を渡してください。
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "USER32.dll"
#cfunc global WindowFromPhysicalPoint "WindowFromPhysicalPoint" int
; res = WindowFromPhysicalPoint(Point)
; Point : POINT -> "int"
; ※値渡し構造体は直接渡せません。intにパック、または var で構造体変数を渡してください。; HWND WindowFromPhysicalPoint(POINT Point)
#uselib "USER32.dll"
#cfunc global WindowFromPhysicalPoint "WindowFromPhysicalPoint" int
; res = WindowFromPhysicalPoint(Point)
; Point : POINT -> "int"
; ※値渡し構造体は直接渡せません。intにパック、または var で構造体変数を渡してください。import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
user32 = windows.NewLazySystemDLL("USER32.dll")
procWindowFromPhysicalPoint = user32.NewProc("WindowFromPhysicalPoint")
)
// Point (POINT)
r1, _, err := procWindowFromPhysicalPoint.Call(
uintptr(Point),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // HWNDfunction WindowFromPhysicalPoint(
Point: POINT // POINT
): THandle; stdcall;
external 'USER32.dll' name 'WindowFromPhysicalPoint';result := DllCall("USER32\WindowFromPhysicalPoint"
, "Ptr", Point ; POINT
, "Ptr") ; return: HWND●WindowFromPhysicalPoint(Point) = DLL("USER32.dll", "void* WindowFromPhysicalPoint(void*)")
# 呼び出し: WindowFromPhysicalPoint(Point)
# Point : POINT -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。