Win32 API 日本語リファレンス
ホームUI.Input.Ime › IMEAPPLETUI

IMEAPPLETUI

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

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

フィールド

フィールドサイズx64x86説明
hwndHWND8/4+0+0アプレットUIのウィンドウハンドルである。
dwStyleDWORD4+8+4ウィンドウのスタイルを示す値である。
widthINT4+12+8ウィンドウの幅(ピクセル)である。
heightINT4+16+12ウィンドウの高さ(ピクセル)である。
minWidthINT4+20+16ウィンドウの最小幅である。
minHeightINT4+24+20ウィンドウの最小高さである。
maxWidthINT4+28+24ウィンドウの最大幅である。
maxHeightINT4+32+28ウィンドウの最大高さである。
lReserved1LPARAM8/4+40+32予約領域である。
lReserved2LPARAM8/4+48+36予約領域である。

各言語での定義

#include <windows.h>

// IMEAPPLETUI  (x64 56 / x86 40 バイト)
typedef struct IMEAPPLETUI {
    HWND hwnd;
    DWORD dwStyle;
    INT width;
    INT height;
    INT minWidth;
    INT minHeight;
    INT maxWidth;
    INT maxHeight;
    LPARAM lReserved1;
    LPARAM lReserved2;
} IMEAPPLETUI;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct IMEAPPLETUI
{
    public IntPtr hwnd;
    public uint dwStyle;
    public int width;
    public int height;
    public int minWidth;
    public int minHeight;
    public int maxWidth;
    public int maxHeight;
    public IntPtr lReserved1;
    public IntPtr lReserved2;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure IMEAPPLETUI
    Public hwnd As IntPtr
    Public dwStyle As UInteger
    Public width As Integer
    Public height As Integer
    Public minWidth As Integer
    Public minHeight As Integer
    Public maxWidth As Integer
    Public maxHeight As Integer
    Public lReserved1 As IntPtr
    Public lReserved2 As IntPtr
End Structure
import ctypes
from ctypes import wintypes

class IMEAPPLETUI(ctypes.Structure):
    _fields_ = [
        ("hwnd", ctypes.c_void_p),
        ("dwStyle", wintypes.DWORD),
        ("width", ctypes.c_int),
        ("height", ctypes.c_int),
        ("minWidth", ctypes.c_int),
        ("minHeight", ctypes.c_int),
        ("maxWidth", ctypes.c_int),
        ("maxHeight", ctypes.c_int),
        ("lReserved1", ctypes.c_ssize_t),
        ("lReserved2", ctypes.c_ssize_t),
    ]
#[repr(C)]
pub struct IMEAPPLETUI {
    pub hwnd: *mut core::ffi::c_void,
    pub dwStyle: u32,
    pub width: i32,
    pub height: i32,
    pub minWidth: i32,
    pub minHeight: i32,
    pub maxWidth: i32,
    pub maxHeight: i32,
    pub lReserved1: isize,
    pub lReserved2: isize,
}
import "golang.org/x/sys/windows"

type IMEAPPLETUI struct {
	hwnd uintptr
	dwStyle uint32
	width int32
	height int32
	minWidth int32
	minHeight int32
	maxWidth int32
	maxHeight int32
	lReserved1 uintptr
	lReserved2 uintptr
}
type
  IMEAPPLETUI = record
    hwnd: Pointer;
    dwStyle: DWORD;
    width: Integer;
    height: Integer;
    minWidth: Integer;
    minHeight: Integer;
    maxWidth: Integer;
    maxHeight: Integer;
    lReserved1: NativeInt;
    lReserved2: NativeInt;
  end;
const IMEAPPLETUI = extern struct {
    hwnd: ?*anyopaque,
    dwStyle: u32,
    width: i32,
    height: i32,
    minWidth: i32,
    minHeight: i32,
    maxWidth: i32,
    maxHeight: i32,
    lReserved1: isize,
    lReserved2: isize,
};
type
  IMEAPPLETUI {.bycopy.} = object
    hwnd: pointer
    dwStyle: uint32
    width: int32
    height: int32
    minWidth: int32
    minHeight: int32
    maxWidth: int32
    maxHeight: int32
    lReserved1: int
    lReserved2: int
struct IMEAPPLETUI
{
    void* hwnd;
    uint dwStyle;
    int width;
    int height;
    int minWidth;
    int minHeight;
    int maxWidth;
    int maxHeight;
    ptrdiff_t lReserved1;
    ptrdiff_t lReserved2;
}

HSP用 定義

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

; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; IMEAPPLETUI サイズ: 40 バイト(x86)
dim st, 10    ; 4byte整数×10(構造体サイズ 40 / 4 切り上げ)
; hwnd : HWND (+0, 4byte)  st.0 = 値  /  値 = st.0   (lpoke/lpeek も可)
; dwStyle : DWORD (+4, 4byte)  st.1 = 値  /  値 = st.1   (lpoke/lpeek も可)
; width : INT (+8, 4byte)  st.2 = 値  /  値 = st.2   (lpoke/lpeek も可)
; height : INT (+12, 4byte)  st.3 = 値  /  値 = st.3   (lpoke/lpeek も可)
; minWidth : INT (+16, 4byte)  st.4 = 値  /  値 = st.4   (lpoke/lpeek も可)
; minHeight : INT (+20, 4byte)  st.5 = 値  /  値 = st.5   (lpoke/lpeek も可)
; maxWidth : INT (+24, 4byte)  st.6 = 値  /  値 = st.6   (lpoke/lpeek も可)
; maxHeight : INT (+28, 4byte)  st.7 = 値  /  値 = st.7   (lpoke/lpeek も可)
; lReserved1 : LPARAM (+32, 4byte)  st.8 = 値  /  値 = st.8   (lpoke/lpeek も可)
; lReserved2 : LPARAM (+36, 4byte)  st.9 = 値  /  値 = st.9   (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; IMEAPPLETUI サイズ: 56 バイト(x64)
dim st, 14    ; 4byte整数×14(構造体サイズ 56 / 4 切り上げ)
; hwnd : HWND (+0, 8byte)  qpoke st,0,値 / qpeek(st,0)  ※IronHSPのみ。3.7/3.8は lpoke st,0,下位 : lpoke st,4,上位
; dwStyle : DWORD (+8, 4byte)  st.2 = 値  /  値 = st.2   (lpoke/lpeek も可)
; width : INT (+12, 4byte)  st.3 = 値  /  値 = st.3   (lpoke/lpeek も可)
; height : INT (+16, 4byte)  st.4 = 値  /  値 = st.4   (lpoke/lpeek も可)
; minWidth : INT (+20, 4byte)  st.5 = 値  /  値 = st.5   (lpoke/lpeek も可)
; minHeight : INT (+24, 4byte)  st.6 = 値  /  値 = st.6   (lpoke/lpeek も可)
; maxWidth : INT (+28, 4byte)  st.7 = 値  /  値 = st.7   (lpoke/lpeek も可)
; maxHeight : INT (+32, 4byte)  st.8 = 値  /  値 = st.8   (lpoke/lpeek も可)
; lReserved1 : LPARAM (+40, 8byte)  qpoke st,40,値 / qpeek(st,40)  ※IronHSPのみ。3.7/3.8は lpoke st,40,下位 : lpoke st,44,上位
; lReserved2 : LPARAM (+48, 8byte)  qpoke st,48,値 / qpeek(st,48)  ※IronHSPのみ。3.7/3.8は lpoke st,48,下位 : lpoke st,52,上位
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global IMEAPPLETUI
    #field intptr hwnd
    #field int dwStyle
    #field int width
    #field int height
    #field int minWidth
    #field int minHeight
    #field int maxWidth
    #field int maxHeight
    #field intptr lReserved1
    #field intptr lReserved2
#endstruct

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