BCX_UPDOWN function

Purpose: The BCX_UPDOWN function creates an up-down control.


 Syntax:

 hUpDn = BCX_UPDOWN(hWnd, _
                    Xpos%, _
                    Ypos%, _
                       W%, _
                       H%, _
                      Lo%, _
                      Hi%  _
                [, Start%])

 Parameters:

  • hUpDn The return value is the HWND handle to the up-down control
  • hWnd HWND handle of the parent window in which the up-down control is to be placed.
  • Xpos% Left position of control
  • Ypos% Top position of control
  • W% Width of control
  • H% Height of control
  • Lo% Lowest allowed value in buddy control
  • Hi% Highest allowed value in buddy control
  • Start% [OPTIONAL] argument specifying initial value -- default = 0

BCX_GET_UPDOWN function

Purpose: The BCX_GET_UPDOWN function returns an integer containing the value displayed in an up-down control.


 Syntax:

 RetVal% = BCX_GET_UPDOWN(hUpDn)

 Parameters:

  • RetVal% Returned integer containing the value retrieved from an up-down control.
  • hUpDn HWND handle of the up-down control from which the value is to be retrieved.

Example:


 GUI "BCX_GET_UPDOWN Control Demonstration"

 GLOBAL Form1 AS HWND

 GLOBAL UpDn1 AS HWND
 GLOBAL UpDn2 AS HWND
 GLOBAL UpDn3 AS HWND

 GLOBAL Bttn1 AS HWND
 GLOBAL Bttn2 AS HWND
 GLOBAL Bttn3 AS HWND

 SUB FORMLOAD
   Form1 = BCX_FORM("BCX_GET_UPDOWN", 0, 0, 110, 110) 

   UpDn1 = BCX_UPDOWN(Form1, 10, 10, 30, 12, 1, 11, 1)
   UpDn2 = BCX_UPDOWN(Form1, 10, 40, 30, 12, 2, 22, 2)
   UpDn3 = BCX_UPDOWN(Form1, 10, 70, 30, 12, 3, 33, 3)

   Bttn1 = BCX_BUTTON("<--- Get UpDown1", _
                           Form1, 111, 45, 10, 55, 12)
   Bttn2 = BCX_BUTTON("<--- Get UpDown2", _
                           Form1, 222, 45, 40, 55, 12)
   Bttn3 = BCX_BUTTON("<--- Get UpDown3", _
                           Form1, 333, 45, 70, 55, 12)

   CENTER(Form1)
   SHOW(Form1)
 END SUB

 BEGIN EVENTS
 SELECT CASE CBCTL
   CASE 111 : MSGBOX STR$(BCX_GET_UPDOWN(UpDn1)), _
                       "UpDown Control No. 1"
   CASE 222 : MSGBOX STR$(BCX_GET_UPDOWN(UpDn2)), _
                       "UpDown Control No. 2"
   CASE 333 : MSGBOX STR$(BCX_GET_UPDOWN(UpDn3)), _
                       "UpDown Control No. 3"
 END SELECT
 END EVENTS