CreateUpDownControl function (commctrl.h)
Creates an up-down control. Note: This function is obsolete. It is a 16 bit function and cannot handle 32 bit values for range and position.
Syntax
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
);
Parameters
dwStyle
Type: DWORD
Window styles for the control. This parameter should include the WS_CHILD, WS_BORDER, and WS_VISIBLE styles, and it may include any of the window styles specific to the up-down control.
x
Type: int
Horizontal coordinate, in client coordinates, of the upper-left corner of the control.
y
Type: int
Vertical coordinate, in client coordinates, of the upper-left corner of the control.
cx
Type: int
Width, in pixels, of the up-down control.
cy
Type: int
Height, in pixels, of the up-down control.
hParent
Type: HWND
Handle to the parent window of the up-down control.
nID
Type: int
Identifier for the up-down control.
hInst
Type: HINSTANCE
Handle to the module instance of the application creating the up-down control.
hBuddy
Type: HWND
Handle to the window associated with the up-down control. If this parameter is NULL, the control has no buddy window.
nUpper
Type: int
Upper limit (range) of the up-down control.
nLower
Type: int
Lower limit (range) of the up-down control.
nPos
Type: int
Position of the control.
Return value
Type: HWND
If the function succeeds, the return value is the window handle to the up-down control. If the function fails, the return value is NULL.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Vista [desktop apps only] |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Target Platform | Windows |
Header | commctrl.h |
Library | Comctl32.lib |
DLL | Comctl32.dll |