ホーム › UI.Controls › CreateUpDownControl
CreateUpDownControl
関数アップダウンコントロールを作成する。
シグネチャ
// COMCTL32.dll
#include <windows.h>
HWND CreateUpDownControl(
DWORD dwStyle,
INT x,
INT y,
INT cx,
INT cy,
HWND hParent,
INT nID,
HINSTANCE hInst,
HWND hBuddy,
INT nUpper,
INT nLower,
INT nPos
);パラメーター
| 名前 | 型 | 方向 | 説明 |
|---|---|---|---|
| dwStyle | DWORD | in | コントロールのウィンドウスタイルです。このパラメーターには WS_CHILD、WS_BORDER、WS_VISIBLE の各スタイルを含める必要があり、アップダウンコントロール固有のウィンドウスタイルを含めることもできます。 |
| x | INT | in | コントロールの左上隅の水平座標(クライアント座標)です。 |
| y | INT | in | コントロールの左上隅の垂直座標(クライアント座標)です。 |
| cx | INT | in | アップダウンコントロールの幅(ピクセル単位)です。 |
| cy | INT | in | アップダウンコントロールの高さ(ピクセル単位)です。 |
| hParent | HWND | in | アップダウンコントロールの親ウィンドウのハンドルです。 |
| nID | INT | in | アップダウンコントロールの識別子です。 |
| hInst | HINSTANCE | in | アップダウンコントロールを作成するアプリケーションのモジュールインスタンスのハンドルです。 |
| hBuddy | HWND | in | アップダウンコントロールに関連付けられたウィンドウのハンドルです。このパラメーターが NULL の場合、コントロールにはバディウィンドウがありません。 |
| nUpper | INT | in | アップダウンコントロールの上限(範囲)です。 |
| nLower | INT | in | アップダウンコントロールの下限(範囲)です。 |
| nPos | INT | in | コントロールの位置です。 |
戻り値の型: HWND
公式ドキュメント
アップダウンコントロールを作成します。注意: この関数は廃止されています。これは16ビットの関数であり、範囲と位置に32ビット値を扱うことはできません。
戻り値
Type: HWND
関数が成功した場合、戻り値はアップダウンコントロールのウィンドウハンドルです。関数が失敗した場合、戻り値は NULL です。
出典・ライセンス: 上記「公式ドキュメント」の内容は Microsoft の Win32 API ドキュメント(MicrosoftDocs/sdk-api)を日本語に翻訳・改変したものです。© Microsoft Corporation. CC BY 4.0 で提供。
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
各言語での呼び出し定義
// COMCTL32.dll
#include <windows.h>
HWND CreateUpDownControl(
DWORD dwStyle,
INT x,
INT y,
INT cx,
INT cy,
HWND hParent,
INT nID,
HINSTANCE hInst,
HWND hBuddy,
INT nUpper,
INT nLower,
INT nPos
);[DllImport("COMCTL32.dll", ExactSpelling = true)]
static extern IntPtr CreateUpDownControl(
uint dwStyle, // DWORD
int x, // INT
int y, // INT
int cx, // INT
int cy, // INT
IntPtr hParent, // HWND
int nID, // INT
IntPtr hInst, // HINSTANCE
IntPtr hBuddy, // HWND
int nUpper, // INT
int nLower, // INT
int nPos // INT
);<DllImport("COMCTL32.dll", ExactSpelling:=True)>
Public Shared Function CreateUpDownControl(
dwStyle As UInteger, ' DWORD
x As Integer, ' INT
y As Integer, ' INT
cx As Integer, ' INT
cy As Integer, ' INT
hParent As IntPtr, ' HWND
nID As Integer, ' INT
hInst As IntPtr, ' HINSTANCE
hBuddy As IntPtr, ' HWND
nUpper As Integer, ' INT
nLower As Integer, ' INT
nPos As Integer ' INT
) As IntPtr
End Function' dwStyle : DWORD
' x : INT
' y : INT
' cx : INT
' cy : INT
' hParent : HWND
' nID : INT
' hInst : HINSTANCE
' hBuddy : HWND
' nUpper : INT
' nLower : INT
' nPos : INT
Declare PtrSafe Function CreateUpDownControl Lib "comctl32" ( _
ByVal dwStyle As Long, _
ByVal x As Long, _
ByVal y As Long, _
ByVal cx As Long, _
ByVal cy As Long, _
ByVal hParent As LongPtr, _
ByVal nID As Long, _
ByVal hInst As LongPtr, _
ByVal hBuddy As LongPtr, _
ByVal nUpper As Long, _
ByVal nLower As Long, _
ByVal nPos As Long) As LongPtr
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
CreateUpDownControl = ctypes.windll.comctl32.CreateUpDownControl
CreateUpDownControl.restype = ctypes.c_void_p
CreateUpDownControl.argtypes = [
wintypes.DWORD, # dwStyle : DWORD
ctypes.c_int, # x : INT
ctypes.c_int, # y : INT
ctypes.c_int, # cx : INT
ctypes.c_int, # cy : INT
wintypes.HANDLE, # hParent : HWND
ctypes.c_int, # nID : INT
wintypes.HANDLE, # hInst : HINSTANCE
wintypes.HANDLE, # hBuddy : HWND
ctypes.c_int, # nUpper : INT
ctypes.c_int, # nLower : INT
ctypes.c_int, # nPos : INT
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('COMCTL32.dll')
CreateUpDownControl = Fiddle::Function.new(
lib['CreateUpDownControl'],
[
-Fiddle::TYPE_INT, # dwStyle : DWORD
Fiddle::TYPE_INT, # x : INT
Fiddle::TYPE_INT, # y : INT
Fiddle::TYPE_INT, # cx : INT
Fiddle::TYPE_INT, # cy : INT
Fiddle::TYPE_VOIDP, # hParent : HWND
Fiddle::TYPE_INT, # nID : INT
Fiddle::TYPE_VOIDP, # hInst : HINSTANCE
Fiddle::TYPE_VOIDP, # hBuddy : HWND
Fiddle::TYPE_INT, # nUpper : INT
Fiddle::TYPE_INT, # nLower : INT
Fiddle::TYPE_INT, # nPos : INT
],
Fiddle::TYPE_VOIDP)#[link(name = "comctl32")]
extern "system" {
fn CreateUpDownControl(
dwStyle: u32, // DWORD
x: i32, // INT
y: i32, // INT
cx: i32, // INT
cy: i32, // INT
hParent: *mut core::ffi::c_void, // HWND
nID: i32, // INT
hInst: *mut core::ffi::c_void, // HINSTANCE
hBuddy: *mut core::ffi::c_void, // HWND
nUpper: i32, // INT
nLower: i32, // INT
nPos: i32 // INT
) -> *mut core::ffi::c_void;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("COMCTL32.dll")]
public static extern IntPtr CreateUpDownControl(uint dwStyle, int x, int y, int cx, int cy, IntPtr hParent, int nID, IntPtr hInst, IntPtr hBuddy, int nUpper, int nLower, int nPos);
"@
$api = Add-Type -MemberDefinition $sig -Name 'COMCTL32_CreateUpDownControl' -Namespace Win32 -PassThru
# $api::CreateUpDownControl(dwStyle, x, y, cx, cy, hParent, nID, hInst, hBuddy, nUpper, nLower, nPos)#uselib "COMCTL32.dll"
#func global CreateUpDownControl "CreateUpDownControl" sptr, sptr, sptr, sptr, sptr, sptr, sptr, sptr, sptr, sptr, sptr, sptr
; CreateUpDownControl dwStyle, x, y, cx, cy, hParent, nID, hInst, hBuddy, nUpper, nLower, nPos ; 戻り値は stat
; dwStyle : DWORD -> "sptr"
; x : INT -> "sptr"
; y : INT -> "sptr"
; cx : INT -> "sptr"
; cy : INT -> "sptr"
; hParent : HWND -> "sptr"
; nID : INT -> "sptr"
; hInst : HINSTANCE -> "sptr"
; hBuddy : HWND -> "sptr"
; nUpper : INT -> "sptr"
; nLower : INT -> "sptr"
; nPos : INT -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "COMCTL32.dll"
#cfunc global CreateUpDownControl "CreateUpDownControl" int, int, int, int, int, sptr, int, sptr, sptr, int, int, int
; res = CreateUpDownControl(dwStyle, x, y, cx, cy, hParent, nID, hInst, hBuddy, nUpper, nLower, nPos)
; dwStyle : DWORD -> "int"
; x : INT -> "int"
; y : INT -> "int"
; cx : INT -> "int"
; cy : INT -> "int"
; hParent : HWND -> "sptr"
; nID : INT -> "int"
; hInst : HINSTANCE -> "sptr"
; hBuddy : HWND -> "sptr"
; nUpper : INT -> "int"
; nLower : INT -> "int"
; nPos : INT -> "int"; HWND CreateUpDownControl(DWORD dwStyle, INT x, INT y, INT cx, INT cy, HWND hParent, INT nID, HINSTANCE hInst, HWND hBuddy, INT nUpper, INT nLower, INT nPos)
#uselib "COMCTL32.dll"
#cfunc global CreateUpDownControl "CreateUpDownControl" int, int, int, int, int, intptr, int, intptr, intptr, int, int, int
; res = CreateUpDownControl(dwStyle, x, y, cx, cy, hParent, nID, hInst, hBuddy, nUpper, nLower, nPos)
; dwStyle : DWORD -> "int"
; x : INT -> "int"
; y : INT -> "int"
; cx : INT -> "int"
; cy : INT -> "int"
; hParent : HWND -> "intptr"
; nID : INT -> "int"
; hInst : HINSTANCE -> "intptr"
; hBuddy : HWND -> "intptr"
; nUpper : INT -> "int"
; nLower : INT -> "int"
; nPos : INT -> "int"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
comctl32 = windows.NewLazySystemDLL("COMCTL32.dll")
procCreateUpDownControl = comctl32.NewProc("CreateUpDownControl")
)
// dwStyle (DWORD), x (INT), y (INT), cx (INT), cy (INT), hParent (HWND), nID (INT), hInst (HINSTANCE), hBuddy (HWND), nUpper (INT), nLower (INT), nPos (INT)
r1, _, err := procCreateUpDownControl.Call(
uintptr(dwStyle),
uintptr(x),
uintptr(y),
uintptr(cx),
uintptr(cy),
uintptr(hParent),
uintptr(nID),
uintptr(hInst),
uintptr(hBuddy),
uintptr(nUpper),
uintptr(nLower),
uintptr(nPos),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // HWNDfunction CreateUpDownControl(
dwStyle: DWORD; // DWORD
x: Integer; // INT
y: Integer; // INT
cx: Integer; // INT
cy: Integer; // INT
hParent: THandle; // HWND
nID: Integer; // INT
hInst: THandle; // HINSTANCE
hBuddy: THandle; // HWND
nUpper: Integer; // INT
nLower: Integer; // INT
nPos: Integer // INT
): THandle; stdcall;
external 'COMCTL32.dll' name 'CreateUpDownControl';result := DllCall("COMCTL32\CreateUpDownControl"
, "UInt", dwStyle ; DWORD
, "Int", x ; INT
, "Int", y ; INT
, "Int", cx ; INT
, "Int", cy ; INT
, "Ptr", hParent ; HWND
, "Int", nID ; INT
, "Ptr", hInst ; HINSTANCE
, "Ptr", hBuddy ; HWND
, "Int", nUpper ; INT
, "Int", nLower ; INT
, "Int", nPos ; INT
, "Ptr") ; return: HWND●CreateUpDownControl(dwStyle, x, y, cx, cy, hParent, nID, hInst, hBuddy, nUpper, nLower, nPos) = DLL("COMCTL32.dll", "void* CreateUpDownControl(dword, int, int, int, int, void*, int, void*, void*, int, int, int)")
# 呼び出し: CreateUpDownControl(dwStyle, x, y, cx, cy, hParent, nID, hInst, hBuddy, nUpper, nLower, nPos)
# dwStyle : DWORD -> "dword"
# x : INT -> "int"
# y : INT -> "int"
# cx : INT -> "int"
# cy : INT -> "int"
# hParent : HWND -> "void*"
# nID : INT -> "int"
# hInst : HINSTANCE -> "void*"
# hBuddy : HWND -> "void*"
# nUpper : INT -> "int"
# nLower : INT -> "int"
# nPos : INT -> "int"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。const std = @import("std");
extern "comctl32" fn CreateUpDownControl(
dwStyle: u32, // DWORD
x: i32, // INT
y: i32, // INT
cx: i32, // INT
cy: i32, // INT
hParent: ?*anyopaque, // HWND
nID: i32, // INT
hInst: ?*anyopaque, // HINSTANCE
hBuddy: ?*anyopaque, // HWND
nUpper: i32, // INT
nLower: i32, // INT
nPos: i32 // INT
) callconv(std.os.windows.WINAPI) ?*anyopaque;proc CreateUpDownControl(
dwStyle: uint32, # DWORD
x: int32, # INT
y: int32, # INT
cx: int32, # INT
cy: int32, # INT
hParent: pointer, # HWND
nID: int32, # INT
hInst: pointer, # HINSTANCE
hBuddy: pointer, # HWND
nUpper: int32, # INT
nLower: int32, # INT
nPos: int32 # INT
): pointer {.importc: "CreateUpDownControl", stdcall, dynlib: "COMCTL32.dll".}pragma(lib, "comctl32");
extern(Windows)
void* CreateUpDownControl(
uint dwStyle, // DWORD
int x, // INT
int y, // INT
int cx, // INT
int cy, // INT
void* hParent, // HWND
int nID, // INT
void* hInst, // HINSTANCE
void* hBuddy, // HWND
int nUpper, // INT
int nLower, // INT
int nPos // INT
);ccall((:CreateUpDownControl, "COMCTL32.dll"), stdcall, Ptr{Cvoid},
(UInt32, Int32, Int32, Int32, Int32, Ptr{Cvoid}, Int32, Ptr{Cvoid}, Ptr{Cvoid}, Int32, Int32, Int32),
dwStyle, x, y, cx, cy, hParent, nID, hInst, hBuddy, nUpper, nLower, nPos)
# dwStyle : DWORD -> UInt32
# x : INT -> Int32
# y : INT -> Int32
# cx : INT -> Int32
# cy : INT -> Int32
# hParent : HWND -> Ptr{Cvoid}
# nID : INT -> Int32
# hInst : HINSTANCE -> Ptr{Cvoid}
# hBuddy : HWND -> Ptr{Cvoid}
# nUpper : INT -> Int32
# nLower : INT -> Int32
# nPos : INT -> Int32
# stdcall は 32bit のみ意味を持つ(x64 では無視)。local ffi = require("ffi")
ffi.cdef[[
void* CreateUpDownControl(
uint32_t dwStyle,
int32_t x,
int32_t y,
int32_t cx,
int32_t cy,
void* hParent,
int32_t nID,
void* hInst,
void* hBuddy,
int32_t nUpper,
int32_t nLower,
int32_t nPos);
]]
local comctl32 = ffi.load("comctl32")
-- comctl32.CreateUpDownControl(dwStyle, x, y, cx, cy, hParent, nID, hInst, hBuddy, nUpper, nLower, nPos)
-- dwStyle : DWORD
-- x : INT
-- y : INT
-- cx : INT
-- cy : INT
-- hParent : HWND
-- nID : INT
-- hInst : HINSTANCE
-- hBuddy : HWND
-- nUpper : INT
-- nLower : INT
-- nPos : INT
-- 構造体/GUIDへのポインタは cdef が通るよう void* で表記(実型は各引数コメント参照)。値渡し構造体・enum は対応する typedef を cdef に追加すること。const koffi = require('koffi');
const lib = koffi.load('COMCTL32.dll');
const CreateUpDownControl = lib.func('__stdcall', 'CreateUpDownControl', 'void *', ['uint32_t', 'int32_t', 'int32_t', 'int32_t', 'int32_t', 'void *', 'int32_t', 'void *', 'void *', 'int32_t', 'int32_t', 'int32_t']);
// CreateUpDownControl(dwStyle, x, y, cx, cy, hParent, nID, hInst, hBuddy, nUpper, nLower, nPos)
// dwStyle : DWORD -> 'uint32_t'
// x : INT -> 'int32_t'
// y : INT -> 'int32_t'
// cx : INT -> 'int32_t'
// cy : INT -> 'int32_t'
// hParent : HWND -> 'void *'
// nID : INT -> 'int32_t'
// hInst : HINSTANCE -> 'void *'
// hBuddy : HWND -> 'void *'
// nUpper : INT -> 'int32_t'
// nLower : INT -> 'int32_t'
// nPos : INT -> 'int32_t'
// 出力ポインタは koffi.out(...) で包む。構造体は koffi.struct で定義。const lib = Deno.dlopen("COMCTL32.dll", {
CreateUpDownControl: { parameters: ["u32", "i32", "i32", "i32", "i32", "pointer", "i32", "pointer", "pointer", "i32", "i32", "i32"], result: "pointer" },
});
// lib.symbols.CreateUpDownControl(dwStyle, x, y, cx, cy, hParent, nID, hInst, hBuddy, nUpper, nLower, nPos)
// dwStyle : DWORD -> "u32"
// x : INT -> "i32"
// y : INT -> "i32"
// cx : INT -> "i32"
// cy : INT -> "i32"
// hParent : HWND -> "pointer"
// nID : INT -> "i32"
// hInst : HINSTANCE -> "pointer"
// hBuddy : HWND -> "pointer"
// nUpper : INT -> "i32"
// nLower : INT -> "i32"
// nPos : INT -> "i32"
// 文字列引数は "buffer"(NUL 終端のバイト列を Uint8Array で渡す)。
// 値渡し構造体は { struct: [ ...field types... ] } を使用。<?php
$ffi = FFI::cdef(<<<C
void* CreateUpDownControl(
uint32_t dwStyle,
int32_t x,
int32_t y,
int32_t cx,
int32_t cy,
void* hParent,
int32_t nID,
void* hInst,
void* hBuddy,
int32_t nUpper,
int32_t nLower,
int32_t nPos);
C, "COMCTL32.dll");
// $ffi->CreateUpDownControl(dwStyle, x, y, cx, cy, hParent, nID, hInst, hBuddy, nUpper, nLower, nPos);
// dwStyle : DWORD
// x : INT
// y : INT
// cx : INT
// cy : INT
// hParent : HWND
// nID : INT
// hInst : HINSTANCE
// hBuddy : HWND
// nUpper : INT
// nLower : INT
// nPos : INT
// 構造体/GUIDへのポインタは cdef が通るよう void* で表記(実型は各引数コメント参照)。値渡し構造体・enum は対応する typedef を cdef に追加すること。
// WINAPI(stdcall): x64 では呼出規約が統一されるため問題なし。x86 では __stdcall 対応のラッパが必要な場合あり。import com.sun.jna.*;
import com.sun.jna.ptr.*;
import com.sun.jna.win32.StdCallLibrary;
import com.sun.jna.win32.W32APIOptions;
public interface Comctl32 extends StdCallLibrary {
Comctl32 INSTANCE = Native.load("comctl32", Comctl32.class);
Pointer CreateUpDownControl(
int dwStyle, // DWORD
int x, // INT
int y, // INT
int cx, // INT
int cy, // INT
Pointer hParent, // HWND
int nID, // INT
Pointer hInst, // HINSTANCE
Pointer hBuddy, // HWND
int nUpper, // INT
int nLower, // INT
int nPos // INT
);
}@[Link("comctl32")]
lib LibCOMCTL32
fun CreateUpDownControl = CreateUpDownControl(
dwStyle : UInt32, # DWORD
x : Int32, # INT
y : Int32, # INT
cx : Int32, # INT
cy : Int32, # INT
hParent : Void*, # HWND
nID : Int32, # INT
hInst : Void*, # HINSTANCE
hBuddy : Void*, # HWND
nUpper : Int32, # INT
nLower : Int32, # INT
nPos : Int32 # INT
) : Void*
end
# 構造体/GUID/enum は lib 内に対応する型定義が必要。
# 呼出規約: x64 は規約統一のため OK。x86(32bit)は WINAPI=stdcall だが Crystal の fun に stdcall 付与構文がなく非対応。import 'dart:ffi';
import 'package:ffi/ffi.dart';
typedef CreateUpDownControlNative = Pointer<Void> Function(Uint32, Int32, Int32, Int32, Int32, Pointer<Void>, Int32, Pointer<Void>, Pointer<Void>, Int32, Int32, Int32);
typedef CreateUpDownControlDart = Pointer<Void> Function(int, int, int, int, int, Pointer<Void>, int, Pointer<Void>, Pointer<Void>, int, int, int);
final CreateUpDownControl = DynamicLibrary.open('COMCTL32.dll')
.lookupFunction<CreateUpDownControlNative, CreateUpDownControlDart>('CreateUpDownControl');
// dwStyle : DWORD -> Uint32
// x : INT -> Int32
// y : INT -> Int32
// cx : INT -> Int32
// cy : INT -> Int32
// hParent : HWND -> Pointer<Void>
// nID : INT -> Int32
// hInst : HINSTANCE -> Pointer<Void>
// hBuddy : HWND -> Pointer<Void>
// nUpper : INT -> Int32
// nLower : INT -> Int32
// nPos : INT -> Int32
// 文字列は package:ffi の "...".toNativeUtf16()/toNativeUtf8() で変換。{$mode objfpc}{$H+}
function CreateUpDownControl(
dwStyle: DWORD; // DWORD
x: Integer; // INT
y: Integer; // INT
cx: Integer; // INT
cy: Integer; // INT
hParent: THandle; // HWND
nID: Integer; // INT
hInst: THandle; // HINSTANCE
hBuddy: THandle; // HWND
nUpper: Integer; // INT
nLower: Integer; // INT
nPos: Integer // INT
): THandle; stdcall;
external 'COMCTL32.dll' name 'CreateUpDownControl';import Foreign
import Foreign.C.Types
import Foreign.C.String
foreign import stdcall safe "CreateUpDownControl"
c_CreateUpDownControl :: Word32 -> Int32 -> Int32 -> Int32 -> Int32 -> Ptr () -> Int32 -> Ptr () -> Ptr () -> Int32 -> Int32 -> Int32 -> IO (Ptr ())
-- dwStyle : DWORD -> Word32
-- x : INT -> Int32
-- y : INT -> Int32
-- cx : INT -> Int32
-- cy : INT -> Int32
-- hParent : HWND -> Ptr ()
-- nID : INT -> Int32
-- hInst : HINSTANCE -> Ptr ()
-- hBuddy : HWND -> Ptr ()
-- nUpper : INT -> Int32
-- nLower : INT -> Int32
-- nPos : INT -> Int32
-- 要 GHC(Windows)。stdcall は x64 では ccall として扱われる。ブロックする API は safe 呼び出し推奨。open Ctypes
open Foreign
let createupdowncontrol =
foreign "CreateUpDownControl"
(uint32_t @-> int32_t @-> int32_t @-> int32_t @-> int32_t @-> (ptr void) @-> int32_t @-> (ptr void) @-> (ptr void) @-> int32_t @-> int32_t @-> int32_t @-> returning (ptr void))
(* dwStyle : DWORD -> uint32_t *)
(* x : INT -> int32_t *)
(* y : INT -> int32_t *)
(* cx : INT -> int32_t *)
(* cy : INT -> int32_t *)
(* hParent : HWND -> (ptr void) *)
(* nID : INT -> int32_t *)
(* hInst : HINSTANCE -> (ptr void) *)
(* hBuddy : HWND -> (ptr void) *)
(* nUpper : INT -> int32_t *)
(* nLower : INT -> int32_t *)
(* nPos : INT -> int32_t *)
(* foreign は cdecl 前提。x64 Windows では WINAPI と一致。構造体は ctypes structure を定義のこと。 *)(cffi:define-foreign-library comctl32 (t "COMCTL32.dll"))
(cffi:use-foreign-library comctl32)
(cffi:defcfun ("CreateUpDownControl" create-up-down-control :convention :stdcall) :pointer
(dw-style :uint32) ; DWORD
(x :int32) ; INT
(y :int32) ; INT
(cx :int32) ; INT
(cy :int32) ; INT
(h-parent :pointer) ; HWND
(n-id :int32) ; INT
(h-inst :pointer) ; HINSTANCE
(h-buddy :pointer) ; HWND
(n-upper :int32) ; INT
(n-lower :int32) ; INT
(n-pos :int32)) ; INT
; isize/usize(INT_PTR/SIZE_T)は x64 前提で :int64/:uint64。x86 では :int32/:uint32。use Win32::API;
my $CreateUpDownControl = Win32::API::More->new('COMCTL32',
'HANDLE CreateUpDownControl(DWORD dwStyle, int x, int y, int cx, int cy, HANDLE hParent, int nID, HANDLE hInst, HANDLE hBuddy, int nUpper, int nLower, int nPos)');
# my $ret = $CreateUpDownControl->Call($dwStyle, $x, $y, $cx, $cy, $hParent, $nID, $hInst, $hBuddy, $nUpper, $nLower, $nPos);
# dwStyle : DWORD -> DWORD
# x : INT -> int
# y : INT -> int
# cx : INT -> int
# cy : INT -> int
# hParent : HWND -> HANDLE
# nID : INT -> int
# hInst : HINSTANCE -> HANDLE
# hBuddy : HWND -> HANDLE
# nUpper : INT -> int
# nLower : INT -> int
# nPos : INT -> int
# 値渡し構造体は pack() した文字列、または Win32::API::Struct を使用。