Spin Control

  1. Spin Control Game
  2. Spin Control Definition
  3. Spin Control Politics
  4. Win32 Spin Control
  5. Spin Control Politics
-->

This section contains information about the programming elements used with up-down controls.

Overviews

TopicContents
Up-Down ControlsAn up-down control is a pair of arrow buttons that the user can click to increment or decrement a value, such as a scroll position or a number displayed in a companion control (called a buddy window).

Functions

TopicContents
CreateUpDownControlCreates 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.

Messages

TopicContents
UDM_GETACCELRetrieves acceleration information for an up-down control.
UDM_GETBASERetrieves the current radix base (that is, either base 10 or 16) for an up-down control.
UDM_GETBUDDYRetrieves the handle to the current buddy window.
UDM_GETPOSRetrieves the current position of an up-down control with 16-bit precision.
UDM_GETPOS32Returns the 32-bit position of an up-down control.
UDM_GETRANGERetrieves the minimum and maximum positions (range) for an up-down control.
UDM_GETRANGE32Retrieves the 32-bit range of an up-down control.
UDM_GETUNICODEFORMATRetrieves the Unicode character format flag for the control.
UDM_SETACCELSets the acceleration for an up-down control.
UDM_SETBASESets the radix base for an up-down control. The base value determines whether the buddy window displays numbers in decimal or hexadecimal digits. Hexadecimal numbers are always unsigned, and decimal numbers are signed.
UDM_SETBUDDYSets the buddy window for an up-down control.
UDM_SETPOSSets the current position for an up-down control with 16-bit precision.
UDM_SETPOS32Sets the position of an up-down control with 32-bit precision.
UDM_SETRANGESets the minimum and maximum positions (range) for an up-down control.
UDM_SETRANGE32Sets the 32-bit range of an up-down control.
UDM_SETUNICODEFORMATSets the Unicode character format flag for the control. This message allows you to change the character set used by the control at run time rather than having to re-create the control.

Notifications

  1. A spin control is a Windows control equipped with two opposite arrows. The user clicks one of the arrows at one time to increase or decrease the current value of the control. The value held by the control is also called its position. The values of a spin control range from a minimum to a maximum.
  2. Spin, the scooter company owned by Ford, is testing a new scooter that can be controlled by a remote operator. The scooters, Segway’s T60 model, look different than Spin’s regular fleet with the.
TopicContents
NM_RELEASEDCAPTURE (up-down)Notifies an up-down control's parent window that the control is releasing mouse capture. This notification is sent in the form of a WM_NOTIFY message.
UDN_DELTAPOSSent by the operating system to the parent window of an up-down control when the position of the control is about to change. This happens when the user requests a change in the value by pressing the control's up or down arrow. The UDN_DELTAPOS message is sent in the form of a WM_NOTIFY message.

Spincontrol Group: the skin specialists. Clinical Trial Centers in France, Canada, Thailand, India & Indonesia To substantiate the safety and efficacy of your. Political spin, in politics, the attempt to control or influence communication in order to deliver one’s preferred message. Spin is a pejorative term often used in the context of public relations practitioners and political communicators.

Structures

TopicContents
NMUPDOWNContains information specific to up-down control notification messages. It is identical to and replaces the NM_UPDOWN structure.
UDACCELContains acceleration information for an up-down control.

Spin Control Game

Constants

Spin Control Definition

TopicContents
Up-Down Control StylesThis section lists the styles used when creating up-down controls.
  • MFC Tutorial
ControlSpin ControlControl
  • MFC Useful Resources
  • Selected Reading

A Spin Button Control (also known as an up-down control) is a pair of arrow buttons that the user can click to increment or decrement a value, such as a scroll position or a number displayed in a companion control. it is represented by CSpinButtonCtrl class.

Spin Control Politics

Here is the list of methods in CSpinButtonCtrl class −

Sr.No.Name & Description
1

Create

Creates a spin button control and attaches it to a CSpinButtonCtrl object.

2

CreateEx

Creates a spin button control with the specified Windows extended styles and attaches it to a CSpinButtonCtrl object.

3

GetAccel

Retrieves acceleration information for a spin button control.

4

GetBase

Retrieves the current base for a spin button control.

5

GetBuddy

Retrieves a pointer to the current buddy window.

6

GetPos

Retrieves the current position of a spin button control.

7

GetRange

Retrieves the upper and lower limits (range) for a spin button control.

8

SetAccel

Sets the acceleration for a spin button control.

9

SetBase

Sets the base for a spin button control.

10

SetBuddy

Sets the buddy window for a spin button control.

11

SetPos

Sets the current position for the control.

12

SetRange

Sets the upper and lower limits (range) for a spin button control.

Control

Here is the list of messages mapping for Spin Button control.

MessageMap entryDescription
BN_CLICKEDON_BN_CLICKED( <id>, <memberFxn> )The framework calls this member function when is button clicked.
BN_DISABLEON_BN_DISABLE( <id>, <memberFxn> )The framework calls this member function when button is disabled.
BN_DOUBLECLICKEDON_BN_DOUBLECLICKED( <id>, <memberFxn> )The framework calls this member function when button is double clicked.
BN_PAINTON_BN_PAINT( <id>, <memberFxn> )The framework calls this member function when an application makes a request to repaint a button.

Win32 Spin Control

Let us look into a simple example of Spin button by creating a new MFC dialog based application.

Step 1 − Add one Spin Control and one Edit control from the Toolbox.

Spin Control Politics

Step 2 − Go to the Properties of Spin Control and set the values of Auto Buddy and Set Buddy Integer to True.

Comments are closed.