ホーム › UI.Controls › LVGROUPMETRICS
LVGROUPMETRICS
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| cbSize | DWORD | 4 | +0 | +0 | LVGROUPMETRICS 構造体のサイズです。 | ||||||||||
| mask | DWORD | 4 | +4 | +4 | どのメンバーが有効なデータを格納しているか、または有効なデータを受け取るかを指定するフラグです。次の値の 1 つ以上を指定できます。
| ||||||||||
| 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 | 左境界線の色を指定します。実装されていません。 | ||||||||||
| crTop | COLORREF | 4 | +28 | +28 | 上境界線の色を指定します。実装されていません。 | ||||||||||
| crRight | COLORREF | 4 | +32 | +32 | 右境界線の色を指定します。実装されていません。 | ||||||||||
| crBottom | COLORREF | 4 | +36 | +36 | 下境界線の色を指定します。実装されていません。 | ||||||||||
| crHeader | COLORREF | 4 | +40 | +40 | ヘッダーテキストの色を指定します。実装されていません。 | ||||||||||
| crFooter | COLORREF | 4 | +44 | +44 | フッターテキストの色を指定します。実装されていません。 |
公式ドキュメント
リストビューコントロールにおけるグループの表示に関する情報を格納します。
解説(Remarks)
境界線の幅は、アイテムが配置される領域の余白を決定します。上境界線はユーザーがその上にカーソルを移動すると強調表示され、複数選択が可能なリストでこの境界線をクリックすると、グループ内のすべてのアイテムが選択されます。
出典・ライセンス: 上記「公式ドキュメント」の内容は Microsoft の Win32 API ドキュメント(MicrosoftDocs/sdk-api)を日本語に翻訳・改変したものです。© Microsoft Corporation. CC BY 4.0 で提供。
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
各言語での定義
#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