ホーム › Graphics.Gdi › ExcludeUpdateRgn
ExcludeUpdateRgn
関数デバイスコンテキストのクリップ領域から更新領域を除外する。
シグネチャ
// USER32.dll
#include <windows.h>
INT ExcludeUpdateRgn(
HDC hDC,
HWND hWnd
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| hDC | HDC | in |
| hWnd | HWND | in |
戻り値の型: INT
各言語での呼び出し定義
// USER32.dll
#include <windows.h>
INT ExcludeUpdateRgn(
HDC hDC,
HWND hWnd
);[DllImport("USER32.dll", ExactSpelling = true)]
static extern int ExcludeUpdateRgn(
IntPtr hDC, // HDC
IntPtr hWnd // HWND
);<DllImport("USER32.dll", ExactSpelling:=True)>
Public Shared Function ExcludeUpdateRgn(
hDC As IntPtr, ' HDC
hWnd As IntPtr ' HWND
) As Integer
End Function' hDC : HDC
' hWnd : HWND
Declare PtrSafe Function ExcludeUpdateRgn Lib "user32" ( _
ByVal hDC As LongPtr, _
ByVal hWnd As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
ExcludeUpdateRgn = ctypes.windll.user32.ExcludeUpdateRgn
ExcludeUpdateRgn.restype = ctypes.c_int
ExcludeUpdateRgn.argtypes = [
wintypes.HANDLE, # hDC : HDC
wintypes.HANDLE, # hWnd : HWND
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('USER32.dll')
ExcludeUpdateRgn = Fiddle::Function.new(
lib['ExcludeUpdateRgn'],
[
Fiddle::TYPE_VOIDP, # hDC : HDC
Fiddle::TYPE_VOIDP, # hWnd : HWND
],
Fiddle::TYPE_INT)#[link(name = "user32")]
extern "system" {
fn ExcludeUpdateRgn(
hDC: *mut core::ffi::c_void, // HDC
hWnd: *mut core::ffi::c_void // HWND
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("USER32.dll")]
public static extern int ExcludeUpdateRgn(IntPtr hDC, IntPtr hWnd);
"@
$api = Add-Type -MemberDefinition $sig -Name 'USER32_ExcludeUpdateRgn' -Namespace Win32 -PassThru
# $api::ExcludeUpdateRgn(hDC, hWnd)#uselib "USER32.dll"
#func global ExcludeUpdateRgn "ExcludeUpdateRgn" sptr, sptr
; ExcludeUpdateRgn hDC, hWnd ; 戻り値は stat
; hDC : HDC -> "sptr"
; hWnd : HWND -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "USER32.dll"
#cfunc global ExcludeUpdateRgn "ExcludeUpdateRgn" sptr, sptr
; res = ExcludeUpdateRgn(hDC, hWnd)
; hDC : HDC -> "sptr"
; hWnd : HWND -> "sptr"; INT ExcludeUpdateRgn(HDC hDC, HWND hWnd)
#uselib "USER32.dll"
#cfunc global ExcludeUpdateRgn "ExcludeUpdateRgn" intptr, intptr
; res = ExcludeUpdateRgn(hDC, hWnd)
; hDC : HDC -> "intptr"
; hWnd : HWND -> "intptr"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
user32 = windows.NewLazySystemDLL("USER32.dll")
procExcludeUpdateRgn = user32.NewProc("ExcludeUpdateRgn")
)
// hDC (HDC), hWnd (HWND)
r1, _, err := procExcludeUpdateRgn.Call(
uintptr(hDC),
uintptr(hWnd),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // INTfunction ExcludeUpdateRgn(
hDC: THandle; // HDC
hWnd: THandle // HWND
): Integer; stdcall;
external 'USER32.dll' name 'ExcludeUpdateRgn';result := DllCall("USER32\ExcludeUpdateRgn"
, "Ptr", hDC ; HDC
, "Ptr", hWnd ; HWND
, "Int") ; return: INT●ExcludeUpdateRgn(hDC, hWnd) = DLL("USER32.dll", "int ExcludeUpdateRgn(void*, void*)")
# 呼び出し: ExcludeUpdateRgn(hDC, hWnd)
# hDC : HDC -> "void*"
# hWnd : HWND -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。