Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- The Guide to Clip-4-Win version 3.0 - <b>@ id ... button spin</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
@ ID ... BUTTON SPIN
Use a spin button in a dialog
------------------------------------------------------------------------------

Syntax
#include "windows.ch"
#include "topclass.ch"   --or--   #define  NO_C4WCLASS
#include "commands.ch"
@ ID  <nId>  BUTTON SPIN
     [ VERTICAL ]
     [ HORIZONTAL ]
     [ HELP <oHelp> ]
     [ <clauses> ]

Arguments
VERTICAL (the default) specifies arrows that point up and
down.

HORIZONTAL specifies arrows that point left and right.

HELP <oHelp> can be used to specify a help object.

See the generic @ ID ... <ControlType> command for details of
the other <clauses> and/or parameters allowed.

Description
This command can be used to put a spin button in a dialog.  A
spin button is a counter displayed as two arrows, to
increment/decrement the count.

When an arrow is clicked, the button updates its count and
informs the dialog by sending it a WM_COMMAND message, with a
BN_CLICKED notification code.  This can be decoded and used to
carry out any <cCmd> associated with the button.  (Such
decoding is done automatically by the OnCommand() method, for
OO dialogs, or by the OnCommand() function, for non-OO
dialogs using CREATE DIALOG . . . SHOW DIALOG.)

As this is implemented using an owner-drawn button, to put
this control in a dialog you should use a button with the
BS_OWNERDRAW style.

See the generic @ ID ... <ControlType> command for other
information.


Example
@ ID  IDD_BTN  BUTTON SPIN  Clicked

METHOD Clicked(oSpin) CLASS MyDialog
// oSpin:Position is the current count
return 1


See Also: @ ID ...

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson