ホーム › Graphics.Dwm › DWM_BLURBEHIND
DWM_BLURBEHIND
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| dwFlags | DWORD | 4 | +0 | +0 | 有効なメンバを示すDWM_BB_*ビットフラグの組み合わせ。 |
| fEnable | BOOL | 4 | +4 | +4 | ウィンドウ背後のぼかし効果を有効にするかを示すブール値。 |
| hRgnBlur | HRGN | 8/4 | +8 | +8 | ぼかしを適用する領域を指定するリージョンハンドル。NULLで全域。 |
| fTransitionOnMaximized | BOOL | 4 | +16 | +12 | 最大化時に色をぼかしに合わせて遷移させるかを示すブール値。 |
各言語での定義
#include <windows.h>
// DWM_BLURBEHIND (x64 20 / x86 16 バイト)
#pragma pack(push, 1)
typedef struct DWM_BLURBEHIND {
DWORD dwFlags;
BOOL fEnable;
HRGN hRgnBlur;
BOOL fTransitionOnMaximized;
} DWM_BLURBEHIND;
#pragma pack(pop)using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, Pack = 1, CharSet = CharSet.Unicode)]
public struct DWM_BLURBEHIND
{
public uint dwFlags;
[MarshalAs(UnmanagedType.Bool)] public bool fEnable;
public IntPtr hRgnBlur;
[MarshalAs(UnmanagedType.Bool)] public bool fTransitionOnMaximized;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, Pack:=1, CharSet:=CharSet.Unicode)>
Public Structure DWM_BLURBEHIND
Public dwFlags As UInteger
<MarshalAs(UnmanagedType.Bool)> Public fEnable As Boolean
Public hRgnBlur As IntPtr
<MarshalAs(UnmanagedType.Bool)> Public fTransitionOnMaximized As Boolean
End Structureimport ctypes
from ctypes import wintypes
class DWM_BLURBEHIND(ctypes.Structure):
_pack_ = 1
_fields_ = [
("dwFlags", wintypes.DWORD),
("fEnable", wintypes.BOOL),
("hRgnBlur", ctypes.c_void_p),
("fTransitionOnMaximized", wintypes.BOOL),
]#[repr(C, packed(1))]
pub struct DWM_BLURBEHIND {
pub dwFlags: u32,
pub fEnable: i32,
pub hRgnBlur: *mut core::ffi::c_void,
pub fTransitionOnMaximized: i32,
}import "golang.org/x/sys/windows"
type DWM_BLURBEHIND struct {
dwFlags uint32
fEnable int32
hRgnBlur uintptr
fTransitionOnMaximized int32
}type
DWM_BLURBEHIND = packed record
dwFlags: DWORD;
fEnable: BOOL;
hRgnBlur: Pointer;
fTransitionOnMaximized: BOOL;
end;const DWM_BLURBEHIND = extern struct {
dwFlags: u32,
fEnable: i32,
hRgnBlur: ?*anyopaque,
fTransitionOnMaximized: i32,
};type
DWM_BLURBEHIND {.packed.} = object
dwFlags: uint32
fEnable: int32
hRgnBlur: pointer
fTransitionOnMaximized: int32align(1)
struct DWM_BLURBEHIND
{
uint dwFlags;
int fEnable;
void* hRgnBlur;
int fTransitionOnMaximized;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; DWM_BLURBEHIND サイズ: 16 バイト(x86)
dim st, 4 ; 4byte整数×4(構造体サイズ 16 / 4 切り上げ)
; dwFlags : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; fEnable : BOOL (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; hRgnBlur : HRGN (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; fTransitionOnMaximized : BOOL (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; DWM_BLURBEHIND サイズ: 20 バイト(x64)
dim st, 5 ; 4byte整数×5(構造体サイズ 20 / 4 切り上げ)
; dwFlags : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; fEnable : BOOL (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; hRgnBlur : HRGN (+8, 8byte) qpoke st,8,値 / qpeek(st,8) ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; fTransitionOnMaximized : BOOL (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global DWM_BLURBEHIND, pack=1
#field int dwFlags
#field bool fEnable
#field intptr hRgnBlur
#field bool fTransitionOnMaximized
#endstruct
stdim st, DWM_BLURBEHIND ; NSTRUCT 変数を確保
st->dwFlags = 100
mes "dwFlags=" + st->dwFlags