ホーム › UI.Controls.RichEdit › TABLEROWPARMS
TABLEROWPARMS
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| cbRow | BYTE | 1 | +0 | +0 | この行構造体のバイトサイズ。 |
| cbCell | BYTE | 1 | +1 | +1 | セル構造体1個のバイトサイズ。 |
| cCell | BYTE | 1 | +2 | +2 | 行内のセル数。 |
| cRow | BYTE | 1 | +3 | +3 | 行数。 |
| dxCellMargin | INT | 4 | +4 | +4 | セルの余白(twips)。 |
| dxIndent | INT | 4 | +8 | +8 | 行のインデント(twips)。 |
| dyHeight | INT | 4 | +12 | +12 | 行の高さ(twips)。 |
| _bitfield | DWORD | 4 | +16 | +16 | 配置や境界などの行属性を格納するビットフィールド。 |
| cpStartRow | INT | 4 | +20 | +20 | 行の開始文字位置。 |
| bTableLevel | BYTE | 1 | +24 | +24 | ネストされたテーブルの階層レベル。 |
| iCell | BYTE | 1 | +25 | +25 | 現在処理中のセルのインデックス。 |
各言語での定義
#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 Structureimport 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: uint8struct 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