DeferWindowPos
関数シグネチャ
// USER32.dll
#include <windows.h>
HDWP DeferWindowPos(
HDWP hWinPosInfo,
HWND hWnd,
HWND hWndInsertAfter, // optional
INT x,
INT y,
INT cx,
INT cy,
SET_WINDOW_POS_FLAGS uFlags
);パラメーター
| 名前 | 型 | 方向 | 説明 | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| hWinPosInfo | HDWP | in | 1 つ以上のウィンドウのサイズおよび位置情報を保持する複数ウィンドウ位置構造体へのハンドルです。この構造体は BeginDeferWindowPos または直近の DeferWindowPos 呼び出しによって返されます。 | ||||||||||||||||||||||||||||
| hWnd | HWND | in | 更新情報が構造体に格納されるウィンドウへのハンドルです。複数ウィンドウ位置構造体に含まれるすべてのウィンドウは、同じ親を持つ必要があります。 | ||||||||||||||||||||||||||||
| hWndInsertAfter | HWND | inoptional | Z オーダーにおいて配置対象ウィンドウの直前に位置するウィンドウへのハンドルです。このパラメーターには、ウィンドウハンドルまたは次のいずれかの値を指定する必要があります。uFlags パラメーターに SWP_NOZORDER フラグが設定されている場合、このパラメーターは無視されます。
| ||||||||||||||||||||||||||||
| x | INT | in | ウィンドウの左上隅の x 座標です。 | ||||||||||||||||||||||||||||
| y | INT | in | ウィンドウの左上隅の y 座標です。 | ||||||||||||||||||||||||||||
| cx | INT | in | ウィンドウの新しい幅(ピクセル単位)です。 | ||||||||||||||||||||||||||||
| cy | INT | in | ウィンドウの新しい高さ(ピクセル単位)です。 | ||||||||||||||||||||||||||||
| uFlags | SET_WINDOW_POS_FLAGS | in | ウィンドウのサイズと位置に影響を与える、次の値の組み合わせです。
|
戻り値の型: HDWP
公式ドキュメント
指定したウィンドウについて、指定した複数ウィンドウ位置構造体を更新します。
戻り値
型: HDWP
戻り値は、更新された複数ウィンドウ位置構造体を識別します。この関数が返すハンドルは、関数に渡したハンドルと異なる場合があります。この関数が返す新しいハンドルは、次回の DeferWindowPos または EndDeferWindowPos 関数の呼び出し時に渡す必要があります。
関数の成功に十分なシステムリソースがない場合、戻り値は NULL になります。拡張エラー情報を取得するには、GetLastError を呼び出します。
解説(Remarks)
DeferWindowPos の呼び出しが失敗した場合、アプリケーションはウィンドウ位置設定操作を中止し、EndDeferWindowPos を呼び出さないでください。
SWP_NOZORDER が指定されていない場合、システムは hWnd パラメーターで識別されるウィンドウを、hWndInsertAfter パラメーターで識別されるウィンドウの直後の位置に配置します。hWndInsertAfter が NULL または HWND_TOP の場合、システムは hWnd ウィンドウを Z オーダーの最上部に配置します。hWndInsertAfter が HWND_BOTTOM に設定されている場合、システムは hWnd ウィンドウを Z オーダーの最下部に配置します。
子ウィンドウのすべての座標は、親ウィンドウのクライアント領域の左上隅を基準とした相対座標です。
ウィンドウを最前面ウィンドウにするには、hWndInsertAfter を HWND_TOPMOST フラグに設定して SWP_NOZORDER フラグが設定されていないことを確認するか、または既存の最前面ウィンドウより上になるように Z オーダー上の位置を設定します。非最前面ウィンドウが最前面にされると、その所有ウィンドウも最前面になります。ただし、そのオーナーは変更されません。
SWP_NOACTIVATE フラグと SWP_NOZORDER フラグのいずれも指定されていない場合(つまり、アプリケーションがウィンドウのアクティブ化と Z オーダー上の位置変更を同時に要求する場合)、hWndInsertAfter に指定された値は、次の状況においてのみ使用されます。
- hWndInsertAfter に HWND_TOPMOST フラグと HWND_NOTOPMOST フラグのいずれも指定されていない。
- hWnd で識別されるウィンドウがアクティブウィンドウではない。
最前面ウィンドウは、Z オーダーの最下部(HWND_BOTTOM)または非最前面ウィンドウの後ろに再配置されると、最前面ではなくなります。最前面ウィンドウが非最前面にされると、そのオーナーおよび所有ウィンドウも非最前面ウィンドウになります。
非最前面ウィンドウは最前面ウィンドウを所有できますが、その逆はできません。最前面ウィンドウが所有するウィンドウ(たとえばダイアログボックス)は、それ自体が最前面ウィンドウになり、すべての所有ウィンドウがそのオーナーより上に維持されるようにします。
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
各言語での呼び出し定義
// USER32.dll
#include <windows.h>
HDWP DeferWindowPos(
HDWP hWinPosInfo,
HWND hWnd,
HWND hWndInsertAfter, // optional
INT x,
INT y,
INT cx,
INT cy,
SET_WINDOW_POS_FLAGS uFlags
);[DllImport("USER32.dll", SetLastError = true, ExactSpelling = true)]
static extern IntPtr DeferWindowPos(
IntPtr hWinPosInfo, // HDWP
IntPtr hWnd, // HWND
IntPtr hWndInsertAfter, // HWND optional
int x, // INT
int y, // INT
int cx, // INT
int cy, // INT
uint uFlags // SET_WINDOW_POS_FLAGS
);<DllImport("USER32.dll", SetLastError:=True, ExactSpelling:=True)>
Public Shared Function DeferWindowPos(
hWinPosInfo As IntPtr, ' HDWP
hWnd As IntPtr, ' HWND
hWndInsertAfter As IntPtr, ' HWND optional
x As Integer, ' INT
y As Integer, ' INT
cx As Integer, ' INT
cy As Integer, ' INT
uFlags As UInteger ' SET_WINDOW_POS_FLAGS
) As IntPtr
End Function' hWinPosInfo : HDWP
' hWnd : HWND
' hWndInsertAfter : HWND optional
' x : INT
' y : INT
' cx : INT
' cy : INT
' uFlags : SET_WINDOW_POS_FLAGS
Declare PtrSafe Function DeferWindowPos Lib "user32" ( _
ByVal hWinPosInfo As LongPtr, _
ByVal hWnd As LongPtr, _
ByVal hWndInsertAfter As LongPtr, _
ByVal x As Long, _
ByVal y As Long, _
ByVal cx As Long, _
ByVal cy As Long, _
ByVal uFlags As Long) As LongPtr
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
DeferWindowPos = ctypes.windll.user32.DeferWindowPos
DeferWindowPos.restype = ctypes.c_void_p
DeferWindowPos.argtypes = [
wintypes.HANDLE, # hWinPosInfo : HDWP
wintypes.HANDLE, # hWnd : HWND
wintypes.HANDLE, # hWndInsertAfter : HWND optional
ctypes.c_int, # x : INT
ctypes.c_int, # y : INT
ctypes.c_int, # cx : INT
ctypes.c_int, # cy : INT
wintypes.DWORD, # uFlags : SET_WINDOW_POS_FLAGS
]
# GetLastError: use ctypes.GetLastError() (or ctypes.WinDLL(use_last_error=True))require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('USER32.dll')
DeferWindowPos = Fiddle::Function.new(
lib['DeferWindowPos'],
[
Fiddle::TYPE_VOIDP, # hWinPosInfo : HDWP
Fiddle::TYPE_VOIDP, # hWnd : HWND
Fiddle::TYPE_VOIDP, # hWndInsertAfter : HWND optional
Fiddle::TYPE_INT, # x : INT
Fiddle::TYPE_INT, # y : INT
Fiddle::TYPE_INT, # cx : INT
Fiddle::TYPE_INT, # cy : INT
-Fiddle::TYPE_INT, # uFlags : SET_WINDOW_POS_FLAGS
],
Fiddle::TYPE_VOIDP)#[link(name = "user32")]
extern "system" {
fn DeferWindowPos(
hWinPosInfo: *mut core::ffi::c_void, // HDWP
hWnd: *mut core::ffi::c_void, // HWND
hWndInsertAfter: *mut core::ffi::c_void, // HWND optional
x: i32, // INT
y: i32, // INT
cx: i32, // INT
cy: i32, // INT
uFlags: u32 // SET_WINDOW_POS_FLAGS
) -> *mut core::ffi::c_void;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("USER32.dll", SetLastError = true)]
public static extern IntPtr DeferWindowPos(IntPtr hWinPosInfo, IntPtr hWnd, IntPtr hWndInsertAfter, int x, int y, int cx, int cy, uint uFlags);
"@
$api = Add-Type -MemberDefinition $sig -Name 'USER32_DeferWindowPos' -Namespace Win32 -PassThru
# $api::DeferWindowPos(hWinPosInfo, hWnd, hWndInsertAfter, x, y, cx, cy, uFlags)#uselib "USER32.dll"
#func global DeferWindowPos "DeferWindowPos" sptr, sptr, sptr, sptr, sptr, sptr, sptr, sptr
; DeferWindowPos hWinPosInfo, hWnd, hWndInsertAfter, x, y, cx, cy, uFlags ; 戻り値は stat
; hWinPosInfo : HDWP -> "sptr"
; hWnd : HWND -> "sptr"
; hWndInsertAfter : HWND optional -> "sptr"
; x : INT -> "sptr"
; y : INT -> "sptr"
; cx : INT -> "sptr"
; cy : INT -> "sptr"
; uFlags : SET_WINDOW_POS_FLAGS -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "USER32.dll"
#cfunc global DeferWindowPos "DeferWindowPos" sptr, sptr, sptr, int, int, int, int, int
; res = DeferWindowPos(hWinPosInfo, hWnd, hWndInsertAfter, x, y, cx, cy, uFlags)
; hWinPosInfo : HDWP -> "sptr"
; hWnd : HWND -> "sptr"
; hWndInsertAfter : HWND optional -> "sptr"
; x : INT -> "int"
; y : INT -> "int"
; cx : INT -> "int"
; cy : INT -> "int"
; uFlags : SET_WINDOW_POS_FLAGS -> "int"; HDWP DeferWindowPos(HDWP hWinPosInfo, HWND hWnd, HWND hWndInsertAfter, INT x, INT y, INT cx, INT cy, SET_WINDOW_POS_FLAGS uFlags)
#uselib "USER32.dll"
#cfunc global DeferWindowPos "DeferWindowPos" intptr, intptr, intptr, int, int, int, int, int
; res = DeferWindowPos(hWinPosInfo, hWnd, hWndInsertAfter, x, y, cx, cy, uFlags)
; hWinPosInfo : HDWP -> "intptr"
; hWnd : HWND -> "intptr"
; hWndInsertAfter : HWND optional -> "intptr"
; x : INT -> "int"
; y : INT -> "int"
; cx : INT -> "int"
; cy : INT -> "int"
; uFlags : SET_WINDOW_POS_FLAGS -> "int"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
user32 = windows.NewLazySystemDLL("USER32.dll")
procDeferWindowPos = user32.NewProc("DeferWindowPos")
)
// hWinPosInfo (HDWP), hWnd (HWND), hWndInsertAfter (HWND optional), x (INT), y (INT), cx (INT), cy (INT), uFlags (SET_WINDOW_POS_FLAGS)
r1, _, err := procDeferWindowPos.Call(
uintptr(hWinPosInfo),
uintptr(hWnd),
uintptr(hWndInsertAfter),
uintptr(x),
uintptr(y),
uintptr(cx),
uintptr(cy),
uintptr(uFlags),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // HDWPfunction DeferWindowPos(
hWinPosInfo: THandle; // HDWP
hWnd: THandle; // HWND
hWndInsertAfter: THandle; // HWND optional
x: Integer; // INT
y: Integer; // INT
cx: Integer; // INT
cy: Integer; // INT
uFlags: DWORD // SET_WINDOW_POS_FLAGS
): THandle; stdcall;
external 'USER32.dll' name 'DeferWindowPos';result := DllCall("USER32\DeferWindowPos"
, "Ptr", hWinPosInfo ; HDWP
, "Ptr", hWnd ; HWND
, "Ptr", hWndInsertAfter ; HWND optional
, "Int", x ; INT
, "Int", y ; INT
, "Int", cx ; INT
, "Int", cy ; INT
, "UInt", uFlags ; SET_WINDOW_POS_FLAGS
, "Ptr") ; return: HDWP●DeferWindowPos(hWinPosInfo, hWnd, hWndInsertAfter, x, y, cx, cy, uFlags) = DLL("USER32.dll", "void* DeferWindowPos(void*, void*, void*, int, int, int, int, dword)")
# 呼び出し: DeferWindowPos(hWinPosInfo, hWnd, hWndInsertAfter, x, y, cx, cy, uFlags)
# hWinPosInfo : HDWP -> "void*"
# hWnd : HWND -> "void*"
# hWndInsertAfter : HWND optional -> "void*"
# x : INT -> "int"
# y : INT -> "int"
# cx : INT -> "int"
# cy : INT -> "int"
# uFlags : SET_WINDOW_POS_FLAGS -> "dword"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。const std = @import("std");
extern "user32" fn DeferWindowPos(
hWinPosInfo: ?*anyopaque, // HDWP
hWnd: ?*anyopaque, // HWND
hWndInsertAfter: ?*anyopaque, // HWND optional
x: i32, // INT
y: i32, // INT
cx: i32, // INT
cy: i32, // INT
uFlags: u32 // SET_WINDOW_POS_FLAGS
) callconv(std.os.windows.WINAPI) ?*anyopaque;proc DeferWindowPos(
hWinPosInfo: pointer, # HDWP
hWnd: pointer, # HWND
hWndInsertAfter: pointer, # HWND optional
x: int32, # INT
y: int32, # INT
cx: int32, # INT
cy: int32, # INT
uFlags: uint32 # SET_WINDOW_POS_FLAGS
): pointer {.importc: "DeferWindowPos", stdcall, dynlib: "USER32.dll".}pragma(lib, "user32");
extern(Windows)
void* DeferWindowPos(
void* hWinPosInfo, // HDWP
void* hWnd, // HWND
void* hWndInsertAfter, // HWND optional
int x, // INT
int y, // INT
int cx, // INT
int cy, // INT
uint uFlags // SET_WINDOW_POS_FLAGS
);ccall((:DeferWindowPos, "USER32.dll"), stdcall, Ptr{Cvoid},
(Ptr{Cvoid}, Ptr{Cvoid}, Ptr{Cvoid}, Int32, Int32, Int32, Int32, UInt32),
hWinPosInfo, hWnd, hWndInsertAfter, x, y, cx, cy, uFlags)
# hWinPosInfo : HDWP -> Ptr{Cvoid}
# hWnd : HWND -> Ptr{Cvoid}
# hWndInsertAfter : HWND optional -> Ptr{Cvoid}
# x : INT -> Int32
# y : INT -> Int32
# cx : INT -> Int32
# cy : INT -> Int32
# uFlags : SET_WINDOW_POS_FLAGS -> UInt32
# stdcall は 32bit のみ意味を持つ(x64 では無視)。local ffi = require("ffi")
ffi.cdef[[
void* DeferWindowPos(
void* hWinPosInfo,
void* hWnd,
void* hWndInsertAfter,
int32_t x,
int32_t y,
int32_t cx,
int32_t cy,
uint32_t uFlags);
]]
local user32 = ffi.load("user32")
-- user32.DeferWindowPos(hWinPosInfo, hWnd, hWndInsertAfter, x, y, cx, cy, uFlags)
-- hWinPosInfo : HDWP
-- hWnd : HWND
-- hWndInsertAfter : HWND optional
-- x : INT
-- y : INT
-- cx : INT
-- cy : INT
-- uFlags : SET_WINDOW_POS_FLAGS
-- 構造体/GUIDへのポインタは cdef が通るよう void* で表記(実型は各引数コメント参照)。値渡し構造体・enum は対応する typedef を cdef に追加すること。const koffi = require('koffi');
const lib = koffi.load('USER32.dll');
const DeferWindowPos = lib.func('__stdcall', 'DeferWindowPos', 'void *', ['void *', 'void *', 'void *', 'int32_t', 'int32_t', 'int32_t', 'int32_t', 'uint32_t']);
// DeferWindowPos(hWinPosInfo, hWnd, hWndInsertAfter, x, y, cx, cy, uFlags)
// hWinPosInfo : HDWP -> 'void *'
// hWnd : HWND -> 'void *'
// hWndInsertAfter : HWND optional -> 'void *'
// x : INT -> 'int32_t'
// y : INT -> 'int32_t'
// cx : INT -> 'int32_t'
// cy : INT -> 'int32_t'
// uFlags : SET_WINDOW_POS_FLAGS -> 'uint32_t'
// 出力ポインタは koffi.out(...) で包む。構造体は koffi.struct で定義。const lib = Deno.dlopen("USER32.dll", {
DeferWindowPos: { parameters: ["pointer", "pointer", "pointer", "i32", "i32", "i32", "i32", "u32"], result: "pointer" },
});
// lib.symbols.DeferWindowPos(hWinPosInfo, hWnd, hWndInsertAfter, x, y, cx, cy, uFlags)
// hWinPosInfo : HDWP -> "pointer"
// hWnd : HWND -> "pointer"
// hWndInsertAfter : HWND optional -> "pointer"
// x : INT -> "i32"
// y : INT -> "i32"
// cx : INT -> "i32"
// cy : INT -> "i32"
// uFlags : SET_WINDOW_POS_FLAGS -> "u32"
// 文字列引数は "buffer"(NUL 終端のバイト列を Uint8Array で渡す)。
// 値渡し構造体は { struct: [ ...field types... ] } を使用。<?php
$ffi = FFI::cdef(<<<C
void* DeferWindowPos(
void* hWinPosInfo,
void* hWnd,
void* hWndInsertAfter,
int32_t x,
int32_t y,
int32_t cx,
int32_t cy,
uint32_t uFlags);
C, "USER32.dll");
// $ffi->DeferWindowPos(hWinPosInfo, hWnd, hWndInsertAfter, x, y, cx, cy, uFlags);
// hWinPosInfo : HDWP
// hWnd : HWND
// hWndInsertAfter : HWND optional
// x : INT
// y : INT
// cx : INT
// cy : INT
// uFlags : SET_WINDOW_POS_FLAGS
// 構造体/GUIDへのポインタは cdef が通るよう void* で表記(実型は各引数コメント参照)。値渡し構造体・enum は対応する typedef を cdef に追加すること。
// WINAPI(stdcall): x64 では呼出規約が統一されるため問題なし。x86 では __stdcall 対応のラッパが必要な場合あり。import com.sun.jna.*;
import com.sun.jna.ptr.*;
import com.sun.jna.win32.StdCallLibrary;
import com.sun.jna.win32.W32APIOptions;
public interface User32 extends StdCallLibrary {
User32 INSTANCE = Native.load("user32", User32.class);
Pointer DeferWindowPos(
Pointer hWinPosInfo, // HDWP
Pointer hWnd, // HWND
Pointer hWndInsertAfter, // HWND optional
int x, // INT
int y, // INT
int cx, // INT
int cy, // INT
int uFlags // SET_WINDOW_POS_FLAGS
);
}@[Link("user32")]
lib LibUSER32
fun DeferWindowPos = DeferWindowPos(
hWinPosInfo : Void*, # HDWP
hWnd : Void*, # HWND
hWndInsertAfter : Void*, # HWND optional
x : Int32, # INT
y : Int32, # INT
cx : Int32, # INT
cy : Int32, # INT
uFlags : UInt32 # SET_WINDOW_POS_FLAGS
) : Void*
end
# 構造体/GUID/enum は lib 内に対応する型定義が必要。
# 呼出規約: x64 は規約統一のため OK。x86(32bit)は WINAPI=stdcall だが Crystal の fun に stdcall 付与構文がなく非対応。import 'dart:ffi';
import 'package:ffi/ffi.dart';
typedef DeferWindowPosNative = Pointer<Void> Function(Pointer<Void>, Pointer<Void>, Pointer<Void>, Int32, Int32, Int32, Int32, Uint32);
typedef DeferWindowPosDart = Pointer<Void> Function(Pointer<Void>, Pointer<Void>, Pointer<Void>, int, int, int, int, int);
final DeferWindowPos = DynamicLibrary.open('USER32.dll')
.lookupFunction<DeferWindowPosNative, DeferWindowPosDart>('DeferWindowPos');
// hWinPosInfo : HDWP -> Pointer<Void>
// hWnd : HWND -> Pointer<Void>
// hWndInsertAfter : HWND optional -> Pointer<Void>
// x : INT -> Int32
// y : INT -> Int32
// cx : INT -> Int32
// cy : INT -> Int32
// uFlags : SET_WINDOW_POS_FLAGS -> Uint32
// 文字列は package:ffi の "...".toNativeUtf16()/toNativeUtf8() で変換。{$mode objfpc}{$H+}
function DeferWindowPos(
hWinPosInfo: THandle; // HDWP
hWnd: THandle; // HWND
hWndInsertAfter: THandle; // HWND optional
x: Integer; // INT
y: Integer; // INT
cx: Integer; // INT
cy: Integer; // INT
uFlags: DWORD // SET_WINDOW_POS_FLAGS
): THandle; stdcall;
external 'USER32.dll' name 'DeferWindowPos';import Foreign
import Foreign.C.Types
import Foreign.C.String
foreign import stdcall safe "DeferWindowPos"
c_DeferWindowPos :: Ptr () -> Ptr () -> Ptr () -> Int32 -> Int32 -> Int32 -> Int32 -> Word32 -> IO (Ptr ())
-- hWinPosInfo : HDWP -> Ptr ()
-- hWnd : HWND -> Ptr ()
-- hWndInsertAfter : HWND optional -> Ptr ()
-- x : INT -> Int32
-- y : INT -> Int32
-- cx : INT -> Int32
-- cy : INT -> Int32
-- uFlags : SET_WINDOW_POS_FLAGS -> Word32
-- 要 GHC(Windows)。stdcall は x64 では ccall として扱われる。ブロックする API は safe 呼び出し推奨。open Ctypes
open Foreign
let deferwindowpos =
foreign "DeferWindowPos"
((ptr void) @-> (ptr void) @-> (ptr void) @-> int32_t @-> int32_t @-> int32_t @-> int32_t @-> uint32_t @-> returning (ptr void))
(* hWinPosInfo : HDWP -> (ptr void) *)
(* hWnd : HWND -> (ptr void) *)
(* hWndInsertAfter : HWND optional -> (ptr void) *)
(* x : INT -> int32_t *)
(* y : INT -> int32_t *)
(* cx : INT -> int32_t *)
(* cy : INT -> int32_t *)
(* uFlags : SET_WINDOW_POS_FLAGS -> uint32_t *)
(* foreign は cdecl 前提。x64 Windows では WINAPI と一致。構造体は ctypes structure を定義のこと。 *)(cffi:define-foreign-library user32 (t "USER32.dll"))
(cffi:use-foreign-library user32)
(cffi:defcfun ("DeferWindowPos" defer-window-pos :convention :stdcall) :pointer
(h-win-pos-info :pointer) ; HDWP
(h-wnd :pointer) ; HWND
(h-wnd-insert-after :pointer) ; HWND optional
(x :int32) ; INT
(y :int32) ; INT
(cx :int32) ; INT
(cy :int32) ; INT
(u-flags :uint32)) ; SET_WINDOW_POS_FLAGS
; isize/usize(INT_PTR/SIZE_T)は x64 前提で :int64/:uint64。x86 では :int32/:uint32。use Win32::API;
my $DeferWindowPos = Win32::API::More->new('USER32',
'HANDLE DeferWindowPos(HANDLE hWinPosInfo, HANDLE hWnd, HANDLE hWndInsertAfter, int x, int y, int cx, int cy, DWORD uFlags)');
# my $ret = $DeferWindowPos->Call($hWinPosInfo, $hWnd, $hWndInsertAfter, $x, $y, $cx, $cy, $uFlags);
# hWinPosInfo : HDWP -> HANDLE
# hWnd : HWND -> HANDLE
# hWndInsertAfter : HWND optional -> HANDLE
# x : INT -> int
# y : INT -> int
# cx : INT -> int
# cy : INT -> int
# uFlags : SET_WINDOW_POS_FLAGS -> DWORD
# 値渡し構造体は pack() した文字列、または Win32::API::Struct を使用。関連項目
- f BeginDeferWindowPos — 複数ウィンドウ位置の一括更新処理を開始する。
- f EndDeferWindowPos — 蓄積したウィンドウ位置変更を一括適用する。
- f ShowWindow — ウィンドウの表示状態を設定する。