ホーム › UI.WindowsAndMessaging › EndDeferWindowPos
EndDeferWindowPos
関数蓄積したウィンドウ位置変更を一括適用する。
シグネチャ
// USER32.dll
#include <windows.h>
BOOL EndDeferWindowPos(
HDWP hWinPosInfo
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| hWinPosInfo | HDWP | in |
戻り値の型: BOOL
各言語での呼び出し定義
// USER32.dll
#include <windows.h>
BOOL EndDeferWindowPos(
HDWP hWinPosInfo
);[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("USER32.dll", SetLastError = true, ExactSpelling = true)]
static extern bool EndDeferWindowPos(
IntPtr hWinPosInfo // HDWP
);<DllImport("USER32.dll", SetLastError:=True, ExactSpelling:=True)>
Public Shared Function EndDeferWindowPos(
hWinPosInfo As IntPtr ' HDWP
) As Boolean
End Function' hWinPosInfo : HDWP
Declare PtrSafe Function EndDeferWindowPos Lib "user32" ( _
ByVal hWinPosInfo As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
EndDeferWindowPos = ctypes.windll.user32.EndDeferWindowPos
EndDeferWindowPos.restype = wintypes.BOOL
EndDeferWindowPos.argtypes = [
wintypes.HANDLE, # hWinPosInfo : HDWP
]
# GetLastError: use ctypes.GetLastError() (or ctypes.WinDLL(use_last_error=True))require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('USER32.dll')
EndDeferWindowPos = Fiddle::Function.new(
lib['EndDeferWindowPos'],
[
Fiddle::TYPE_VOIDP, # hWinPosInfo : HDWP
],
Fiddle::TYPE_INT)#[link(name = "user32")]
extern "system" {
fn EndDeferWindowPos(
hWinPosInfo: *mut core::ffi::c_void // HDWP
) -> 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 EndDeferWindowPos(IntPtr hWinPosInfo);
"@
$api = Add-Type -MemberDefinition $sig -Name 'USER32_EndDeferWindowPos' -Namespace Win32 -PassThru
# $api::EndDeferWindowPos(hWinPosInfo)#uselib "USER32.dll"
#func global EndDeferWindowPos "EndDeferWindowPos" sptr
; EndDeferWindowPos hWinPosInfo ; 戻り値は stat
; hWinPosInfo : HDWP -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "USER32.dll"
#cfunc global EndDeferWindowPos "EndDeferWindowPos" sptr
; res = EndDeferWindowPos(hWinPosInfo)
; hWinPosInfo : HDWP -> "sptr"; BOOL EndDeferWindowPos(HDWP hWinPosInfo)
#uselib "USER32.dll"
#cfunc global EndDeferWindowPos "EndDeferWindowPos" intptr
; res = EndDeferWindowPos(hWinPosInfo)
; hWinPosInfo : HDWP -> "intptr"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
user32 = windows.NewLazySystemDLL("USER32.dll")
procEndDeferWindowPos = user32.NewProc("EndDeferWindowPos")
)
// hWinPosInfo (HDWP)
r1, _, err := procEndDeferWindowPos.Call(
uintptr(hWinPosInfo),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // BOOLfunction EndDeferWindowPos(
hWinPosInfo: THandle // HDWP
): BOOL; stdcall;
external 'USER32.dll' name 'EndDeferWindowPos';result := DllCall("USER32\EndDeferWindowPos"
, "Ptr", hWinPosInfo ; HDWP
, "Int") ; return: BOOL●EndDeferWindowPos(hWinPosInfo) = DLL("USER32.dll", "bool EndDeferWindowPos(void*)")
# 呼び出し: EndDeferWindowPos(hWinPosInfo)
# hWinPosInfo : HDWP -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。