ホーム › UI.TabletPC › RECO_GUIDE
RECO_GUIDE
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| xOrigin | INT | 4 | +0 | +0 | ガイド領域の原点のX座標。 |
| yOrigin | INT | 4 | +4 | +4 | ガイド領域の原点のY座標。 |
| cxBox | INT | 4 | +8 | +8 | 各ボックスの幅。 |
| cyBox | INT | 4 | +12 | +12 | 各ボックスの高さ。 |
| cxBase | INT | 4 | +16 | +16 | ボックス内の基線(横)の位置。 |
| cyBase | INT | 4 | +20 | +20 | ボックス内の基線(縦)の位置。 |
| cHorzBox | INT | 4 | +24 | +24 | 水平方向のボックス数。 |
| cVertBox | INT | 4 | +28 | +28 | 垂直方向のボックス数。 |
| cyMid | INT | 4 | +32 | +32 | ボックス内の中線の縦位置。 |
各言語での定義
#include <windows.h>
// RECO_GUIDE (x64 36 / x86 36 バイト)
typedef struct RECO_GUIDE {
INT xOrigin;
INT yOrigin;
INT cxBox;
INT cyBox;
INT cxBase;
INT cyBase;
INT cHorzBox;
INT cVertBox;
INT cyMid;
} RECO_GUIDE;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct RECO_GUIDE
{
public int xOrigin;
public int yOrigin;
public int cxBox;
public int cyBox;
public int cxBase;
public int cyBase;
public int cHorzBox;
public int cVertBox;
public int cyMid;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure RECO_GUIDE
Public xOrigin As Integer
Public yOrigin As Integer
Public cxBox As Integer
Public cyBox As Integer
Public cxBase As Integer
Public cyBase As Integer
Public cHorzBox As Integer
Public cVertBox As Integer
Public cyMid As Integer
End Structureimport ctypes
from ctypes import wintypes
class RECO_GUIDE(ctypes.Structure):
_fields_ = [
("xOrigin", ctypes.c_int),
("yOrigin", ctypes.c_int),
("cxBox", ctypes.c_int),
("cyBox", ctypes.c_int),
("cxBase", ctypes.c_int),
("cyBase", ctypes.c_int),
("cHorzBox", ctypes.c_int),
("cVertBox", ctypes.c_int),
("cyMid", ctypes.c_int),
]#[repr(C)]
pub struct RECO_GUIDE {
pub xOrigin: i32,
pub yOrigin: i32,
pub cxBox: i32,
pub cyBox: i32,
pub cxBase: i32,
pub cyBase: i32,
pub cHorzBox: i32,
pub cVertBox: i32,
pub cyMid: i32,
}import "golang.org/x/sys/windows"
type RECO_GUIDE struct {
xOrigin int32
yOrigin int32
cxBox int32
cyBox int32
cxBase int32
cyBase int32
cHorzBox int32
cVertBox int32
cyMid int32
}type
RECO_GUIDE = record
xOrigin: Integer;
yOrigin: Integer;
cxBox: Integer;
cyBox: Integer;
cxBase: Integer;
cyBase: Integer;
cHorzBox: Integer;
cVertBox: Integer;
cyMid: Integer;
end;const RECO_GUIDE = extern struct {
xOrigin: i32,
yOrigin: i32,
cxBox: i32,
cyBox: i32,
cxBase: i32,
cyBase: i32,
cHorzBox: i32,
cVertBox: i32,
cyMid: i32,
};type
RECO_GUIDE {.bycopy.} = object
xOrigin: int32
yOrigin: int32
cxBox: int32
cyBox: int32
cxBase: int32
cyBase: int32
cHorzBox: int32
cVertBox: int32
cyMid: int32struct RECO_GUIDE
{
int xOrigin;
int yOrigin;
int cxBox;
int cyBox;
int cxBase;
int cyBase;
int cHorzBox;
int cVertBox;
int cyMid;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; RECO_GUIDE サイズ: 36 バイト(x64)
dim st, 9 ; 4byte整数×9(構造体サイズ 36 / 4 切り上げ)
; xOrigin : INT (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; yOrigin : INT (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; cxBox : INT (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; cyBox : INT (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; cxBase : INT (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; cyBase : INT (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; cHorzBox : INT (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; cVertBox : INT (+28, 4byte) st.7 = 値 / 値 = st.7 (lpoke/lpeek も可)
; cyMid : INT (+32, 4byte) st.8 = 値 / 値 = st.8 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global RECO_GUIDE
#field int xOrigin
#field int yOrigin
#field int cxBox
#field int cyBox
#field int cxBase
#field int cyBase
#field int cHorzBox
#field int cVertBox
#field int cyMid
#endstruct
stdim st, RECO_GUIDE ; NSTRUCT 変数を確保
st->xOrigin = 100
mes "xOrigin=" + st->xOrigin