ホーム › UI.Controls › LVSETINFOTIP
LVSETINFOTIP
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| cbSize | DWORD | 4 | +0 | +0 | LVSETINFOTIP 構造体のサイズです。 |
| dwFlags | DWORD | 4 | +4 | +4 | テキストの設定方法を指定するフラグです。0 を設定します。 |
| pszText | LPWSTR | 8/4 | +8 | +8 | ツールヒントのテキストを格納した Unicode 文字列へのポインターです。 |
| iItem | INT | 4 | +16 | +12 | この構造体が参照する項目の 0 から始まるインデックスを格納する int 型の値です。 |
| iSubItem | INT | 4 | +20 | +16 | この構造体が参照するサブ項目の 1 から始まるインデックスを格納する int 型の値です。 |
公式ドキュメント
設定するツールヒントのテキストに関する情報を提供します。
出典・ライセンス: 上記「公式ドキュメント」の内容は 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>
// LVSETINFOTIP (x64 24 / x86 20 バイト)
typedef struct LVSETINFOTIP {
DWORD cbSize;
DWORD dwFlags;
LPWSTR pszText;
INT iItem;
INT iSubItem;
} LVSETINFOTIP;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct LVSETINFOTIP
{
public uint cbSize;
public uint dwFlags;
public IntPtr pszText;
public int iItem;
public int iSubItem;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure LVSETINFOTIP
Public cbSize As UInteger
Public dwFlags As UInteger
Public pszText As IntPtr
Public iItem As Integer
Public iSubItem As Integer
End Structureimport ctypes
from ctypes import wintypes
class LVSETINFOTIP(ctypes.Structure):
_fields_ = [
("cbSize", wintypes.DWORD),
("dwFlags", wintypes.DWORD),
("pszText", ctypes.c_void_p),
("iItem", ctypes.c_int),
("iSubItem", ctypes.c_int),
]#[repr(C)]
pub struct LVSETINFOTIP {
pub cbSize: u32,
pub dwFlags: u32,
pub pszText: *mut core::ffi::c_void,
pub iItem: i32,
pub iSubItem: i32,
}import "golang.org/x/sys/windows"
type LVSETINFOTIP struct {
cbSize uint32
dwFlags uint32
pszText uintptr
iItem int32
iSubItem int32
}type
LVSETINFOTIP = record
cbSize: DWORD;
dwFlags: DWORD;
pszText: Pointer;
iItem: Integer;
iSubItem: Integer;
end;const LVSETINFOTIP = extern struct {
cbSize: u32,
dwFlags: u32,
pszText: ?*anyopaque,
iItem: i32,
iSubItem: i32,
};type
LVSETINFOTIP {.bycopy.} = object
cbSize: uint32
dwFlags: uint32
pszText: pointer
iItem: int32
iSubItem: int32struct LVSETINFOTIP
{
uint cbSize;
uint dwFlags;
void* pszText;
int iItem;
int iSubItem;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; LVSETINFOTIP サイズ: 20 バイト(x86)
dim st, 5 ; 4byte整数×5(構造体サイズ 20 / 4 切り上げ)
; cbSize : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; dwFlags : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; pszText : LPWSTR (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; iItem : INT (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; iSubItem : INT (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; LVSETINFOTIP サイズ: 24 バイト(x64)
dim st, 6 ; 4byte整数×6(構造体サイズ 24 / 4 切り上げ)
; cbSize : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; dwFlags : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; pszText : LPWSTR (+8, 8byte) qpoke st,8,値 / qpeek(st,8) ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; iItem : INT (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; iSubItem : INT (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global LVSETINFOTIP
#field int cbSize
#field int dwFlags
#field intptr pszText
#field int iItem
#field int iSubItem
#endstruct
stdim st, LVSETINFOTIP ; NSTRUCT 変数を確保
st->cbSize = 100
mes "cbSize=" + st->cbSize