ホーム › UI.Controls › IsThemeDialogTextureEnabled
IsThemeDialogTextureEnabled
関数ダイアログのテーマテクスチャが有効かどうかを判定する。
シグネチャ
// UXTHEME.dll
#include <windows.h>
BOOL IsThemeDialogTextureEnabled(
HWND hwnd
);パラメーター
| 名前 | 型 | 方向 | 説明 |
|---|---|---|---|
| hwnd | HWND | in | ダイアログウィンドウを指定する HWND 値。 |
戻り値の型: BOOL
公式ドキュメント
指定されたダイアログウィンドウが背景テクスチャリングをサポートしているかどうかを報告します。
戻り値
型: BOOL
次のいずれかの値を返します。
| 戻り値 | 説明 |
|---|---|
|
hwnd パラメーターで指定されたダイアログウィンドウで背景テクスチャリングがサポートされています。 |
|
hwnd パラメーターで指定されたダイアログウィンドウで背景テクスチャリングがサポートされていません。 |
出典・ライセンス: 上記「公式ドキュメント」の内容は Microsoft の Win32 API ドキュメント(MicrosoftDocs/sdk-api)を日本語に翻訳・改変したものです。© Microsoft Corporation. CC BY 4.0 で提供。
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
各言語での呼び出し定義
// UXTHEME.dll
#include <windows.h>
BOOL IsThemeDialogTextureEnabled(
HWND hwnd
);[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("UXTHEME.dll", ExactSpelling = true)]
static extern bool IsThemeDialogTextureEnabled(
IntPtr hwnd // HWND
);<DllImport("UXTHEME.dll", ExactSpelling:=True)>
Public Shared Function IsThemeDialogTextureEnabled(
hwnd As IntPtr ' HWND
) As <MarshalAs(UnmanagedType.Bool)> Boolean
End Function' hwnd : HWND
Declare PtrSafe Function IsThemeDialogTextureEnabled 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
IsThemeDialogTextureEnabled = ctypes.windll.uxtheme.IsThemeDialogTextureEnabled
IsThemeDialogTextureEnabled.restype = wintypes.BOOL
IsThemeDialogTextureEnabled.argtypes = [
wintypes.HANDLE, # hwnd : HWND
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('UXTHEME.dll')
IsThemeDialogTextureEnabled = Fiddle::Function.new(
lib['IsThemeDialogTextureEnabled'],
[
Fiddle::TYPE_VOIDP, # hwnd : HWND
],
Fiddle::TYPE_INT)#[link(name = "uxtheme")]
extern "system" {
fn IsThemeDialogTextureEnabled(
hwnd: *mut core::ffi::c_void // HWND
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("UXTHEME.dll")]
public static extern bool IsThemeDialogTextureEnabled(IntPtr hwnd);
"@
$api = Add-Type -MemberDefinition $sig -Name 'UXTHEME_IsThemeDialogTextureEnabled' -Namespace Win32 -PassThru
# $api::IsThemeDialogTextureEnabled(hwnd)#uselib "UXTHEME.dll"
#func global IsThemeDialogTextureEnabled "IsThemeDialogTextureEnabled" sptr
; IsThemeDialogTextureEnabled hwnd ; 戻り値は stat
; hwnd : HWND -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "UXTHEME.dll"
#cfunc global IsThemeDialogTextureEnabled "IsThemeDialogTextureEnabled" sptr
; res = IsThemeDialogTextureEnabled(hwnd)
; hwnd : HWND -> "sptr"; BOOL IsThemeDialogTextureEnabled(HWND hwnd)
#uselib "UXTHEME.dll"
#cfunc global IsThemeDialogTextureEnabled "IsThemeDialogTextureEnabled" intptr
; res = IsThemeDialogTextureEnabled(hwnd)
; hwnd : HWND -> "intptr"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
uxtheme = windows.NewLazySystemDLL("UXTHEME.dll")
procIsThemeDialogTextureEnabled = uxtheme.NewProc("IsThemeDialogTextureEnabled")
)
// hwnd (HWND)
r1, _, err := procIsThemeDialogTextureEnabled.Call(
uintptr(hwnd),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // BOOLfunction IsThemeDialogTextureEnabled(
hwnd: THandle // HWND
): BOOL; stdcall;
external 'UXTHEME.dll' name 'IsThemeDialogTextureEnabled';result := DllCall("UXTHEME\IsThemeDialogTextureEnabled"
, "Ptr", hwnd ; HWND
, "Int") ; return: BOOL●IsThemeDialogTextureEnabled(hwnd) = DLL("UXTHEME.dll", "bool IsThemeDialogTextureEnabled(void*)")
# 呼び出し: IsThemeDialogTextureEnabled(hwnd)
# hwnd : HWND -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。const std = @import("std");
extern "uxtheme" fn IsThemeDialogTextureEnabled(
hwnd: ?*anyopaque // HWND
) callconv(std.os.windows.WINAPI) i32;proc IsThemeDialogTextureEnabled(
hwnd: pointer # HWND
): int32 {.importc: "IsThemeDialogTextureEnabled", stdcall, dynlib: "UXTHEME.dll".}pragma(lib, "uxtheme");
extern(Windows)
int IsThemeDialogTextureEnabled(
void* hwnd // HWND
);ccall((:IsThemeDialogTextureEnabled, "UXTHEME.dll"), stdcall, Int32,
(Ptr{Cvoid},),
hwnd)
# hwnd : HWND -> Ptr{Cvoid}
# stdcall は 32bit のみ意味を持つ(x64 では無視)。local ffi = require("ffi")
ffi.cdef[[
int32_t IsThemeDialogTextureEnabled(
void* hwnd);
]]
local uxtheme = ffi.load("uxtheme")
-- uxtheme.IsThemeDialogTextureEnabled(hwnd)
-- hwnd : HWND
-- 構造体/GUIDへのポインタは cdef が通るよう void* で表記(実型は各引数コメント参照)。値渡し構造体・enum は対応する typedef を cdef に追加すること。const koffi = require('koffi');
const lib = koffi.load('UXTHEME.dll');
const IsThemeDialogTextureEnabled = lib.func('__stdcall', 'IsThemeDialogTextureEnabled', 'int32_t', ['void *']);
// IsThemeDialogTextureEnabled(hwnd)
// hwnd : HWND -> 'void *'
// 出力ポインタは koffi.out(...) で包む。構造体は koffi.struct で定義。const lib = Deno.dlopen("UXTHEME.dll", {
IsThemeDialogTextureEnabled: { parameters: ["pointer"], result: "i32" },
});
// lib.symbols.IsThemeDialogTextureEnabled(hwnd)
// hwnd : HWND -> "pointer"
// 文字列引数は "buffer"(NUL 終端のバイト列を Uint8Array で渡す)。
// 値渡し構造体は { struct: [ ...field types... ] } を使用。<?php
$ffi = FFI::cdef(<<<C
int32_t IsThemeDialogTextureEnabled(
void* hwnd);
C, "UXTHEME.dll");
// $ffi->IsThemeDialogTextureEnabled(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);
boolean IsThemeDialogTextureEnabled(
Pointer hwnd // HWND
);
}@[Link("uxtheme")]
lib LibUXTHEME
fun IsThemeDialogTextureEnabled = IsThemeDialogTextureEnabled(
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 IsThemeDialogTextureEnabledNative = Int32 Function(Pointer<Void>);
typedef IsThemeDialogTextureEnabledDart = int Function(Pointer<Void>);
final IsThemeDialogTextureEnabled = DynamicLibrary.open('UXTHEME.dll')
.lookupFunction<IsThemeDialogTextureEnabledNative, IsThemeDialogTextureEnabledDart>('IsThemeDialogTextureEnabled');
// hwnd : HWND -> Pointer<Void>
// 文字列は package:ffi の "...".toNativeUtf16()/toNativeUtf8() で変換。{$mode objfpc}{$H+}
function IsThemeDialogTextureEnabled(
hwnd: THandle // HWND
): BOOL; stdcall;
external 'UXTHEME.dll' name 'IsThemeDialogTextureEnabled';import Foreign
import Foreign.C.Types
import Foreign.C.String
foreign import stdcall safe "IsThemeDialogTextureEnabled"
c_IsThemeDialogTextureEnabled :: Ptr () -> IO CInt
-- hwnd : HWND -> Ptr ()
-- 要 GHC(Windows)。stdcall は x64 では ccall として扱われる。ブロックする API は safe 呼び出し推奨。open Ctypes
open Foreign
let isthemedialogtextureenabled =
foreign "IsThemeDialogTextureEnabled"
((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 ("IsThemeDialogTextureEnabled" is-theme-dialog-texture-enabled :convention :stdcall) :int32
(hwnd :pointer)) ; HWND
; isize/usize(INT_PTR/SIZE_T)は x64 前提で :int64/:uint64。x86 では :int32/:uint32。use Win32::API;
my $IsThemeDialogTextureEnabled = Win32::API::More->new('UXTHEME',
'BOOL IsThemeDialogTextureEnabled(HANDLE hwnd)');
# my $ret = $IsThemeDialogTextureEnabled->Call($hwnd);
# hwnd : HWND -> HANDLE
# 値渡し構造体は pack() した文字列、または Win32::API::Struct を使用。