Position and Acceleration
After an up-down control is created, you can change the control's current
position, minimum position, and maximum position by sending messages. You can also
change the radix base used to display the current position in the buddy window
and the rate at which the current position changes when the up or down arrow is
clicked.
To retrieve the current position of an up-down control, use the
UDM_GETPOS message. For an up-down control with a buddy window, the current position is
the number in the buddy window's caption. Because the caption may have changed
(for example, the user may have edited the text of an edit control), the
up-down control retrieves the current caption and updates its current position
accordingly.
The buddy window's caption may be either a decimal or hexadecimal string,
depending on the radix base (that is, either base 10 or 16) of the up-down control.
You can set the radix base by using the
UDM_SETBASE message and retrieve the radix base by using the
UDM_GETBASE message.
The
UDM_SETPOS message sets the current position of a buddy window. Note that, unlike a
scroll bar, an up-down control automatically changes its current position when the
up and down arrows are clicked. An application, therefore, does not need to set
the current position when processing the
WM_VSCROLL or
WM_HSCROLL message.
You can change the minimum and maximum positions of an up-down control by
using the
UDM_SETRANGE message. The maximum position may be less than the minimum, and in that case
clicking the up arrow
decreases the current position. To put it another way, up means moving towards the
maximum position. To retrieve the minimum and maximum positions for an up-down
control, use the
UDM_GETRANGE message.
You can control the rate at which the position changes when the user holds
down an arrow button by setting the up-down control's
acceleration. The acceleration is defined by an array of
UDACCEL structures. Each structure specifies a time interval and the number of units
by which to increment or decrement at the end of that interval. To set the
acceleration, use the
UDM_SETACCEL message. To retrieve acceleration information, use the
UDM_GETACCEL message.
- Software for developers
-
Delphi Components
.Net Components
Software for Android Developers
- More information resources
-
MegaDetailed.Net
Unix Manual Pages
Delphi Examples
- Databases for Amazon shops developers
-
Amazon Categories Database
Browse Nodes Database