Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.5b

Application v 5.24b

  

 

Chapter NineDialog Functions (continued)

DialogEnumerateControls Function

Overview

The DialogEnumerateControls function enumerates all the controls (windows) that are children of the current or specified dialog page.

Syntax/Parameters

Syntax

string[][] = DialogEnumerateControls ( [handle hwPage] );

Parameters

hwPage

An optional handle specifying a dialog page. If omitted, the currently active dialog page is enumerated.

Return Value

Returns a string table containing control information or an empty array on failure. Use the GetLastError function to retrieve error information.

Remarks

The controls are generally set up the dialog resource data. This function allows the controls to be enumerate in tab order. The column key names are as follow:

  Key Name   Description  
  Control Data      
    hCtrlWnd   A hexadecimal representation of the control’s window handle.  
    c_id   A decimal representation of the integer value of the ID. If “-1”, the control does not have an ID.  
    class_name   The name of the class registered to service this control.  
    class_id   A class code. Defined as DEC_CLASS_ group in the SDK  
  Size      
    h   Control height.  
    w   Control width.  
  Absolute Position      
    a_left   The absolute position of the left side of the window.  
    a_top   The absolute position of the top side of the window.  
    a_right   The absolute position of the right side of the window.  
    a_bottom   The absolute position of the bottom side of the window.  
  Relative/Client Position      
    c_left   The client position of the left side of the window.  
    c_top   The client position of the top side of the window.  
    c_right   The client position of the right side of the window.  
    c_bottom   The client position of the bottom side of the window.  
  Properties      
    enabled   Zero or one as to the enabled state.  
    visible   Zero or one as to the visible state.  
    b_style   A string hexadecimal representation of the control’s window basic style. This is a bitwise value with window (WS_) and control specific style bits.  
    x_style   A string hexadecimal representation of the control’s window extended style. This is a bitwise value with window (WS_EX_) and control specific style bits.  
    text   First 256 characters of the caption or text of the control. The control/window may not support this option.  

All measurement values are in pixels. Note that dialog controls are defined in dialog units.

The relative/client position is based on the dialogs page’s client edge.

Control class id values:

  Key Name   Value   Description  
  DEC_CLASS_BUTTON   0   Button (Buttons, check, radio, group)  
  DEC_CLASS_COMBOBOX   1   Combo Box  
  DEC_CLASS_EDIT   2   Edit Control  
  DEC_CLASS_LISTBOX   3   List Box  
  DEC_CLASS_MDICLIENT   4   MDI Client Window  
  DEC_CLASS_RICHEDIT   5   RTF Edit Control  
  DEC_CLASS_SCROLLBAR   6   Scrollbar  
  DEC_CLASS_STATIC   7   Static Control  
  DEC_CLASS_UNKNOWN   -1   Unknown Control Type  

 

Related Functions

Platform Support

Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL

Legato IDE, Legato Basic