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