Win32 API 日本語リファレンス
ホームUI.Controls › BufferedPaintStopAllAnimations

BufferedPaintStopAllAnimations

関数
ウィンドウのバッファ描画アニメーションをすべて停止する。
DLLUXTHEME.dll呼出規約winapi対応OSWindows Vista 以降

シグネチャ

// UXTHEME.dll
#include <windows.h>

HRESULT BufferedPaintStopAllAnimations(
    HWND hwnd
);

パラメーター

名前方向
hwndHWNDin

戻り値の型: HRESULT

各言語での呼び出し定義

// UXTHEME.dll
#include <windows.h>

HRESULT BufferedPaintStopAllAnimations(
    HWND hwnd
);
[DllImport("UXTHEME.dll", ExactSpelling = true)]
static extern int BufferedPaintStopAllAnimations(
    IntPtr hwnd   // HWND
);
<DllImport("UXTHEME.dll", ExactSpelling:=True)>
Public Shared Function BufferedPaintStopAllAnimations(
    hwnd As IntPtr   ' HWND
) As Integer
End Function
' hwnd : HWND
Declare PtrSafe Function BufferedPaintStopAllAnimations Lib "uxtheme" ( _
    ByVal hwnd As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。
import ctypes
from ctypes import wintypes

BufferedPaintStopAllAnimations = ctypes.windll.uxtheme.BufferedPaintStopAllAnimations
BufferedPaintStopAllAnimations.restype = ctypes.c_int
BufferedPaintStopAllAnimations.argtypes = [
    wintypes.HANDLE,  # hwnd : HWND
]
require 'fiddle'
require 'fiddle/import'

lib = Fiddle.dlopen('UXTHEME.dll')
BufferedPaintStopAllAnimations = Fiddle::Function.new(
  lib['BufferedPaintStopAllAnimations'],
  [
    Fiddle::TYPE_VOIDP,  # hwnd : HWND
  ],
  Fiddle::TYPE_INT)
#[link(name = "uxtheme")]
extern "system" {
    fn BufferedPaintStopAllAnimations(
        hwnd: *mut core::ffi::c_void  // HWND
    ) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.
$sig = @"
[DllImport("UXTHEME.dll")]
public static extern int BufferedPaintStopAllAnimations(IntPtr hwnd);
"@
$api = Add-Type -MemberDefinition $sig -Name 'UXTHEME_BufferedPaintStopAllAnimations' -Namespace Win32 -PassThru
# $api::BufferedPaintStopAllAnimations(hwnd)
#uselib "UXTHEME.dll"
#func global BufferedPaintStopAllAnimations "BufferedPaintStopAllAnimations" sptr
; BufferedPaintStopAllAnimations hwnd   ; 戻り値は stat
; hwnd : HWND -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。
#uselib "UXTHEME.dll"
#cfunc global BufferedPaintStopAllAnimations "BufferedPaintStopAllAnimations" sptr
; res = BufferedPaintStopAllAnimations(hwnd)
; hwnd : HWND -> "sptr"
; HRESULT BufferedPaintStopAllAnimations(HWND hwnd)
#uselib "UXTHEME.dll"
#cfunc global BufferedPaintStopAllAnimations "BufferedPaintStopAllAnimations" intptr
; res = BufferedPaintStopAllAnimations(hwnd)
; hwnd : HWND -> "intptr"
import (
	"golang.org/x/sys/windows"
	"unsafe"
)

var (
	uxtheme = windows.NewLazySystemDLL("UXTHEME.dll")
	procBufferedPaintStopAllAnimations = uxtheme.NewProc("BufferedPaintStopAllAnimations")
)

// hwnd (HWND)
r1, _, err := procBufferedPaintStopAllAnimations.Call(
	uintptr(hwnd),
)
_ = err  // syscall.Errno (valid when the call sets last-error)
_ = r1   // HRESULT
function BufferedPaintStopAllAnimations(
  hwnd: THandle   // HWND
): Integer; stdcall;
  external 'UXTHEME.dll' name 'BufferedPaintStopAllAnimations';
result := DllCall("UXTHEME\BufferedPaintStopAllAnimations"
    , "Ptr", hwnd   ; HWND
    , "Int")   ; return: HRESULT
●BufferedPaintStopAllAnimations(hwnd) = DLL("UXTHEME.dll", "int BufferedPaintStopAllAnimations(void*)")
# 呼び出し: BufferedPaintStopAllAnimations(hwnd)
# hwnd : HWND -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。