cSetUpDownPos

The function can be used to set the position of an UpDown control.

Syntax:

cSetUpDownPos (window-handle, position)

Parameters:

(i) window-handle Windows handle to a List View common control.

(i) position New position for the Updown control.

Returns:

(i) @TRUE, if position is changed. @FALSE, if position is not change.

 

The UpDown control often has a companion control called a "buddy" window. For example, an UpDown control with an edit box for a buddy window becomes a spinner control. Changing the position of the UpDown control changes the content of the buddy window. UpDown controls can have a minimum and maximum range, and this function will generate an error if the input value is out of range.

The class name for this control is "msctls_updown32".

 

32-bit Extender

This function is designed for Windows 32-bit application controls. It cannot be used on Windows 64-bit controls.

64-bit Extender

This function is designed for Windows 64-bit application controls. It cannot be used on Windows on 32-bit controls.

 

Example:

AddExtender("wwctl44i.dll",0,"wwctl64i.dll")
; Internet properties keep history.
Run("rundll32.exe", "shell32.dll,Control_RunDLL inetcpl.cpl,@0")
hwndex = DllHwnd("Internet Properties")
hwnd = cWndbyclass(hwndex,"#32770")
hwnd = cWndbyclass(hwnd,"msctls_updown32")
; Get the current value.
position = cGetUpDownPos(hwnd)
position = position + 1
; Set the number of days to keep pages in history via
; the up down control.
cSetUpDownPos(hwnd, position)
Exit

See Also:

cGetUpDownPos, cWndByClass, cWndInfo, DLLhwnd (WIL help).