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

REBARBANDINFOW

構造体
サイズx64: 128 バイト / x86: 100 バイト

サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。

フィールド

フィールドサイズx64x86説明
cbSizeDWORD4+0+0この構造体のサイズをバイト単位で指定する。
fMaskDWORD4+4+4有効なメンバーを示すRBBIM_系マスクフラグの組み合わせ。
fStyleDWORD4+8+8バンドの表示スタイルを示すRBBS_系フラグ。
clrForeCOLORREF4+12+12バンドの前景色。COLORREF形式。
clrBackCOLORREF4+16+16バンドの背景色。COLORREF形式。
lpTextLPWSTR8/4+24+20バンドに表示するテキストへのポインタ。
cchDWORD4+32+24lpTextバッファの文字数。
iImageINT4+36+28バンドのイメージリスト内アイコンインデックス。
hwndChildHWND8/4+40+32バンドに含める子ウィンドウのハンドル。
cxMinChildDWORD4+48+36子ウィンドウの最小幅(ピクセル)。
cyMinChildDWORD4+52+40子ウィンドウの最小高さ(ピクセル)。
cxDWORD4+56+44バンドの幅(ピクセル)。
hbmBackHBITMAP8/4+64+48バンドの背景ビットマップのハンドル。
wIDDWORD4+72+52バンドの識別子。
cyChildDWORD4+76+56バンドの理想高さ(ピクセル)。可変高さバンドで使う。
cyMaxChildDWORD4+80+60バンドの最大高さ(ピクセル)。
cyIntegralDWORD4+84+64バンド高さの増分単位(ピクセル)。
cxIdealDWORD4+88+68バンドの最大有効幅(理想幅、ピクセル)。
lParamLPARAM8/4+96+72バンドに関連付けるアプリケーション定義データ。
cxHeaderDWORD4+104+76バンドヘッダの幅(ピクセル)。
rcChevronLocationRECT16+108+80シェブロン(続きボタン)の位置を表すRECT。
uChevronStateDWORD4+124+96シェブロンの状態を示すフラグ。

各言語での定義

#include <windows.h>

// RECT  (x64 16 / x86 16 バイト)
typedef struct RECT {
    INT left;
    INT top;
    INT right;
    INT bottom;
} RECT;

// REBARBANDINFOW  (x64 128 / x86 100 バイト)
typedef struct REBARBANDINFOW {
    DWORD cbSize;
    DWORD fMask;
    DWORD fStyle;
    COLORREF clrFore;
    COLORREF clrBack;
    LPWSTR lpText;
    DWORD cch;
    INT iImage;
    HWND hwndChild;
    DWORD cxMinChild;
    DWORD cyMinChild;
    DWORD cx;
    HBITMAP hbmBack;
    DWORD wID;
    DWORD cyChild;
    DWORD cyMaxChild;
    DWORD cyIntegral;
    DWORD cxIdeal;
    LPARAM lParam;
    DWORD cxHeader;
    RECT rcChevronLocation;
    DWORD uChevronState;
} REBARBANDINFOW;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct RECT
{
    public int left;
    public int top;
    public int right;
    public int bottom;
}

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct REBARBANDINFOW
{
    public uint cbSize;
    public uint fMask;
    public uint fStyle;
    public uint clrFore;
    public uint clrBack;
    public IntPtr lpText;
    public uint cch;
    public int iImage;
    public IntPtr hwndChild;
    public uint cxMinChild;
    public uint cyMinChild;
    public uint cx;
    public IntPtr hbmBack;
    public uint wID;
    public uint cyChild;
    public uint cyMaxChild;
    public uint cyIntegral;
    public uint cxIdeal;
    public IntPtr lParam;
    public uint cxHeader;
    public RECT rcChevronLocation;
    public uint uChevronState;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure RECT
    Public left As Integer
    Public top As Integer
    Public right As Integer
    Public bottom As Integer
End Structure

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure REBARBANDINFOW
    Public cbSize As UInteger
    Public fMask As UInteger
    Public fStyle As UInteger
    Public clrFore As UInteger
    Public clrBack As UInteger
    Public lpText As IntPtr
    Public cch As UInteger
    Public iImage As Integer
    Public hwndChild As IntPtr
    Public cxMinChild As UInteger
    Public cyMinChild As UInteger
    Public cx As UInteger
    Public hbmBack As IntPtr
    Public wID As UInteger
    Public cyChild As UInteger
    Public cyMaxChild As UInteger
    Public cyIntegral As UInteger
    Public cxIdeal As UInteger
    Public lParam As IntPtr
    Public cxHeader As UInteger
    Public rcChevronLocation As RECT
    Public uChevronState As UInteger
End Structure
import ctypes
from ctypes import wintypes

class RECT(ctypes.Structure):
    _fields_ = [
        ("left", ctypes.c_int),
        ("top", ctypes.c_int),
        ("right", ctypes.c_int),
        ("bottom", ctypes.c_int),
    ]

class REBARBANDINFOW(ctypes.Structure):
    _fields_ = [
        ("cbSize", wintypes.DWORD),
        ("fMask", wintypes.DWORD),
        ("fStyle", wintypes.DWORD),
        ("clrFore", wintypes.DWORD),
        ("clrBack", wintypes.DWORD),
        ("lpText", ctypes.c_void_p),
        ("cch", wintypes.DWORD),
        ("iImage", ctypes.c_int),
        ("hwndChild", ctypes.c_void_p),
        ("cxMinChild", wintypes.DWORD),
        ("cyMinChild", wintypes.DWORD),
        ("cx", wintypes.DWORD),
        ("hbmBack", ctypes.c_void_p),
        ("wID", wintypes.DWORD),
        ("cyChild", wintypes.DWORD),
        ("cyMaxChild", wintypes.DWORD),
        ("cyIntegral", wintypes.DWORD),
        ("cxIdeal", wintypes.DWORD),
        ("lParam", ctypes.c_ssize_t),
        ("cxHeader", wintypes.DWORD),
        ("rcChevronLocation", RECT),
        ("uChevronState", wintypes.DWORD),
    ]
#[repr(C)]
pub struct RECT {
    pub left: i32,
    pub top: i32,
    pub right: i32,
    pub bottom: i32,
}

#[repr(C)]
pub struct REBARBANDINFOW {
    pub cbSize: u32,
    pub fMask: u32,
    pub fStyle: u32,
    pub clrFore: u32,
    pub clrBack: u32,
    pub lpText: *mut core::ffi::c_void,
    pub cch: u32,
    pub iImage: i32,
    pub hwndChild: *mut core::ffi::c_void,
    pub cxMinChild: u32,
    pub cyMinChild: u32,
    pub cx: u32,
    pub hbmBack: *mut core::ffi::c_void,
    pub wID: u32,
    pub cyChild: u32,
    pub cyMaxChild: u32,
    pub cyIntegral: u32,
    pub cxIdeal: u32,
    pub lParam: isize,
    pub cxHeader: u32,
    pub rcChevronLocation: RECT,
    pub uChevronState: u32,
}
import "golang.org/x/sys/windows"

type RECT struct {
	left int32
	top int32
	right int32
	bottom int32
}

type REBARBANDINFOW struct {
	cbSize uint32
	fMask uint32
	fStyle uint32
	clrFore uint32
	clrBack uint32
	lpText uintptr
	cch uint32
	iImage int32
	hwndChild uintptr
	cxMinChild uint32
	cyMinChild uint32
	cx uint32
	hbmBack uintptr
	wID uint32
	cyChild uint32
	cyMaxChild uint32
	cyIntegral uint32
	cxIdeal uint32
	lParam uintptr
	cxHeader uint32
	rcChevronLocation RECT
	uChevronState uint32
}
type
  RECT = record
    left: Integer;
    top: Integer;
    right: Integer;
    bottom: Integer;
  end;

  REBARBANDINFOW = record
    cbSize: DWORD;
    fMask: DWORD;
    fStyle: DWORD;
    clrFore: DWORD;
    clrBack: DWORD;
    lpText: Pointer;
    cch: DWORD;
    iImage: Integer;
    hwndChild: Pointer;
    cxMinChild: DWORD;
    cyMinChild: DWORD;
    cx: DWORD;
    hbmBack: Pointer;
    wID: DWORD;
    cyChild: DWORD;
    cyMaxChild: DWORD;
    cyIntegral: DWORD;
    cxIdeal: DWORD;
    lParam: NativeInt;
    cxHeader: DWORD;
    rcChevronLocation: RECT;
    uChevronState: DWORD;
  end;
const RECT = extern struct {
    left: i32,
    top: i32,
    right: i32,
    bottom: i32,
};

const REBARBANDINFOW = extern struct {
    cbSize: u32,
    fMask: u32,
    fStyle: u32,
    clrFore: u32,
    clrBack: u32,
    lpText: ?*anyopaque,
    cch: u32,
    iImage: i32,
    hwndChild: ?*anyopaque,
    cxMinChild: u32,
    cyMinChild: u32,
    cx: u32,
    hbmBack: ?*anyopaque,
    wID: u32,
    cyChild: u32,
    cyMaxChild: u32,
    cyIntegral: u32,
    cxIdeal: u32,
    lParam: isize,
    cxHeader: u32,
    rcChevronLocation: RECT,
    uChevronState: u32,
};
type
  RECT {.bycopy.} = object
    left: int32
    top: int32
    right: int32
    bottom: int32

  REBARBANDINFOW {.bycopy.} = object
    cbSize: uint32
    fMask: uint32
    fStyle: uint32
    clrFore: uint32
    clrBack: uint32
    lpText: pointer
    cch: uint32
    iImage: int32
    hwndChild: pointer
    cxMinChild: uint32
    cyMinChild: uint32
    cx: uint32
    hbmBack: pointer
    wID: uint32
    cyChild: uint32
    cyMaxChild: uint32
    cyIntegral: uint32
    cxIdeal: uint32
    lParam: int
    cxHeader: uint32
    rcChevronLocation: RECT
    uChevronState: uint32
struct RECT
{
    int left;
    int top;
    int right;
    int bottom;
}

struct REBARBANDINFOW
{
    uint cbSize;
    uint fMask;
    uint fStyle;
    uint clrFore;
    uint clrBack;
    void* lpText;
    uint cch;
    int iImage;
    void* hwndChild;
    uint cxMinChild;
    uint cyMinChild;
    uint cx;
    void* hbmBack;
    uint wID;
    uint cyChild;
    uint cyMaxChild;
    uint cyIntegral;
    uint cxIdeal;
    ptrdiff_t lParam;
    uint cxHeader;
    RECT rcChevronLocation;
    uint uChevronState;
}

HSP用 定義

HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。

; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; REBARBANDINFOW サイズ: 100 バイト(x86)
dim st, 25    ; 4byte整数×25(構造体サイズ 100 / 4 切り上げ)
; cbSize : DWORD (+0, 4byte)  st.0 = 値  /  値 = st.0   (lpoke/lpeek も可)
; fMask : DWORD (+4, 4byte)  st.1 = 値  /  値 = st.1   (lpoke/lpeek も可)
; fStyle : DWORD (+8, 4byte)  st.2 = 値  /  値 = st.2   (lpoke/lpeek も可)
; clrFore : COLORREF (+12, 4byte)  st.3 = 値  /  値 = st.3   (lpoke/lpeek も可)
; clrBack : COLORREF (+16, 4byte)  st.4 = 値  /  値 = st.4   (lpoke/lpeek も可)
; lpText : LPWSTR (+20, 4byte)  st.5 = 値  /  値 = st.5   (lpoke/lpeek も可)
; cch : DWORD (+24, 4byte)  st.6 = 値  /  値 = st.6   (lpoke/lpeek も可)
; iImage : INT (+28, 4byte)  st.7 = 値  /  値 = st.7   (lpoke/lpeek も可)
; hwndChild : HWND (+32, 4byte)  st.8 = 値  /  値 = st.8   (lpoke/lpeek も可)
; cxMinChild : DWORD (+36, 4byte)  st.9 = 値  /  値 = st.9   (lpoke/lpeek も可)
; cyMinChild : DWORD (+40, 4byte)  st.10 = 値  /  値 = st.10   (lpoke/lpeek も可)
; cx : DWORD (+44, 4byte)  st.11 = 値  /  値 = st.11   (lpoke/lpeek も可)
; hbmBack : HBITMAP (+48, 4byte)  st.12 = 値  /  値 = st.12   (lpoke/lpeek も可)
; wID : DWORD (+52, 4byte)  st.13 = 値  /  値 = st.13   (lpoke/lpeek も可)
; cyChild : DWORD (+56, 4byte)  st.14 = 値  /  値 = st.14   (lpoke/lpeek も可)
; cyMaxChild : DWORD (+60, 4byte)  st.15 = 値  /  値 = st.15   (lpoke/lpeek も可)
; cyIntegral : DWORD (+64, 4byte)  st.16 = 値  /  値 = st.16   (lpoke/lpeek も可)
; cxIdeal : DWORD (+68, 4byte)  st.17 = 値  /  値 = st.17   (lpoke/lpeek も可)
; lParam : LPARAM (+72, 4byte)  st.18 = 値  /  値 = st.18   (lpoke/lpeek も可)
; cxHeader : DWORD (+76, 4byte)  st.19 = 値  /  値 = st.19   (lpoke/lpeek も可)
; rcChevronLocation : RECT (+80, 16byte)  varptr(st)+80 を基点に操作(16byte:入れ子/配列)
; uChevronState : DWORD (+96, 4byte)  st.24 = 値  /  値 = st.24   (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; REBARBANDINFOW サイズ: 128 バイト(x64)
dim st, 32    ; 4byte整数×32(構造体サイズ 128 / 4 切り上げ)
; cbSize : DWORD (+0, 4byte)  st.0 = 値  /  値 = st.0   (lpoke/lpeek も可)
; fMask : DWORD (+4, 4byte)  st.1 = 値  /  値 = st.1   (lpoke/lpeek も可)
; fStyle : DWORD (+8, 4byte)  st.2 = 値  /  値 = st.2   (lpoke/lpeek も可)
; clrFore : COLORREF (+12, 4byte)  st.3 = 値  /  値 = st.3   (lpoke/lpeek も可)
; clrBack : COLORREF (+16, 4byte)  st.4 = 値  /  値 = st.4   (lpoke/lpeek も可)
; lpText : LPWSTR (+24, 8byte)  qpoke st,24,値 / qpeek(st,24)  ※IronHSPのみ。3.7/3.8は lpoke st,24,下位 : lpoke st,28,上位
; cch : DWORD (+32, 4byte)  st.8 = 値  /  値 = st.8   (lpoke/lpeek も可)
; iImage : INT (+36, 4byte)  st.9 = 値  /  値 = st.9   (lpoke/lpeek も可)
; hwndChild : HWND (+40, 8byte)  qpoke st,40,値 / qpeek(st,40)  ※IronHSPのみ。3.7/3.8は lpoke st,40,下位 : lpoke st,44,上位
; cxMinChild : DWORD (+48, 4byte)  st.12 = 値  /  値 = st.12   (lpoke/lpeek も可)
; cyMinChild : DWORD (+52, 4byte)  st.13 = 値  /  値 = st.13   (lpoke/lpeek も可)
; cx : DWORD (+56, 4byte)  st.14 = 値  /  値 = st.14   (lpoke/lpeek も可)
; hbmBack : HBITMAP (+64, 8byte)  qpoke st,64,値 / qpeek(st,64)  ※IronHSPのみ。3.7/3.8は lpoke st,64,下位 : lpoke st,68,上位
; wID : DWORD (+72, 4byte)  st.18 = 値  /  値 = st.18   (lpoke/lpeek も可)
; cyChild : DWORD (+76, 4byte)  st.19 = 値  /  値 = st.19   (lpoke/lpeek も可)
; cyMaxChild : DWORD (+80, 4byte)  st.20 = 値  /  値 = st.20   (lpoke/lpeek も可)
; cyIntegral : DWORD (+84, 4byte)  st.21 = 値  /  値 = st.21   (lpoke/lpeek も可)
; cxIdeal : DWORD (+88, 4byte)  st.22 = 値  /  値 = st.22   (lpoke/lpeek も可)
; lParam : LPARAM (+96, 8byte)  qpoke st,96,値 / qpeek(st,96)  ※IronHSPのみ。3.7/3.8は lpoke st,96,下位 : lpoke st,100,上位
; cxHeader : DWORD (+104, 4byte)  st.26 = 値  /  値 = st.26   (lpoke/lpeek も可)
; rcChevronLocation : RECT (+108, 16byte)  varptr(st)+108 を基点に操作(16byte:入れ子/配列)
; uChevronState : DWORD (+124, 4byte)  st.31 = 値  /  値 = st.31   (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
; ※GUID・入れ子構造体はデフォルト型でないため、依存する #defstruct を先に定義(下記に同梱)。
#defstruct global RECT
    #field int left
    #field int top
    #field int right
    #field int bottom
#endstruct

#defstruct global REBARBANDINFOW
    #field int cbSize
    #field int fMask
    #field int fStyle
    #field int clrFore
    #field int clrBack
    #field intptr lpText
    #field int cch
    #field int iImage
    #field intptr hwndChild
    #field int cxMinChild
    #field int cyMinChild
    #field int cx
    #field intptr hbmBack
    #field int wID
    #field int cyChild
    #field int cyMaxChild
    #field int cyIntegral
    #field int cxIdeal
    #field intptr lParam
    #field int cxHeader
    #field RECT rcChevronLocation
    #field int uChevronState
#endstruct

stdim st, REBARBANDINFOW        ; NSTRUCT 変数を確保
st->cbSize = 100
mes "cbSize=" + st->cbSize