ホーム › UI.Controls.RichEdit › HYPHRESULT
HYPHRESULT
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| khyph | KHYPH | 4 | +0 | +0 | ハイフネーションの種別を示すKHYPH値である。 |
| ichHyph | INT | 4 | +4 | +4 | ハイフンを挿入する文字位置のインデックスである。 |
| chHyph | WCHAR | 2 | +8 | +8 | 挿入するハイフン文字である。 |
各言語での定義
#include <windows.h>
// HYPHRESULT (x64 12 / x86 12 バイト)
typedef struct HYPHRESULT {
KHYPH khyph;
INT ichHyph;
WCHAR chHyph;
} HYPHRESULT;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct HYPHRESULT
{
public int khyph;
public int ichHyph;
public char chHyph;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure HYPHRESULT
Public khyph As Integer
Public ichHyph As Integer
Public chHyph As Char
End Structureimport ctypes
from ctypes import wintypes
class HYPHRESULT(ctypes.Structure):
_fields_ = [
("khyph", ctypes.c_int),
("ichHyph", ctypes.c_int),
("chHyph", ctypes.c_wchar),
]#[repr(C)]
pub struct HYPHRESULT {
pub khyph: i32,
pub ichHyph: i32,
pub chHyph: u16,
}import "golang.org/x/sys/windows"
type HYPHRESULT struct {
khyph int32
ichHyph int32
chHyph uint16
}type
HYPHRESULT = record
khyph: Integer;
ichHyph: Integer;
chHyph: WideChar;
end;const HYPHRESULT = extern struct {
khyph: i32,
ichHyph: i32,
chHyph: u16,
};type
HYPHRESULT {.bycopy.} = object
khyph: int32
ichHyph: int32
chHyph: uint16struct HYPHRESULT
{
int khyph;
int ichHyph;
wchar chHyph;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; HYPHRESULT サイズ: 12 バイト(x64)
dim st, 3 ; 4byte整数×3(構造体サイズ 12 / 4 切り上げ)
; khyph : KHYPH (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; ichHyph : INT (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; chHyph : WCHAR (+8, 2byte) wpoke st,8,値 / 値 = wpeek(st,8)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global HYPHRESULT
#field int khyph
#field int ichHyph
#field short chHyph
#endstruct
stdim st, HYPHRESULT ; NSTRUCT 変数を確保
st->khyph = 100
mes "khyph=" + st->khyph