ホーム › UI.Controls › GetThemeAppProperties
GetThemeAppProperties
関数現在のアプリのテーマ適用フラグを取得する。
シグネチャ
// UXTHEME.dll
#include <windows.h>
SET_THEME_APP_PROPERTIES_FLAGS GetThemeAppProperties(void);パラメーターなし。戻り値: SET_THEME_APP_PROPERTIES_FLAGS
各言語での呼び出し定義
// UXTHEME.dll
#include <windows.h>
SET_THEME_APP_PROPERTIES_FLAGS GetThemeAppProperties(void);[DllImport("UXTHEME.dll", ExactSpelling = true)]
static extern uint GetThemeAppProperties();<DllImport("UXTHEME.dll", ExactSpelling:=True)>
Public Shared Function GetThemeAppProperties() As UInteger
End FunctionDeclare PtrSafe Function GetThemeAppProperties Lib "uxtheme" () As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
GetThemeAppProperties = ctypes.windll.uxtheme.GetThemeAppProperties
GetThemeAppProperties.restype = wintypes.DWORD
GetThemeAppProperties.argtypes = []require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('UXTHEME.dll')
GetThemeAppProperties = Fiddle::Function.new(
lib['GetThemeAppProperties'],
[],
-Fiddle::TYPE_INT)#[link(name = "uxtheme")]
extern "system" {
fn GetThemeAppProperties() -> u32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("UXTHEME.dll")]
public static extern uint GetThemeAppProperties();
"@
$api = Add-Type -MemberDefinition $sig -Name 'UXTHEME_GetThemeAppProperties' -Namespace Win32 -PassThru
# $api::GetThemeAppProperties()#uselib "UXTHEME.dll"
#func global GetThemeAppProperties "GetThemeAppProperties"
; GetThemeAppProperties ; 戻り値は stat
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "UXTHEME.dll"
#cfunc global GetThemeAppProperties "GetThemeAppProperties"
; res = GetThemeAppProperties(); SET_THEME_APP_PROPERTIES_FLAGS GetThemeAppProperties()
#uselib "UXTHEME.dll"
#cfunc global GetThemeAppProperties "GetThemeAppProperties"
; res = GetThemeAppProperties()import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
uxtheme = windows.NewLazySystemDLL("UXTHEME.dll")
procGetThemeAppProperties = uxtheme.NewProc("GetThemeAppProperties")
)
r1, _, err := procGetThemeAppProperties.Call()
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // SET_THEME_APP_PROPERTIES_FLAGSfunction GetThemeAppProperties: DWORD; stdcall;
external 'UXTHEME.dll' name 'GetThemeAppProperties';result := DllCall("UXTHEME\GetThemeAppProperties", "UInt")●GetThemeAppProperties() = DLL("UXTHEME.dll", "dword GetThemeAppProperties()")
# 呼び出し: GetThemeAppProperties()
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。