ホーム › UI.Controls › LVGROUPMETRICS
LVGROUPMETRICS
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| cbSize | DWORD | 4 | +0 | +0 | この構造体のサイズをバイト単位で指定する。 |
| mask | DWORD | 4 | +4 | +4 | 有効なメンバーを示すLVGMF_系マスクフラグの組み合わせ。 |
| Left | DWORD | 4 | +8 | +8 | グループの左余白(ピクセル)。 |
| Top | DWORD | 4 | +12 | +12 | グループの上余白(ピクセル)。 |
| Right | DWORD | 4 | +16 | +16 | グループの右余白(ピクセル)。 |
| Bottom | DWORD | 4 | +20 | +20 | グループの下余白(ピクセル)。 |
| crLeft | COLORREF | 4 | +24 | +24 | 左境界線の色。COLORREF形式。 |
| crTop | COLORREF | 4 | +28 | +28 | 上境界線の色。COLORREF形式。 |
| crRight | COLORREF | 4 | +32 | +32 | 右境界線の色。COLORREF形式。 |
| crBottom | COLORREF | 4 | +36 | +36 | 下境界線の色。COLORREF形式。 |
| crHeader | COLORREF | 4 | +40 | +40 | ヘッダ背景の色。COLORREF形式。 |
| crFooter | COLORREF | 4 | +44 | +44 | フッタ背景の色。COLORREF形式。 |
各言語での定義
#include <windows.h>
// LVGROUPMETRICS (x64 48 / x86 48 バイト)
typedef struct LVGROUPMETRICS {
DWORD cbSize;
DWORD mask;
DWORD Left;
DWORD Top;
DWORD Right;
DWORD Bottom;
COLORREF crLeft;
COLORREF crTop;
COLORREF crRight;
COLORREF crBottom;
COLORREF crHeader;
COLORREF crFooter;
} LVGROUPMETRICS;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct LVGROUPMETRICS
{
public uint cbSize;
public uint mask;
public uint Left;
public uint Top;
public uint Right;
public uint Bottom;
public uint crLeft;
public uint crTop;
public uint crRight;
public uint crBottom;
public uint crHeader;
public uint crFooter;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure LVGROUPMETRICS
Public cbSize As UInteger
Public mask As UInteger
Public Left As UInteger
Public Top As UInteger
Public Right As UInteger
Public Bottom As UInteger
Public crLeft As UInteger
Public crTop As UInteger
Public crRight As UInteger
Public crBottom As UInteger
Public crHeader As UInteger
Public crFooter As UInteger
End Structureimport ctypes
from ctypes import wintypes
class LVGROUPMETRICS(ctypes.Structure):
_fields_ = [
("cbSize", wintypes.DWORD),
("mask", wintypes.DWORD),
("Left", wintypes.DWORD),
("Top", wintypes.DWORD),
("Right", wintypes.DWORD),
("Bottom", wintypes.DWORD),
("crLeft", wintypes.DWORD),
("crTop", wintypes.DWORD),
("crRight", wintypes.DWORD),
("crBottom", wintypes.DWORD),
("crHeader", wintypes.DWORD),
("crFooter", wintypes.DWORD),
]#[repr(C)]
pub struct LVGROUPMETRICS {
pub cbSize: u32,
pub mask: u32,
pub Left: u32,
pub Top: u32,
pub Right: u32,
pub Bottom: u32,
pub crLeft: u32,
pub crTop: u32,
pub crRight: u32,
pub crBottom: u32,
pub crHeader: u32,
pub crFooter: u32,
}import "golang.org/x/sys/windows"
type LVGROUPMETRICS struct {
cbSize uint32
mask uint32
Left uint32
Top uint32
Right uint32
Bottom uint32
crLeft uint32
crTop uint32
crRight uint32
crBottom uint32
crHeader uint32
crFooter uint32
}type
LVGROUPMETRICS = record
cbSize: DWORD;
mask: DWORD;
Left: DWORD;
Top: DWORD;
Right: DWORD;
Bottom: DWORD;
crLeft: DWORD;
crTop: DWORD;
crRight: DWORD;
crBottom: DWORD;
crHeader: DWORD;
crFooter: DWORD;
end;const LVGROUPMETRICS = extern struct {
cbSize: u32,
mask: u32,
Left: u32,
Top: u32,
Right: u32,
Bottom: u32,
crLeft: u32,
crTop: u32,
crRight: u32,
crBottom: u32,
crHeader: u32,
crFooter: u32,
};type
LVGROUPMETRICS {.bycopy.} = object
cbSize: uint32
mask: uint32
Left: uint32
Top: uint32
Right: uint32
Bottom: uint32
crLeft: uint32
crTop: uint32
crRight: uint32
crBottom: uint32
crHeader: uint32
crFooter: uint32struct LVGROUPMETRICS
{
uint cbSize;
uint mask;
uint Left;
uint Top;
uint Right;
uint Bottom;
uint crLeft;
uint crTop;
uint crRight;
uint crBottom;
uint crHeader;
uint crFooter;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; LVGROUPMETRICS サイズ: 48 バイト(x64)
dim st, 12 ; 4byte整数×12(構造体サイズ 48 / 4 切り上げ)
; cbSize : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; mask : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; Left : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; Top : DWORD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; Right : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; Bottom : DWORD (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; crLeft : COLORREF (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; crTop : COLORREF (+28, 4byte) st.7 = 値 / 値 = st.7 (lpoke/lpeek も可)
; crRight : COLORREF (+32, 4byte) st.8 = 値 / 値 = st.8 (lpoke/lpeek も可)
; crBottom : COLORREF (+36, 4byte) st.9 = 値 / 値 = st.9 (lpoke/lpeek も可)
; crHeader : COLORREF (+40, 4byte) st.10 = 値 / 値 = st.10 (lpoke/lpeek も可)
; crFooter : COLORREF (+44, 4byte) st.11 = 値 / 値 = st.11 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global LVGROUPMETRICS
#field int cbSize
#field int mask
#field int Left
#field int Top
#field int Right
#field int Bottom
#field int crLeft
#field int crTop
#field int crRight
#field int crBottom
#field int crHeader
#field int crFooter
#endstruct
stdim st, LVGROUPMETRICS ; NSTRUCT 変数を確保
st->cbSize = 100
mes "cbSize=" + st->cbSize