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