BCX_CONTROL function

Purpose: BCX_CONTROL is for the simple creation of custom controls.


 Syntax:

 hCtl = BCX_CONTROL(ClassName$, _
                     hWndParent, _
                       Caption$, _
                         hCtlID, _
                          Xpos%, _
                          Ypos%, _
                         Width%, _
                        Height%, _
                      WinStyle%, _
                    ExWinStyle%)

 Parameters:

  • hCtl The return value is a handle to the new control if the function succeeds. If the function fails, the return value is NULL.
  • ClassName$ Specifies class of control to create. This can be any of the following (in bold print).
    • ListBox List boxes.
    • Button Push, radio, check buttons, group boxes.
    • Static Labels.
    • Edit Text edit boxes.
    • ComboBox Combo boxes, drop-down lists.
    • ScrollBar Scroll bars
    • #32768 USER menus
    • #32770 USER dialog boxes
    • #32771 Alt-tab window
    • msctls_statusbar32 Status bars
    • msctls_progress32 Progress bars
    • msctls_hotkey32 Hot key controls
    • msctls_trackbar32 Trackbars, sliders
    • msctls_updown32 Up-down or spin controls
    • SysAnimate32 Animation control
    • SysTabControl32 Tab control
    • SysHeader32 List view headers
    • SysListView32 List view controls
    • SysTreeView32 Tree view controls
    • SysDateTimePick32 Date and/or time picker
    • SysMonthCal32 Calendar control
    • SysIPAddress32 IP address controls
    • tooltips_class32 ToolTips
    • ToolbarWindow32 Toolbars
    • RICHEDIT Text fields
    • RichEdit20A Text fields
    • RichEdit20W Text fields
  • hWndParent Handle to the parent window of the control being created.
  • Caption$ Not used.
  • hCtlID% Specifies the identifier of the control being created. The identifier is an integer value used by the control being created to notify its parent about events. The identifier must be unique for each control created with the same parent window. As with all controls, if you don't need to interact with it, then you can set its hCtlID% to zero.
  • Xpos% Specifies the initial horizontal position of the control being created. X% is the x-coordinate of the upper-left corner of the control being created relative to the upper-left corner of the parent window's client area.
  • Ypos% Specifies the initial vertical position of the control being created. Y% is the initial y-coordinate of the upper-left corner of the control being created relative to the upper-left corner of the parent window's client area.
  • Height% Specifies the height, in device units or, if the PIXELS optional parameter was specified in the GUI statement, in pixels , of the control being created.
  • Width% Specifies the width, in device units or, if the PIXELS optional parameter was specified in the GUI statement, in pixels , of the control being created.
  • WinStyle% Window Style. See your Win32 SDK or PSDK Reference help for more information about valid Window Styles.
  • ExWinStyle% Extended Window Style. See your Win32 SDK or PSDK Reference help for more information about valid Extended Window Styles.

Remarks: As with all controls, if you don't need to interact with it, then you can set its hCtlID% to zero. BCX_CONTROL translates to the WinAPI function CreateWindowEx.