ホーム › UI.Input.Ime › IMEAPPLETCFG
IMEAPPLETCFG
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| dwConfig | DWORD | 4 | +0 | +0 | IPACFG_* フラグの組み合わせです。
| ||||||||||||||||
| wchTitle | WCHAR | 128 | +4 | +4 | アプレットのタイトル (Unicode)。 | ||||||||||||||||
| wchTitleFontFace | WCHAR | 64 | +132 | +132 | アプレットのタイトルの FontFace 名です。 | ||||||||||||||||
| dwCharSet | DWORD | 4 | +196 | +196 | アプレットのフォントの文字セットです。 | ||||||||||||||||
| iCategory | INT | 4 | +200 | +200 | 使用されません。 | ||||||||||||||||
| hIcon | HICON | 8/4 | +208 | +204 | ImePad アプレットのメニュー用のアイコンハンドルです。 | ||||||||||||||||
| langID | WORD | 2 | +216 | +208 | アプレットの言語 ID です。 | ||||||||||||||||
| dummy | WORD | 2 | +218 | +210 | 使用されません。 | ||||||||||||||||
| lReserved1 | LPARAM | 8/4 | +224 | +212 | 予約済みです。 |
公式ドキュメント
IImePad におけるアプレットの構成を指定および設定するために使用します。
出典・ライセンス: 上記「公式ドキュメント」の内容は 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>
// IMEAPPLETCFG (x64 232 / x86 216 バイト)
typedef struct IMEAPPLETCFG {
DWORD dwConfig;
WCHAR wchTitle[64];
WCHAR wchTitleFontFace[32];
DWORD dwCharSet;
INT iCategory;
HICON hIcon;
WORD langID;
WORD dummy;
LPARAM lReserved1;
} IMEAPPLETCFG;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct IMEAPPLETCFG
{
public uint dwConfig;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 64)] public string wchTitle;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)] public string wchTitleFontFace;
public uint dwCharSet;
public int iCategory;
public IntPtr hIcon;
public ushort langID;
public ushort dummy;
public IntPtr lReserved1;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure IMEAPPLETCFG
Public dwConfig As UInteger
<MarshalAs(UnmanagedType.ByValTStr, SizeConst:=64)> Public wchTitle As String
<MarshalAs(UnmanagedType.ByValTStr, SizeConst:=32)> Public wchTitleFontFace As String
Public dwCharSet As UInteger
Public iCategory As Integer
Public hIcon As IntPtr
Public langID As UShort
Public dummy As UShort
Public lReserved1 As IntPtr
End Structureimport ctypes
from ctypes import wintypes
class IMEAPPLETCFG(ctypes.Structure):
_fields_ = [
("dwConfig", wintypes.DWORD),
("wchTitle", ctypes.c_wchar * 64),
("wchTitleFontFace", ctypes.c_wchar * 32),
("dwCharSet", wintypes.DWORD),
("iCategory", ctypes.c_int),
("hIcon", ctypes.c_void_p),
("langID", ctypes.c_ushort),
("dummy", ctypes.c_ushort),
("lReserved1", ctypes.c_ssize_t),
]#[repr(C)]
pub struct IMEAPPLETCFG {
pub dwConfig: u32,
pub wchTitle: [u16; 64],
pub wchTitleFontFace: [u16; 32],
pub dwCharSet: u32,
pub iCategory: i32,
pub hIcon: *mut core::ffi::c_void,
pub langID: u16,
pub dummy: u16,
pub lReserved1: isize,
}import "golang.org/x/sys/windows"
type IMEAPPLETCFG struct {
dwConfig uint32
wchTitle [64]uint16
wchTitleFontFace [32]uint16
dwCharSet uint32
iCategory int32
hIcon uintptr
langID uint16
dummy uint16
lReserved1 uintptr
}type
IMEAPPLETCFG = record
dwConfig: DWORD;
wchTitle: array[0..63] of WideChar;
wchTitleFontFace: array[0..31] of WideChar;
dwCharSet: DWORD;
iCategory: Integer;
hIcon: Pointer;
langID: Word;
dummy: Word;
lReserved1: NativeInt;
end;const IMEAPPLETCFG = extern struct {
dwConfig: u32,
wchTitle: [64]u16,
wchTitleFontFace: [32]u16,
dwCharSet: u32,
iCategory: i32,
hIcon: ?*anyopaque,
langID: u16,
dummy: u16,
lReserved1: isize,
};type
IMEAPPLETCFG {.bycopy.} = object
dwConfig: uint32
wchTitle: array[64, uint16]
wchTitleFontFace: array[32, uint16]
dwCharSet: uint32
iCategory: int32
hIcon: pointer
langID: uint16
dummy: uint16
lReserved1: intstruct IMEAPPLETCFG
{
uint dwConfig;
wchar[64] wchTitle;
wchar[32] wchTitleFontFace;
uint dwCharSet;
int iCategory;
void* hIcon;
ushort langID;
ushort dummy;
ptrdiff_t lReserved1;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; IMEAPPLETCFG サイズ: 216 バイト(x86)
dim st, 54 ; 4byte整数×54(構造体サイズ 216 / 4 切り上げ)
; dwConfig : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; wchTitle : WCHAR (+4, 128byte) varptr(st)+4 を基点に操作(128byte:入れ子/配列)
; wchTitleFontFace : WCHAR (+132, 64byte) varptr(st)+132 を基点に操作(64byte:入れ子/配列)
; dwCharSet : DWORD (+196, 4byte) st.49 = 値 / 値 = st.49 (lpoke/lpeek も可)
; iCategory : INT (+200, 4byte) st.50 = 値 / 値 = st.50 (lpoke/lpeek も可)
; hIcon : HICON (+204, 4byte) st.51 = 値 / 値 = st.51 (lpoke/lpeek も可)
; langID : WORD (+208, 2byte) wpoke st,208,値 / 値 = wpeek(st,208)
; dummy : WORD (+210, 2byte) wpoke st,210,値 / 値 = wpeek(st,210)
; lReserved1 : LPARAM (+212, 4byte) st.53 = 値 / 値 = st.53 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; IMEAPPLETCFG サイズ: 232 バイト(x64)
dim st, 58 ; 4byte整数×58(構造体サイズ 232 / 4 切り上げ)
; dwConfig : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; wchTitle : WCHAR (+4, 128byte) varptr(st)+4 を基点に操作(128byte:入れ子/配列)
; wchTitleFontFace : WCHAR (+132, 64byte) varptr(st)+132 を基点に操作(64byte:入れ子/配列)
; dwCharSet : DWORD (+196, 4byte) st.49 = 値 / 値 = st.49 (lpoke/lpeek も可)
; iCategory : INT (+200, 4byte) st.50 = 値 / 値 = st.50 (lpoke/lpeek も可)
; hIcon : HICON (+208, 8byte) qpoke st,208,値 / qpeek(st,208) ※IronHSPのみ。3.7/3.8は lpoke st,208,下位 : lpoke st,212,上位
; langID : WORD (+216, 2byte) wpoke st,216,値 / 値 = wpeek(st,216)
; dummy : WORD (+218, 2byte) wpoke st,218,値 / 値 = wpeek(st,218)
; lReserved1 : LPARAM (+224, 8byte) qpoke st,224,値 / qpeek(st,224) ※IronHSPのみ。3.7/3.8は lpoke st,224,下位 : lpoke st,228,上位
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global IMEAPPLETCFG
#field int dwConfig
#field wchar wchTitle 64
#field wchar wchTitleFontFace 32
#field int dwCharSet
#field int iCategory
#field intptr hIcon
#field short langID
#field short dummy
#field intptr lReserved1
#endstruct
stdim st, IMEAPPLETCFG ; NSTRUCT 変数を確保
st->dwConfig = 100
mes "dwConfig=" + st->dwConfig