ホーム › UI.WindowsAndMessaging › FLASHWINFO
FLASHWINFO
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| cbSize | DWORD | 4 | +0 | +0 | この構造体のサイズ(バイト数)である。 |
| hwnd | HWND | 8/4 | +8 | +4 | 点滅させるウィンドウのハンドルである。 |
| dwFlags | FLASHWINFO_FLAGS | 4 | +16 | +8 | 点滅の状態を制御するフラグである(FLASHW_ALL、FLASHW_STOP など)。 |
| uCount | DWORD | 4 | +20 | +12 | ウィンドウを点滅させる回数である。 |
| dwTimeout | DWORD | 4 | +24 | +16 | 点滅の周期(ミリ秒)である。0 を指定すると既定のカーソル点滅周期が使われる。 |
各言語での定義
#include <windows.h>
// FLASHWINFO (x64 32 / x86 20 バイト)
typedef struct FLASHWINFO {
DWORD cbSize;
HWND hwnd;
FLASHWINFO_FLAGS dwFlags;
DWORD uCount;
DWORD dwTimeout;
} FLASHWINFO;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct FLASHWINFO
{
public uint cbSize;
public IntPtr hwnd;
public uint dwFlags;
public uint uCount;
public uint dwTimeout;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure FLASHWINFO
Public cbSize As UInteger
Public hwnd As IntPtr
Public dwFlags As UInteger
Public uCount As UInteger
Public dwTimeout As UInteger
End Structureimport ctypes
from ctypes import wintypes
class FLASHWINFO(ctypes.Structure):
_fields_ = [
("cbSize", wintypes.DWORD),
("hwnd", ctypes.c_void_p),
("dwFlags", wintypes.DWORD),
("uCount", wintypes.DWORD),
("dwTimeout", wintypes.DWORD),
]#[repr(C)]
pub struct FLASHWINFO {
pub cbSize: u32,
pub hwnd: *mut core::ffi::c_void,
pub dwFlags: u32,
pub uCount: u32,
pub dwTimeout: u32,
}import "golang.org/x/sys/windows"
type FLASHWINFO struct {
cbSize uint32
hwnd uintptr
dwFlags uint32
uCount uint32
dwTimeout uint32
}type
FLASHWINFO = record
cbSize: DWORD;
hwnd: Pointer;
dwFlags: DWORD;
uCount: DWORD;
dwTimeout: DWORD;
end;const FLASHWINFO = extern struct {
cbSize: u32,
hwnd: ?*anyopaque,
dwFlags: u32,
uCount: u32,
dwTimeout: u32,
};type
FLASHWINFO {.bycopy.} = object
cbSize: uint32
hwnd: pointer
dwFlags: uint32
uCount: uint32
dwTimeout: uint32struct FLASHWINFO
{
uint cbSize;
void* hwnd;
uint dwFlags;
uint uCount;
uint dwTimeout;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; FLASHWINFO サイズ: 20 バイト(x86)
dim st, 5 ; 4byte整数×5(構造体サイズ 20 / 4 切り上げ)
; cbSize : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; hwnd : HWND (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; dwFlags : FLASHWINFO_FLAGS (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; uCount : DWORD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; dwTimeout : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; FLASHWINFO サイズ: 32 バイト(x64)
dim st, 8 ; 4byte整数×8(構造体サイズ 32 / 4 切り上げ)
; cbSize : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; hwnd : HWND (+8, 8byte) qpoke st,8,値 / qpeek(st,8) ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; dwFlags : FLASHWINFO_FLAGS (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; uCount : DWORD (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; dwTimeout : DWORD (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global FLASHWINFO
#field int cbSize
#field intptr hwnd
#field int dwFlags
#field int uCount
#field int dwTimeout
#endstruct
stdim st, FLASHWINFO ; NSTRUCT 変数を確保
st->cbSize = 100
mes "cbSize=" + st->cbSize