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

BufferedPaintStopAllAnimations

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

シグネチャ

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

HRESULT BufferedPaintStopAllAnimations(
    HWND hwnd
);

パラメーター

名前方向説明
hwndHWNDinすべてのアニメーションを停止する対象ウィンドウのハンドル。

戻り値の型: HRESULT

公式ドキュメント

指定したウィンドウのバッファリングされたアニメーションをすべて停止します。

戻り値

型: HRESULT

この関数が成功した場合は S_OK を返します。それ以外の場合は HRESULT エラーコードを返します。

出典・ライセンス: 上記「公式ドキュメント」の内容は Microsoft の Win32 API ドキュメント(MicrosoftDocs/sdk-api)を日本語に翻訳・改変したものです。© Microsoft Corporation. CC BY 4.0 で提供。
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)

各言語での呼び出し定義

// 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)。
const std = @import("std");

extern "uxtheme" fn BufferedPaintStopAllAnimations(
    hwnd: ?*anyopaque // HWND
) callconv(std.os.windows.WINAPI) i32;
proc BufferedPaintStopAllAnimations(
    hwnd: pointer  # HWND
): int32 {.importc: "BufferedPaintStopAllAnimations", stdcall, dynlib: "UXTHEME.dll".}
pragma(lib, "uxtheme");
extern(Windows)
int BufferedPaintStopAllAnimations(
    void* hwnd   // HWND
);
ccall((:BufferedPaintStopAllAnimations, "UXTHEME.dll"), stdcall, Int32,
      (Ptr{Cvoid},),
      hwnd)
# hwnd : HWND -> Ptr{Cvoid}
# stdcall は 32bit のみ意味を持つ(x64 では無視)。
local ffi = require("ffi")
ffi.cdef[[
int32_t BufferedPaintStopAllAnimations(
    void* hwnd);
]]
local uxtheme = ffi.load("uxtheme")
-- uxtheme.BufferedPaintStopAllAnimations(hwnd)
-- hwnd : HWND
-- 構造体/GUIDへのポインタは cdef が通るよう void* で表記(実型は各引数コメント参照)。値渡し構造体・enum は対応する typedef を cdef に追加すること。
const koffi = require('koffi');
const lib = koffi.load('UXTHEME.dll');
const BufferedPaintStopAllAnimations = lib.func('__stdcall', 'BufferedPaintStopAllAnimations', 'int32_t', ['void *']);
// BufferedPaintStopAllAnimations(hwnd)
// hwnd : HWND -> 'void *'
// 出力ポインタは koffi.out(...) で包む。構造体は koffi.struct で定義。
const lib = Deno.dlopen("UXTHEME.dll", {
  BufferedPaintStopAllAnimations: { parameters: ["pointer"], result: "i32" },
});
// lib.symbols.BufferedPaintStopAllAnimations(hwnd)
// hwnd : HWND -> "pointer"
// 文字列引数は "buffer"(NUL 終端のバイト列を Uint8Array で渡す)。
// 値渡し構造体は { struct: [ ...field types... ] } を使用。
<?php
$ffi = FFI::cdef(<<<C
int32_t BufferedPaintStopAllAnimations(
    void* hwnd);
C, "UXTHEME.dll");
// $ffi->BufferedPaintStopAllAnimations(hwnd);
// hwnd : HWND
// 構造体/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 Uxtheme extends StdCallLibrary {
    Uxtheme INSTANCE = Native.load("uxtheme", Uxtheme.class);
    int BufferedPaintStopAllAnimations(
        Pointer hwnd   // HWND
    );
}
@[Link("uxtheme")]
lib LibUXTHEME
  fun BufferedPaintStopAllAnimations = BufferedPaintStopAllAnimations(
    hwnd : Void*   # HWND
  ) : Int32
end
# 構造体/GUID/enum は lib 内に対応する型定義が必要。
# 呼出規約: x64 は規約統一のため OK。x86(32bit)は WINAPI=stdcall だが Crystal の fun に stdcall 付与構文がなく非対応。
import 'dart:ffi';
import 'package:ffi/ffi.dart';

typedef BufferedPaintStopAllAnimationsNative = Int32 Function(Pointer<Void>);
typedef BufferedPaintStopAllAnimationsDart = int Function(Pointer<Void>);
final BufferedPaintStopAllAnimations = DynamicLibrary.open('UXTHEME.dll')
    .lookupFunction<BufferedPaintStopAllAnimationsNative, BufferedPaintStopAllAnimationsDart>('BufferedPaintStopAllAnimations');
// hwnd : HWND -> Pointer<Void>
// 文字列は package:ffi の "...".toNativeUtf16()/toNativeUtf8() で変換。
{$mode objfpc}{$H+}
function BufferedPaintStopAllAnimations(
  hwnd: THandle   // HWND
): Integer; stdcall;
  external 'UXTHEME.dll' name 'BufferedPaintStopAllAnimations';
import Foreign
import Foreign.C.Types
import Foreign.C.String

foreign import stdcall safe "BufferedPaintStopAllAnimations"
  c_BufferedPaintStopAllAnimations :: Ptr () -> IO Int32
-- hwnd : HWND -> Ptr ()
-- 要 GHC(Windows)。stdcall は x64 では ccall として扱われる。ブロックする API は safe 呼び出し推奨。
open Ctypes
open Foreign

let bufferedpaintstopallanimations =
  foreign "BufferedPaintStopAllAnimations"
    ((ptr void) @-> returning int32_t)
(* hwnd : HWND -> (ptr void) *)
(* foreign は cdecl 前提。x64 Windows では WINAPI と一致。構造体は ctypes structure を定義のこと。 *)
(cffi:define-foreign-library uxtheme (t "UXTHEME.dll"))
(cffi:use-foreign-library uxtheme)

(cffi:defcfun ("BufferedPaintStopAllAnimations" buffered-paint-stop-all-animations :convention :stdcall) :int32
  (hwnd :pointer))   ; HWND
; isize/usize(INT_PTR/SIZE_T)は x64 前提で :int64/:uint64。x86 では :int32/:uint32。
use Win32::API;
my $BufferedPaintStopAllAnimations = Win32::API::More->new('UXTHEME',
    'int BufferedPaintStopAllAnimations(HANDLE hwnd)');
# my $ret = $BufferedPaintStopAllAnimations->Call($hwnd);
# hwnd : HWND -> HANDLE
# 値渡し構造体は pack() した文字列、または Win32::API::Struct を使用。