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

TABLEROWPARMS

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

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

フィールド

フィールドサイズx64x86説明
cbRowBYTE1+0+0この構造体のバイト数。
cbCellBYTE1+1+1TABLECELLPARMS のバイト数。
cCellBYTE1+2+2行内のセルの数。MAX_TABLE_CELLS で指定される最大値までです。
cRowBYTE1+3+3行の数。
dxCellMarginINT4+4+4セル内の左右の余白のサイズ ( rgaph)。
dxIndentINT4+8+8左インデントの量。fRTL メンバーが TRUE の場合は右インデントの量です ( rleft に相当)。
dyHeightINT4+12+12行の高さ ( rrh)。
_bitfieldDWORD4+16+16配置や境界などの行属性を格納するビットフィールド。
cpStartRowINT4+20+20テーブルを挿入する位置を示す文字位置。値が –1 の場合は、選択範囲の文字位置を示します。
bTableLevelBYTE1+24+24テーブルの入れ子のレベル (EM_GETTABLEPARMS のみ)。
iCellBYTE1+25+25挿入または削除するセルのインデックス (EM_SETTABLEPARMS のみ)。

公式ドキュメント

テーブル内の行の属性を定義します。この定義には、対応するリッチテキスト形式 (RTF) の制御ワードが含まれます。制御ワードは Rich Text Format (RTF) Specification で定義されています。

出典・ライセンス: 上記「公式ドキュメント」の内容は Microsoft の Win32 API ドキュメント(MicrosoftDocs/sdk-api)を日本語に翻訳・改変したものです。© Microsoft Corporation. CC BY 4.0 で提供。
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)

各言語での定義

#include <windows.h>

// TABLEROWPARMS  (x64 28 / x86 28 バイト)
typedef struct TABLEROWPARMS {
    BYTE cbRow;
    BYTE cbCell;
    BYTE cCell;
    BYTE cRow;
    INT dxCellMargin;
    INT dxIndent;
    INT dyHeight;
    DWORD _bitfield;
    INT cpStartRow;
    BYTE bTableLevel;
    BYTE iCell;
} TABLEROWPARMS;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct TABLEROWPARMS
{
    public byte cbRow;
    public byte cbCell;
    public byte cCell;
    public byte cRow;
    public int dxCellMargin;
    public int dxIndent;
    public int dyHeight;
    public uint _bitfield;
    public int cpStartRow;
    public byte bTableLevel;
    public byte iCell;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure TABLEROWPARMS
    Public cbRow As Byte
    Public cbCell As Byte
    Public cCell As Byte
    Public cRow As Byte
    Public dxCellMargin As Integer
    Public dxIndent As Integer
    Public dyHeight As Integer
    Public _bitfield As UInteger
    Public cpStartRow As Integer
    Public bTableLevel As Byte
    Public iCell As Byte
End Structure
import ctypes
from ctypes import wintypes

class TABLEROWPARMS(ctypes.Structure):
    _fields_ = [
        ("cbRow", ctypes.c_ubyte),
        ("cbCell", ctypes.c_ubyte),
        ("cCell", ctypes.c_ubyte),
        ("cRow", ctypes.c_ubyte),
        ("dxCellMargin", ctypes.c_int),
        ("dxIndent", ctypes.c_int),
        ("dyHeight", ctypes.c_int),
        ("_bitfield", wintypes.DWORD),
        ("cpStartRow", ctypes.c_int),
        ("bTableLevel", ctypes.c_ubyte),
        ("iCell", ctypes.c_ubyte),
    ]
#[repr(C)]
pub struct TABLEROWPARMS {
    pub cbRow: u8,
    pub cbCell: u8,
    pub cCell: u8,
    pub cRow: u8,
    pub dxCellMargin: i32,
    pub dxIndent: i32,
    pub dyHeight: i32,
    pub _bitfield: u32,
    pub cpStartRow: i32,
    pub bTableLevel: u8,
    pub iCell: u8,
}
import "golang.org/x/sys/windows"

type TABLEROWPARMS struct {
	cbRow byte
	cbCell byte
	cCell byte
	cRow byte
	dxCellMargin int32
	dxIndent int32
	dyHeight int32
	_bitfield uint32
	cpStartRow int32
	bTableLevel byte
	iCell byte
}
type
  TABLEROWPARMS = record
    cbRow: Byte;
    cbCell: Byte;
    cCell: Byte;
    cRow: Byte;
    dxCellMargin: Integer;
    dxIndent: Integer;
    dyHeight: Integer;
    _bitfield: DWORD;
    cpStartRow: Integer;
    bTableLevel: Byte;
    iCell: Byte;
  end;
const TABLEROWPARMS = extern struct {
    cbRow: u8,
    cbCell: u8,
    cCell: u8,
    cRow: u8,
    dxCellMargin: i32,
    dxIndent: i32,
    dyHeight: i32,
    _bitfield: u32,
    cpStartRow: i32,
    bTableLevel: u8,
    iCell: u8,
};
type
  TABLEROWPARMS {.bycopy.} = object
    cbRow: uint8
    cbCell: uint8
    cCell: uint8
    cRow: uint8
    dxCellMargin: int32
    dxIndent: int32
    dyHeight: int32
    _bitfield: uint32
    cpStartRow: int32
    bTableLevel: uint8
    iCell: uint8
struct TABLEROWPARMS
{
    ubyte cbRow;
    ubyte cbCell;
    ubyte cCell;
    ubyte cRow;
    int dxCellMargin;
    int dxIndent;
    int dyHeight;
    uint _bitfield;
    int cpStartRow;
    ubyte bTableLevel;
    ubyte iCell;
}

HSP用 定義

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

; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; TABLEROWPARMS サイズ: 28 バイト(x64)
dim st, 7    ; 4byte整数×7(構造体サイズ 28 / 4 切り上げ)
; cbRow : BYTE (+0, 1byte)  poke st,0,値  /  値 = peek(st,0)
; cbCell : BYTE (+1, 1byte)  poke st,1,値  /  値 = peek(st,1)
; cCell : BYTE (+2, 1byte)  poke st,2,値  /  値 = peek(st,2)
; cRow : BYTE (+3, 1byte)  poke st,3,値  /  値 = peek(st,3)
; dxCellMargin : INT (+4, 4byte)  st.1 = 値  /  値 = st.1   (lpoke/lpeek も可)
; dxIndent : INT (+8, 4byte)  st.2 = 値  /  値 = st.2   (lpoke/lpeek も可)
; dyHeight : INT (+12, 4byte)  st.3 = 値  /  値 = st.3   (lpoke/lpeek も可)
; _bitfield : DWORD (+16, 4byte)  st.4 = 値  /  値 = st.4   (lpoke/lpeek も可)
; cpStartRow : INT (+20, 4byte)  st.5 = 値  /  値 = st.5   (lpoke/lpeek も可)
; bTableLevel : BYTE (+24, 1byte)  poke st,24,値  /  値 = peek(st,24)
; iCell : BYTE (+25, 1byte)  poke st,25,値  /  値 = peek(st,25)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global TABLEROWPARMS
    #field byte cbRow
    #field byte cbCell
    #field byte cCell
    #field byte cRow
    #field int dxCellMargin
    #field int dxIndent
    #field int dyHeight
    #field int _bitfield
    #field int cpStartRow
    #field byte bTableLevel
    #field byte iCell
#endstruct

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