Win32 API 日本語リファレンス
ホームSystem.AddressBook › DTBLCOMBOBOX

DTBLCOMBOBOX

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

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

フィールド

フィールドサイズx64x86説明
ulbLpszCharsAllowedDWORD4+0+0入力を許可する文字集合の文字列へのオフセット。
ulFlagsDWORD4+4+4コンボボックスの動作フラグ。MAPI_UNICODE等を指定する。
ulNumCharsAllowedDWORD4+8+8入力可能な最大文字数。
ulPRPropertyNameDWORD4+12+12編集対象の値を保持するプロパティのプロパティタグ。
ulPRTableNameDWORD4+16+16候補一覧を提供するテーブルを示すプロパティタグ。

各言語での定義

#include <windows.h>

// DTBLCOMBOBOX  (x64 20 / x86 20 バイト)
typedef struct DTBLCOMBOBOX {
    DWORD ulbLpszCharsAllowed;
    DWORD ulFlags;
    DWORD ulNumCharsAllowed;
    DWORD ulPRPropertyName;
    DWORD ulPRTableName;
} DTBLCOMBOBOX;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DTBLCOMBOBOX
{
    public uint ulbLpszCharsAllowed;
    public uint ulFlags;
    public uint ulNumCharsAllowed;
    public uint ulPRPropertyName;
    public uint ulPRTableName;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure DTBLCOMBOBOX
    Public ulbLpszCharsAllowed As UInteger
    Public ulFlags As UInteger
    Public ulNumCharsAllowed As UInteger
    Public ulPRPropertyName As UInteger
    Public ulPRTableName As UInteger
End Structure
import ctypes
from ctypes import wintypes

class DTBLCOMBOBOX(ctypes.Structure):
    _fields_ = [
        ("ulbLpszCharsAllowed", wintypes.DWORD),
        ("ulFlags", wintypes.DWORD),
        ("ulNumCharsAllowed", wintypes.DWORD),
        ("ulPRPropertyName", wintypes.DWORD),
        ("ulPRTableName", wintypes.DWORD),
    ]
#[repr(C)]
pub struct DTBLCOMBOBOX {
    pub ulbLpszCharsAllowed: u32,
    pub ulFlags: u32,
    pub ulNumCharsAllowed: u32,
    pub ulPRPropertyName: u32,
    pub ulPRTableName: u32,
}
import "golang.org/x/sys/windows"

type DTBLCOMBOBOX struct {
	ulbLpszCharsAllowed uint32
	ulFlags uint32
	ulNumCharsAllowed uint32
	ulPRPropertyName uint32
	ulPRTableName uint32
}
type
  DTBLCOMBOBOX = record
    ulbLpszCharsAllowed: DWORD;
    ulFlags: DWORD;
    ulNumCharsAllowed: DWORD;
    ulPRPropertyName: DWORD;
    ulPRTableName: DWORD;
  end;
const DTBLCOMBOBOX = extern struct {
    ulbLpszCharsAllowed: u32,
    ulFlags: u32,
    ulNumCharsAllowed: u32,
    ulPRPropertyName: u32,
    ulPRTableName: u32,
};
type
  DTBLCOMBOBOX {.bycopy.} = object
    ulbLpszCharsAllowed: uint32
    ulFlags: uint32
    ulNumCharsAllowed: uint32
    ulPRPropertyName: uint32
    ulPRTableName: uint32
struct DTBLCOMBOBOX
{
    uint ulbLpszCharsAllowed;
    uint ulFlags;
    uint ulNumCharsAllowed;
    uint ulPRPropertyName;
    uint ulPRTableName;
}

HSP用 定義

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

; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; DTBLCOMBOBOX サイズ: 20 バイト(x64)
dim st, 5    ; 4byte整数×5(構造体サイズ 20 / 4 切り上げ)
; ulbLpszCharsAllowed : DWORD (+0, 4byte)  st.0 = 値  /  値 = st.0   (lpoke/lpeek も可)
; ulFlags : DWORD (+4, 4byte)  st.1 = 値  /  値 = st.1   (lpoke/lpeek も可)
; ulNumCharsAllowed : DWORD (+8, 4byte)  st.2 = 値  /  値 = st.2   (lpoke/lpeek も可)
; ulPRPropertyName : DWORD (+12, 4byte)  st.3 = 値  /  値 = st.3   (lpoke/lpeek も可)
; ulPRTableName : DWORD (+16, 4byte)  st.4 = 値  /  値 = st.4   (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global DTBLCOMBOBOX
    #field int ulbLpszCharsAllowed
    #field int ulFlags
    #field int ulNumCharsAllowed
    #field int ulPRPropertyName
    #field int ulPRTableName
#endstruct

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