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