ホーム › UI.Controls › DrawInsert
DrawInsert
関数ドラッグリストの挿入位置を示すマークを描画する。
シグネチャ
// COMCTL32.dll
#include <windows.h>
void DrawInsert(
HWND handParent,
HWND hLB,
INT nItem
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| handParent | HWND | in |
| hLB | HWND | in |
| nItem | INT | in |
戻り値の型: void
各言語での呼び出し定義
// COMCTL32.dll
#include <windows.h>
void DrawInsert(
HWND handParent,
HWND hLB,
INT nItem
);[DllImport("COMCTL32.dll", ExactSpelling = true)]
static extern void DrawInsert(
IntPtr handParent, // HWND
IntPtr hLB, // HWND
int nItem // INT
);<DllImport("COMCTL32.dll", ExactSpelling:=True)>
Public Shared Sub DrawInsert(
handParent As IntPtr, ' HWND
hLB As IntPtr, ' HWND
nItem As Integer ' INT
)
End Sub' handParent : HWND
' hLB : HWND
' nItem : INT
Declare PtrSafe Sub DrawInsert Lib "comctl32" ( _
ByVal handParent As LongPtr, _
ByVal hLB As LongPtr, _
ByVal nItem As Long)
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
DrawInsert = ctypes.windll.comctl32.DrawInsert
DrawInsert.restype = None
DrawInsert.argtypes = [
wintypes.HANDLE, # handParent : HWND
wintypes.HANDLE, # hLB : HWND
ctypes.c_int, # nItem : INT
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('COMCTL32.dll')
DrawInsert = Fiddle::Function.new(
lib['DrawInsert'],
[
Fiddle::TYPE_VOIDP, # handParent : HWND
Fiddle::TYPE_VOIDP, # hLB : HWND
Fiddle::TYPE_INT, # nItem : INT
],
Fiddle::TYPE_VOID)#[link(name = "comctl32")]
extern "system" {
fn DrawInsert(
handParent: *mut core::ffi::c_void, // HWND
hLB: *mut core::ffi::c_void, // HWND
nItem: i32 // INT
);
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("COMCTL32.dll")]
public static extern void DrawInsert(IntPtr handParent, IntPtr hLB, int nItem);
"@
$api = Add-Type -MemberDefinition $sig -Name 'COMCTL32_DrawInsert' -Namespace Win32 -PassThru
# $api::DrawInsert(handParent, hLB, nItem)#uselib "COMCTL32.dll"
#func global DrawInsert "DrawInsert" sptr, sptr, sptr
; DrawInsert handParent, hLB, nItem
; handParent : HWND -> "sptr"
; hLB : HWND -> "sptr"
; nItem : INT -> "sptr"#uselib "COMCTL32.dll"
#func global DrawInsert "DrawInsert" sptr, sptr, int
; DrawInsert handParent, hLB, nItem
; handParent : HWND -> "sptr"
; hLB : HWND -> "sptr"
; nItem : INT -> "int"; void DrawInsert(HWND handParent, HWND hLB, INT nItem)
#uselib "COMCTL32.dll"
#func global DrawInsert "DrawInsert" intptr, intptr, int
; DrawInsert handParent, hLB, nItem
; handParent : HWND -> "intptr"
; hLB : HWND -> "intptr"
; nItem : INT -> "int"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
comctl32 = windows.NewLazySystemDLL("COMCTL32.dll")
procDrawInsert = comctl32.NewProc("DrawInsert")
)
// handParent (HWND), hLB (HWND), nItem (INT)
r1, _, err := procDrawInsert.Call(
uintptr(handParent),
uintptr(hLB),
uintptr(nItem),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // voidprocedure DrawInsert(
handParent: THandle; // HWND
hLB: THandle; // HWND
nItem: Integer // INT
); stdcall;
external 'COMCTL32.dll' name 'DrawInsert';result := DllCall("COMCTL32\DrawInsert"
, "Ptr", handParent ; HWND
, "Ptr", hLB ; HWND
, "Int", nItem ; INT
, "Int") ; return: void●DrawInsert(handParent, hLB, nItem) = DLL("COMCTL32.dll", "int DrawInsert(void*, void*, int)")
# 呼び出し: DrawInsert(handParent, hLB, nItem)
# handParent : HWND -> "void*"
# hLB : HWND -> "void*"
# nItem : INT -> "int"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。