Skip to main content

Sal

Namespace: PPJ.Runtime

Assembly: PPJ.Runtime.49 (4.9.0.0)

Contains all Sal.* static functions.

public class Sal

Properties

Static memberInterpreter

ScriptEngine: Returns the instance of the interpreter used by SalCompileAndEvaluate.

Static memberSalReportType

Type: Returns/Sets the type of the ISalReport implementation.

Methods

Static memberAbort(exitCode)

Halts processing of the current menu action, message action, or application action.

ParameterTypeDescription
exitCodeSalNumberThe status of the exit performed by Abort(). Not used.

Returns: SalBoolean. AbortException

Use this function when you want to terminate the current calling sequence without returning a status. For example, if your application is several layers into internal function calls and an error occurs, this will terminate the current calling sequence of functions and leaves the application in the state it was prior to the first function call of that sequence.

Static memberActiveXAutoErrorMode(on)

Turns on/off automatic COM error handling.

ParameterTypeDescription
onSalBoolean

Returns: SalBoolean.

Static memberActiveXDoVerb(ctrl, verb, size)

Perform one of the object's enumerated actions.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
verbSalNumber
sizeSalBoolean

Returns: SalBoolean.

Static memberActiveXGetObject(ctrl, obj)

Returns the COM object for the specified AX control.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
objSalObject

Returns: SalBoolean.

Static memberAppDisable()

Disables input to all open forms.

Returns: SalBoolean. true if the function succeeds and false if it fails.

Use AppDisable and AppEnable when there are multiple applications running simultaneously and you want to control which application receives user input.

Static memberAppEnable()

Enables input to all open forms that were disabled.

Returns: SalBoolean. true if the function succeeds and false if it fails.

Use AppDisable and AppEnable when there are multiple applications running simultaneously and you want to control which application receives user input.

Static memberAppFind(name, activate)

Finds a visible top-level window.

ParameterTypeDescription
nameSalStringThe name of the application without the extension.
activateSalBooleanIf you set activate to true, AppFind() also activates the application's window.

Returns: SalWindowHandle. the window

If you specify the calling application's name in AppFind(), it can only find another running instance of it. You can use this feature to prevent more than one instance of an application running. If there are multiple instances of a single application, AppFind finds and returns the window handle of the first instance it finds If an application has multiple top-level windows, AppFind returns the handle of the first top-level window it finds. Calling AppFind() multiple times does not always return the handle of the same window. If an application does not have visible windows, then AppFind() cannot find it.

Static memberArrayAvg(array)

Returns the average value of all the numbers in an array.

ParameterTypeDescription
arraySalArray<SalNumber>The name of an array of numbers.

Returns: SalNumber. the average value in an array of numbers.

Static memberArrayDimCount(array, dim)

ParameterTypeDescription
arraySalArray
dimSalNumber&

Returns: SalBoolean.

Static memberArrayGetLowerBound(array, dim, bound)

ParameterTypeDescription
arraySalArray
dimSalNumber
boundSalNumber&

Returns: SalBoolean.

Static memberArrayGetUpperBound(array, dim, bound)

ParameterTypeDescription
arraySalArray
dimSalNumber
boundSalNumber&

Returns: SalBoolean.

Static memberArrayIsEmpty(array)

Determines if a dynamic array contains data.

ParameterTypeDescription
arraySalArrayThe name of the array to query.

Returns: SalBoolean. true if the array contains no data and false if it is has data.

Static memberArrayMax(array)

Returns the maximum value in an array of numbers.

ParameterTypeDescription
arraySalArray<SalNumber>The name of an array of numbers.

Returns: SalNumber. the maximum value in an array of numbers.

Static memberArrayMin(array)

Returns the minimum value in an array of numbers.

ParameterTypeDescription
arraySalArray<SalNumber>The name of an array of numbers.

Returns: SalNumber. the minimum value in an array of numbers.

Static memberArrayQueryBounds(array, min, max)

ParameterTypeDescription
arraySalArray
minSalNumber&
maxSalNumber&

Returns: SalNumber.

Static memberArraySetBounds(array, lower, upper)

Sets the lower and upper bound of an array for the first dimension only. NOTE: In SAL this function was named SalSetArrayBounds().

ParameterTypeDescription
arraySalArrayThe name of the array to query.
lowerSalNumberThe new lower bound.
upperSalNumberThe new upper bound or AC_Dynamic.

Returns: SalBoolean. bOk

Static memberArraySetUpperBound(array, dim, bound)

Sets the upper bound of an array. The first dimension is 1.

ParameterTypeDescription
arraySalArrayThe name of the array.
dimSalNumberNumber of the dimension. The first dimension is one, the second is two, and so on.
boundSalNumberUpper bound value.

Returns: SalBoolean. true if the function succeeds and false if it fails.

When you call this function for a dimension other than the first, most of the array's data must be copied. There can be a performance cost when you call this function for any dimension but the first one.

Static memberArraySum(array)

Returns the sum of the elements in an array of numbers.

ParameterTypeDescription
arraySalArray<SalNumber>The name of an array of numbers.

Returns: SalNumber. the sum of the elements in an array of numbers.

Static memberBringWindowToTop(ctrl)

Brings a window to the top of all overlapping windows.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: SalBoolean. true if the function succeeds and false if it fails.

Static memberCenterWindow(ctrl)

Centers a window. If the window is a top-level window, it centers it on the desktop. If the window is a child window, it centers it on top of its parent.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: SalBoolean. true if the function succeeds and false if it fails.

Static memberClearField(ctrl)

Clears the value from a data field, multi line field, or table window column.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: SalBoolean. true if the function succeeds and false if it fails.

Static memberColorFromRGB(red, green, blue)

Composes a color from red, green, and blue values.

ParameterTypeDescription
redSalNumberA number from 0 to 255.
greenSalNumberA number from 0 to 255.
blueSalNumberA number from 0 to 255.

Returns: SalNumber. the color created.

Static memberColorGet(ctrl, colorIndex)

Gets a window's color.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
colorIndexSalNumberThe color part of the control, represented by one of these constants: COLOR_IndexCellTextCOLOR_IndexTransparentCOLOR_IndexWindowCOLOR_IndexWindowText

Returns: SalNumber. the color

If you specify COLOR_IndexTransparent in the second parameter and the transparent color is not set, ColorGet() returns COLOR_None.

Static memberColorGetSysColor(colorIndex)

Gets a system color.

ParameterTypeDescription
colorIndexSalNumberThe color of a part of the window, represented by one of these constants: COLOR_SysWindowCOLOR_SysWindowFrameCOLOR_SysWindowText

Returns: SalNumber. the color

Static memberColorSet(ctrl, colorIndex, colorValue)

Sets a window's color.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
colorIndexSalNumberThe color of a part of the window, represented by one of these constants: COLOR_IndexCellTextCOLOR_IndexTransparentCOLOR_IndexWindowCOLOR_SysWindowText
colorValueSalNumberA user-defined value, a value formulated using ColorFromRGB or any of the predefined windows colors. To turn off the transparent color, specify COLOR_None Note: When specifying an explicit RGB color, the COLORREF value has a hexadecimal form of 0x00bbggrr.

Returns: SalBoolean. true if the function succeeds and false if it fails.

Static memberColorToRGB(colorValue, red, green, blue)

ParameterTypeDescription
colorValueSalNumber
redSalNumber&
greenSalNumber&
blueSalNumber&

Returns: SalBoolean.

Static memberColorToRGB(color, red, green, blue)

ParameterTypeDescription
colorColor
redSalNumber&
greenSalNumber&
blueSalNumber&

Returns: SalBoolean.

Static memberCompileAndEvaluate(expression, error, errorPos, numReturn, sReturn, dtReturn, windowReturn, inhibitErrors, context)

ParameterTypeDescription
expressionSalString
errorSalNumber&
errorPosSalNumber&
numReturnSalNumber&
sReturnSalString&
dtReturnSalDateTime&
windowReturnSalWindowHandle&
inhibitErrorsSalBoolean
contextObject

Returns: SalNumber.

Static memberContextBreak()

Deprecated memberDeprecated: Use this. Not supported.

Returns: SalString.

Static memberContextCurrent(context)

Returns an instance of SalStringContext wrapping the current context reference.

ParameterTypeDescription
contextObject

Returns: SalStringContext.

Static memberContextMenuSetPopup(ctrl, menuName, flags)

Defines a named popup menu that displays automatically when a window receives SAM_ContextMenu.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
menuNameSalStringA named menu defined in one of the Named Menus section in ctrl, ctrl's MDI window parent, or Global Declarations.
flagsSalNumberSet this to CM_TableCell to replace the default menu that Windows displays when the mouse pointer is in an editable table window cell. Otherwise, set this to zero.

Returns: SalBoolean. true if this function succeeds and false otherwise.

For some windows, this function also affects how the window processes a right mouse button click: List box-Right click selects the line under the cursor.If the line is already selected, there is no effect. Combo box-For a combo box where the list is always displayed, the behavior is the same as for a list box. Table window-Right click selects the row under the cursor. If the row is already selected there is no effect.

Static memberContextMenuSetPopup(ctrl, menuType, flags)

Defines a named popup menu that displays automatically when a window receives SAM_ContextMenu.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
menuTypeTypethe Type of the menu
flagsSalNumberSet this to CM_TableCell to replace the default menu that Windows displays when the mouse pointer is in an editable table window cell. Otherwise, set this to zero.

Returns: SalBoolean. true if this function succeeds and false otherwise.

Static memberCreateWindow(wndToCreate, parent, parameters)

Creates modeless dialog boxes, MDI windows, form windows, and top-level table windows at runtime.

ParameterTypeDescription
wndToCreateTypeThe name of the window to create.
parentControlThe name of the parent window. Specify hWndNULL if there is no owner window. Note that if you create a top-level form inside a MDI window, then that MDI window will always own the form.
parametersObject[]The window parameters.

Returns: SalWindowHandle. the new window.

If you specify a parent, the new window always displays on top of its parent, closes when its parent closes, and hides when its parent is minimized. CreateWindow can pass data to and from the window being created by accepting a variable number of parameters. The data types of these parameters must match the parameter data types of the window being created. You can use window parameters to return information from the window being created by using a reference.

Static memberCreateWindow(formName, parent, parameters)

Creates modeless dialog boxes, MDI windows, form windows, and top-level table windows at runtime.

ParameterTypeDescription
formNameSalStringThe name of the window to create.
parentControlThe name of the parent window. Specify hWndNULL if there is no owner window. Note that if you create a top-level form inside a MDI window, then that MDI window will always own the form.
parametersObject[]The window parameters.

Returns: SalWindowHandle. the new window.

If you specify a parent, the new window always displays on top of its parent, closes when its parent closes, and hides when its parent is minimized. CreateWindow can pass data to and from the window being created by accepting a variable number of parameters. The data types of these parameters must match the parameter data types of the window being created. You can use window parameters to return information from the window being created by using a reference.

Static memberCreateWindow(formName, parent)

Creates modeless dialog boxes, MDI windows, form windows, and top-level table windows at runtime.

ParameterTypeDescription
formNameSalStringThe name of the window to create.
parentControlThe name of the parent window. Specify hWndNULL if there is no owner window. Note that if you create a top-level form inside a MDI window, then that MDI window will always own the form.

Returns: SalWindowHandle. the new window.

If you specify a parent, the new window always displays on top of its parent, closes when its parent closes, and hides when its parent is minimized. CreateWindow can pass data to and from the window being created by accepting a variable number of parameters. The data types of these parameters must match the parameter data types of the window being created. You can use window parameters to return information from the window being created by using a reference.

Static memberCreateWindowEx(wndToCreate, parent, left, top, width, height, flags, parameters)

Creates a form window, dialog box, or table window as a child of another form window, dialog box, or toolbar at runtime.

ParameterTypeDescription
wndToCreateTypeThe name of the window to create.
parentControlThe name of the parent window. Specify hWndNULL if there is no owner window. Note that if you create a top-level form inside a MDI window, then that MDI window will always own the form.
leftSalNumberPosition of the x-coordinate of the upper-left corner of the window in form units.
topSalNumberPosition of the y-coordinate of the upper-left corner of the window in form units.
widthSalNumberWidth of the window in form units.
heightSalNumberHeight of the window in form units.
flagsSalNumberYou can combine these flags with the '|' operator.
CREATE_AsChild: Create the window as a child of parent which must be a form, dialog box or tool bar.
CREATE_Border: When used with CREATE_AsChild, the window will have a border.
CREATE_Hidden: Create the window, but do not show it.
parametersObject[]The window parameters.

Returns: SalWindowHandle. the new window.

If you specify a parent, the new window always displays on top of its parent, closes when its parent closes, and hides when its parent is minimized. CreateWindowEx can pass data to and from the window being created by accepting a variable number of parameters. The data types of these parameters must match the parameter data types of the window being created. You can use window parameters to return information from the window being created by using a reference.

Static memberCreateWindowEx(formName, parent, left, top, width, height, flags)

Creates a form window, dialog box, or table window as a child of another form window, dialog box, or toolbar at runtime.

ParameterTypeDescription
formNameSalStringThe name of the window to create.
parentControlThe name of the parent window. Specify hWndNULL if there is no owner window. Note that if you create a top-level form inside a MDI window, then that MDI window will always own the form.
leftSalNumberPosition of the x-coordinate of the upper-left corner of the window in form units.
topSalNumberPosition of the y-coordinate of the upper-left corner of the window in form units.
widthSalNumberWidth of the window in form units.
heightSalNumberHeight of the window in form units.
flagsSalNumberYou can combine these flags with the '|' operator.
CREATE_AsChild: Create the window as a child of parent which must be a form, dialog box or tool bar.
CREATE_Border: When used with CREATE_AsChild, the window will have a border.
CREATE_Hidden: Create the window, but do not show it.

Returns: SalWindowHandle. the new window.

If you specify a parent, the new window always displays on top of its parent, closes when its parent closes, and hides when its parent is minimized. CreateWindowExFromStr can pass data to and from the window being created by accepting a variable number of parameters. The data types of these parameters must match the parameter data types of the window being created. You can use window parameters to return information from the window being created by using a reference.

Static memberCreateWindowExFromStr(formName, parent, left, top, width, height, flags)

Creates a form window, dialog box, or table window as a child of another form window, dialog box, or toolbar at runtime.

ParameterTypeDescription
formNameSalStringThe name of the window to create.
parentControlThe name of the parent window. Specify hWndNULL if there is no owner window. Note that if you create a top-level form inside a MDI window, then that MDI window will always own the form.
leftSalNumberPosition of the x-coordinate of the upper-left corner of the window in form units.
topSalNumberPosition of the y-coordinate of the upper-left corner of the window in form units.
widthSalNumberWidth of the window in form units.
heightSalNumberHeight of the window in form units.
flagsSalNumberYou can combine these flags with the '|' operator.
CREATE_AsChild: Create the window as a child of parent which must be a form, dialog box or tool bar.
CREATE_Border: When used with CREATE_AsChild, the window will have a border.
CREATE_Hidden: Create the window, but do not show it.

Returns: SalWindowHandle. the new window.

If you specify a parent, the new window always displays on top of its parent, closes when its parent closes, and hides when its parent is minimized. CreateWindowExFromStr can pass data to and from the window being created by accepting a variable number of parameters. The data types of these parameters must match the parameter data types of the window being created. You can use window parameters to return information from the window being created by using a reference.

Static memberCreateWindowFromStr(formName, parent)

Creates modeless dialog boxes, MDI windows, form windows, and top-level table windows at runtime.

ParameterTypeDescription
formNameSalStringThe name of the window to create.
parentControlThe name of the parent window. Specify hWndNULL if there is no owner window. Note that if you create a top-level form inside a MDI window, then that MDI window will always own the form.

Returns: SalWindowHandle. the new window.

If you specify a parent, the new window always displays on top of its parent, closes when its parent closes, and hides when its parent is minimized. CreateWindowFromStr can pass data to and from the window being created by accepting a variable number of parameters. The data types of these parameters must match the parameter data types of the window being created. You can use window parameters to return information from the window being created by using a reference.

Static memberCursorClear(ctrl, type)

Clears a window's cursor.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
typeSalNumber

Returns: SalBoolean.

Static memberCursorSet(ctrl, resource, type)

Sets a window's cursor.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
resourceSalResourceCursor
typeSalNumber

Returns: SalBoolean.

Static memberCursorSet(ctrl, resourceId, type)

Sets a window's cursor.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
resourceIdSalNumber
typeSalNumber

Returns: SalBoolean.

Static memberCursorSetFile(ctrl, fileName, type)

Sets an application-defined cursor for the specified window. Use this function to set the cursor from an image stored in a file.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
fileNameSalString
typeSalNumber

Returns: SalBoolean.

Static memberCursorSetString(ctrl, blob, type)

Sets a window's cursor from a string variable.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
blobSalString
typeSalNumber

Returns: SalBoolean.

Static memberDateConstruct(year, month, day, hour, minute, second)

Returns the date/time constructed from the parameters year, nMonth, nDay, nHour, minute, and nSecond.

ParameterTypeDescription
yearSalNumber
monthSalNumber
daySalNumber
hourSalNumber
minuteSalNumber
secondSalNumber

Returns: SalDateTime.

Static memberDateCurrent()

Returns the PC's current date/time.

Returns: SalDateTime.

Static memberDateDay(dateTime)

Returns the day portion (1 to 31) of a date/time value or returns -1 if you specify DATETIME_Null as a parameter.

ParameterTypeDescription
dateTimeSalDateTime

Returns: SalNumber.

Static memberDateHour(dateTime)

Returns the hour portion (0 to 23) of a date/time value or returns -1 if you specify DATETIME_Null as a parameter.

ParameterTypeDescription
dateTimeSalDateTime

Returns: SalNumber.

Static memberDateMinute(dateTime)

Returns the minute portion (0 to 59) of a date/time value or returns -1 if you specify DATETIME_Null as a parameter.

ParameterTypeDescription
dateTimeSalDateTime

Returns: SalNumber.

Static memberDateMonth(dateTime)

Returns the month portion (1 to 12) of a date/time value or returns -1 if you specify DATETIME_Null as a parameter.

ParameterTypeDescription
dateTimeSalDateTime

Returns: SalNumber.

Static memberDateMonthBegin(dateTime)

Returns the date of the first day of the month or it returns DATETIME_Null if the value you specify is null. For example, if dateTime is December 25, 1992, SalDateMonthBegin returns December 1, 1992.

ParameterTypeDescription
dateTimeSalDateTime

Returns: SalDateTime.

Static memberDateQuarter(dateTime)

Returns the quarter of the year (1 to 4) of a date/time value or returns -1 if you specify DATETIME_Null as a parameter.

ParameterTypeDescription
dateTimeSalDateTime

Returns: SalNumber.

Static memberDateQuarterBegin(dateTime)

Returns the date of the first day of the quarter of a date/time value or it returns DATETIME_Null if the value you specify is null.

ParameterTypeDescription
dateTimeSalDateTime

Returns: SalDateTime.

Static memberDateSecond(dateTime)

Returns the seconds portion (0 to 59) of a date/time value or returns -1 if you specify DATETIME_Null as a parameter.

ParameterTypeDescription
dateTimeSalDateTime

Returns: SalNumber.

Static memberDateToStr(date, target)

ParameterTypeDescription
dateSalDateTime
targetSalString&

Returns: SalNumber.

Static memberDateWeekBegin(dateTime)

Returns the date of the previous Monday or the current day if it is a Monday or it returns DATETIME_Null if the value you specify is null.

ParameterTypeDescription
dateTimeSalDateTime

Returns: SalDateTime.

Static memberDateWeekday(dateTime)

Returns the day of the week as a number between 0 and 6 or returns -1 if you specify DATETIME_Null as a parameter. 0 represents Saturday, 1 represents Sunday, and so on.

ParameterTypeDescription
dateTimeSalDateTime

Returns: SalNumber.

Static memberDateYear(dateTime)

Returns the year portion of a date or returns -1 if you specify DATETIME_Null as a parameter.

ParameterTypeDescription
dateTimeSalDateTime

Returns: SalNumber.

Static memberDateYearBegin(dateTime)

Returns the date of the first day of the year or it returns DATETIME_Null if the value you specify is null.

ParameterTypeDescription
dateTimeSalDateTime

Returns: SalDateTime.

Static memberDestroyWindow(ctrl)

Destroys a form window, a top-level table window, or a modeless dialog box created with SalCreateWindow.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: SalBoolean. true if the function succeeds and false if it fails.

Static memberDisableWindow(ctrl)

Disables keyboard and mouse input to a window. If the window contains text (for example, a push button), the text is grayed. If the window is a data field, it cannot receive the focus.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: SalBoolean. true if the function succeeds and false if it fails.

Static memberDisableWindowAndLabel(ctrl)

Disables keyboard and mouse input to a window and grays out its associated label. A label is the label control that immediately precedes the window. The label control must have a mnemonic. If the window contains text (for example, a push button), the text is grayed. If the window is a data field, it cannot receive the focus.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: SalBoolean. true if the function succeeds and false if it fails.

Static memberDlgChooseColor(ctrl, colorValue)

ParameterTypeDescription
ctrlControl
colorValueSalNumber&

Returns: SalBoolean.

Static memberDlgChooseFont(ctrl, name, size, enhancements, color)

ParameterTypeDescription
ctrlControl
nameSalString&
sizeSalNumber&
enhancementsSalNumber&
colorSalNumber&

Returns: SalBoolean.

Static memberDlgGetDockStatus(windowDlg, orientation)

ParameterTypeDescription
windowDlgSalWindowHandle
orientationSalNumber&

Returns: SalBoolean.

Static memberDlgOpenFile(ctrl, dialogTitle, filters, filtersCount, filterIndex, fileName, filePath)

ParameterTypeDescription
ctrlControl
dialogTitleSalString
filtersSalArray<SalString>
filtersCountSalNumber
filterIndexSalNumber&
fileNameSalString&
filePathSalString&

Returns: SalBoolean.

Static memberDlgOpenFileMulti(ctrl, dialogTitle, filters, filtersCount, filterIndex, fileNames, filePaths, fileCount)

ParameterTypeDescription
ctrlControl
dialogTitleSalString
filtersSalArray<SalString>
filtersCountSalNumber
filterIndexSalNumber&
fileNamesSalArray`1&
filePathsSalArray`1&
fileCountSalNumber&

Returns: SalBoolean.

Static memberDlgSaveFile(ctrl, dialogTitle, filters, filtersCount, filterIndex, fileName, filePath)

ParameterTypeDescription
ctrlControl
dialogTitleSalString
filtersSalArray<SalString>
filtersCountSalNumber
filterIndexSalNumber&
fileNameSalString&
filePathSalString&

Returns: SalBoolean.

Static memberDlgSetDockStatus(windowDlg, orientation)

Causes a dialog box to dock or undock with a parent window.

ParameterTypeDescription
windowDlgSalWindowHandleThe name of a dialog box.
orientationSalNumberA flag indicating which edge of the dialog box should be used for docking.

Returns: SalBoolean. true if the function succeeds and false if an error occurs. Possible error conditions include: Dialog box was created without a parent; dialog box was created with "Docking Enabled" attribute=No; the parent window does not permit docking, or does not permit docking with the orientation used in the function call; the dialog box is modal; the window handle used in the first parameter is not a dialog box.

Not implemented- always returns false Possible values for orientation: DOCK_Top The dialog is docked at top edge of the parent window. DOCK_Left The dialog is docked at left edge of the parent window. DOCK_Bottom The dialog is docked at bottom edge of the parent window. DOCK_Right The dialog is docked at right edge of the parent window. DOCK_None The dialog box is not docked (it is free-floating). DOCK_Any The dialog is docked at any of the four edges of the parent window.

Static memberDragDropDisableDrop()

Disables dropping while in drag mode.

Returns: SalBoolean.

Static memberDragDropEnableDrop()

Enables dropping while in drag mode.

Returns: SalBoolean.

Static memberDragDropGetSource(window, x, y)

ParameterTypeDescription
windowSalWindowHandle&
xSalNumber&
ySalNumber&

Returns: SalBoolean.

Static memberDragDropGetTarget(windowTarget, x, y)

ParameterTypeDescription
windowTargetSalWindowHandle&
xSalNumber&
ySalNumber&

Returns: SalBoolean.

Static memberDragDropStart(ctrl)

Initiates drag mode.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: SalBoolean.

Static memberDragDropStop()

Ends drag mode.

Returns: SalBoolean.

Static memberDrawMenuBar(ctrl)

Redraws the menu bar for a given form window or top-level table window. Call this function to cause top-level menu items to be enabled or disabled.

ParameterTypeDescription
ctrlControlTarget control whose menu bar you want to redraw.

Returns: SalBoolean. true if the function succeeds and false if it fails.

For a top-level menu item or pop-up menu, an Enabled when variable is only evaluated when you call SalDrawMenuBar or when the menu bar is redrawn for other reasons.

Static memberDropFilesAcceptFiles(ctrl, accept)

Indicates whether a window can accept a file from Windows' File Manager.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
acceptSalBooleanSpecify whether the control can accept a file from Windows' File Manager.

Returns: SalBoolean. true if the function succeeds and false if it fails.

The default for editable pictures is true; the default for all other window types is false.

Static memberDropFilesQueryFiles(ctrl, arrayFiles)

Retrieves the names of the files dropped on a window. Receipt of the SAM_DropFiles message indicates that the user dropped files onto the window.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
arrayFilesSalArray<SalString>Receives the names of the dropped files.

Returns: SalNumber. the number of dropped files if the function succeeds and zero (0) if the function fails.

DropFilesQueryFiles fails unless it is called as the result of receiving the SAM_DropFiles message.

Static memberDropFilesQueryPoint(ctrl, x, y)

ParameterTypeDescription
ctrlControl
xSalNumber&
ySalNumber&

Returns: SalBoolean.

Static memberEditCanCopy()

Indicates whether you can copy from the currently selected control on the clipboard.

Returns: SalBoolean. bOk

Static memberEditCanCopyTo()

Deprecated memberDeprecated: Not supported. There is no OLE support in .NET. Not Supported.

Returns: SalBoolean.

Static memberEditCanCut()

Indicates whether you can cut from the currently selected control on the clipboard.

Returns: SalBoolean. true if data is selected and false otherwise

This function returns true if the data in a data field, multi-line field, table window column, or editable picture is selected.

Static memberEditCanPaste()

Returns true if there is data on the Clipboard that can be pasted into the currently selected control

Returns: SalBoolean. true if there is data on the Clipboard to be pasted and false otherwise.

Static memberEditCanPasteFrom()

Deprecated memberDeprecated: Not supported. There is no OLE support in .NET. Not Supported.

Returns: SalBoolean.

Static memberEditCanUndo()

Returns true if the if there is any editing of the currently selected control that can be undone.

Returns: SalBoolean. true if there is any editing to undo and false otherwise.

Static memberEditClear()

Deletes selected data from the currently selected control

Returns: SalBoolean. true if the function succeeds and false if it fails.

Static memberEditCopy()

Copies selected data from the currently selected control and puts it on the Clipboard.

Returns: SalBoolean. true if the function succeeds and false if it fails.

Static memberEditCopyString(str)

Copies a string to the Clipboard as text.

ParameterTypeDescription
strSalStringThe string to copy to the Clipboard.

Returns: SalBoolean. true if the function succeeds and false if it fails.

Static memberEditCopyTo()

Deprecated memberDeprecated: Not supported. There is no OLE support in .NET. Not Supported.

Returns: SalBoolean.

Static memberEditCut()

Cuts selected data from the currently selected control and puts it on the Clipboard.

Returns: SalBoolean. true if the function succeeds and false if it fails.

Static memberEditPaste()

Pastes data from the Clipboard into the currently selected control

Returns: SalBoolean. true if the function succeeds and false if it fails.

Static memberEditPasteFrom()

Deprecated memberDeprecated: Not supported. There is no OLE support in .NET. Not supported

Returns: SalBoolean.

Static memberEditPasteString(str)

ParameterTypeDescription
strSalString&

Returns: SalBoolean.

Static memberEditUndo()

Undoes the last edit to the currently selected control

Returns: SalBoolean. true if the function succeeds and false if it fails.

Editing that you can undo includes inserting text, cutting text, clearing text, and pasting text.

Static memberEnableWindow(ctrl)

Enables keyboard and mouse input to a window.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: SalBoolean. true if the function succeeds and false if it fails.

Static memberEnableWindowAndLabel(ctrl)

Enables keyboard and mouse input to a window and enables its associated label as well. A label is the label control that immediately precedes the window.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: SalBoolean. true if the function succeeds and false if it fails.

Static memberEndDialog(ctrl, returnValue)

Destroys a modal dialog box and returns control to the caller of ModalDialog.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
returnValueSalNumberThe return value from the ModalDialog function.

Returns: SalBoolean. true if the function succeeds and false if it fails.

Static memberEndTrace()

Stops tracing.

Returns: SalBoolean.

Static memberFileClose(file)

ParameterTypeDescription
fileSalFileHandle&

Returns: SalBoolean.

Static memberFileCopy(sourcePath, destPath, overwrite)

Copies the contents of one file (source) to another file (destination).

ParameterTypeDescription
sourcePathSalStringThe full path name of the source file.
destPathSalStringThe full path name of the destination file.
overwriteSalBooleanSpecifies whether (TRUE) or not (FALSE) to overwrite the destination file. If the destination file already exists and overwrite is FALSE, then FileCopy fails, and returns FILE_CopyExist. If the destination file already exists and overwrite is TRUE, then FileCopy succeeds and the destination file is overwritten.

Returns: SalNumber. One of the following values: FILE_CopyDest, FILE_CopyExist, FILE_CopyOK, FILE_CopyRead, FILE_CopySrc, FILE_CopyWrite.

Static memberFileCreateDirectory(directory)

Creates a directory.

ParameterTypeDescription
directorySalStringThe full path name of the new directory.

Returns: SalBoolean. true if the function succeeds and false if a directory or file with the specified name already exists, or if the specified path to the directory cannot be found.

Static memberFileGetChar(file, charValue)

ParameterTypeDescription
fileSalFileHandle
charValueSalNumber&

Returns: SalBoolean.

Static memberFileGetChar(file)

Returns the next character in an open file.

ParameterTypeDescription
fileSalFileHandleThe handle of the open file.

Returns: SalNumber. the next character in an open file.

Static memberFileGetCurrentDirectory(path)

ParameterTypeDescription
pathSalString&

Returns: SalBoolean.

Static memberFileGetDateTime(fileName, dateTime)

ParameterTypeDescription
fileNameSalString
dateTimeSalDateTime&

Returns: SalBoolean.

Static memberFileGetDrive()

Gets the letter of the default (current) disk drive.

Returns: SalString. A string identifying the current disk drive. The first character is a letter between 'A' and 'Z', and the second character is a colon(:).

Static memberFileGetStr(file, buffer, bufferSize)

ParameterTypeDescription
fileSalFileHandle
bufferSalString&
bufferSizeSalNumber

Returns: SalBoolean.

Static memberFileOpen(file, fileName, style)

ParameterTypeDescription
fileSalFileHandle&
fileNameSalString
styleSalNumber

Returns: SalBoolean.

Static memberFileOpen(file, fileName, style, encoding)

ParameterTypeDescription
fileSalFileHandle&
fileNameSalString
styleSalNumber
encodingEncoding

Returns: SalBoolean.

Static memberFileOpenExt(file, fileName, style, reopen)

Deprecated memberDeprecated: Use Sal.FileOpen().

ParameterTypeDescription
fileSalFileHandle&
fileNameSalString
styleSalNumber
reopenSalString&

Returns: SalBoolean.

Static memberFilePutChar(file, charValue)

Writes a character to an open file.

ParameterTypeDescription
fileSalFileHandleThe handle of the open file.
charValueSalNumberANSI numeric value of the character to write to file.

Returns: SalBoolean. true if the function succeeds and false if it fails.

Static memberFilePutStr(file, str)

Writes a string to an open file and appends a carriage return/line feed character to the string.

ParameterTypeDescription
fileSalFileHandleThe handle of the open file.
strSalStringThe string to write.

Returns: SalBoolean. true if the function succeeds and false if it fails.

Static memberFileRead(file, buffer, bufferLength)

ParameterTypeDescription
fileSalFileHandle
bufferSalString&
bufferLengthSalNumber

Returns: SalNumber.

Static memberFileRead(file, buffer, bufferLength)

ParameterTypeDescription
fileSalFileHandle
bufferSalBinary&
bufferLengthSalNumber

Returns: SalNumber.

Static memberFileRemoveDirectory(directory)

Deletes a directory.

ParameterTypeDescription
directorySalStringThe full path name of the directory to delete.

Returns: SalBoolean. true if the function succeeds and false if it fails. FileRemoveDirectory also returns false if directory contains files or other directories.

Static memberFileSeek(file, bytes, position)

Positions the file pointer in an open file. The next file operation (such as a read or write) takes place at this new location.

ParameterTypeDescription
fileSalFileHandleThe handle of an open file.
bytesSalNumberThe specific position of the file pointer; the number of bytes from position where the next file operation will take place.
positionSalNumberThe general position of the file pointer; one of the following values: FILE_SeekBegin, FILE_SeekCurrent, FILE_SeekEnd.

Returns: SalBoolean. true if the function succeeds and false if it fails.

Static memberFileSetCurrentDirectory(path)

Changes the current working directory. If the specified path does not contain a drive letter, the default drive's current directory is changed. Otherwise, the specified drive's current directory is changed and the specified drive is made the current drive.

ParameterTypeDescription
pathSalStringThe path name of the new current working directory.

Returns: SalBoolean. true if the function succeeds and false if it fails.

Static memberFileSetDateTime(fileName, dateTime)

Sets the modification date and time of the specified file.

ParameterTypeDescription
fileNameSalStringThe name of the file whose modification date you want to set.
dateTimeSalDateTimeThe modification date and time.

Returns: SalBoolean. true if the function succeeds and false if it fails.

Static memberFileSetDrive(sDriveLetter)

Sets the current disk drive to the specified drive letter.

ParameterTypeDescription
sDriveLetterSalStringThe new disk drive letter. The length of this parameter's value is one character. If you specify a value larger than this, reads only the first character.

Returns: SalBoolean. true if the function succeeds and false if it fails.

Static memberFileTell(file)

Returns the current position in an open file.

ParameterTypeDescription
fileSalFileHandleThe handle of an open file.

Returns: SalNumber. the current position (in bytes) in file. If an error occurs, returns -1.

Static memberFileWrite(file, buffer, bufferLength)

Writes a string to an open file.

ParameterTypeDescription
fileSalFileHandleThe handle of an open file.
bufferSalStringThe string to write to file.
bufferLengthSalNumberThe number of bytes to write.

Returns: SalNumber. the number of bytes written.

Static memberFileWrite(file, buffer, bufferLength)

Writes a binary buffer to an open file.

ParameterTypeDescription
fileSalFileHandleThe handle of an open file. fileFile Handle. The handle of an open file.
bufferSalBinaryThe string to write to file.
bufferLengthSalNumberThe number of bytes to write.

Returns: SalNumber. the number of bytes written.

Static memberFindWindow(ctrl, windowName)

This function finds a child window of a given name in the specified window.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
windowNameSalStringA string that is the name of the window to find.

Returns: SalWindowHandle. The window handle of the window found. hWndNULL is returned if the window is not found.

Static memberFireWindowActions(ctrl, message, wParam, lParam)

Dispatches the specified message (Window Actions) directly to the control's WindowActions event handlers, without going through Windows message loop.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
messageSalNumber
wParamSalNumber
lParamSalNumber

Returns: SalNumber.

Static memberFireWindowActionsToChildren(ctrl, message, wParam, lParam)

Dispatches the specified message (Window Actions) directly to the children's WindowActions event handlers, without going through Windows message loop.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
messageSalNumber
wParamSalNumber
lParamSalNumber

Returns: SalBoolean.

Static memberFmtCopyProfile(ctrl, nProfile)

Copies the specified profile to the custom profile for the specified field. The control must use the customized profile set using FMT_Profile_Program.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
nProfileSalNumber

Returns: SalBoolean.

Static memberFmtFieldToStr(ctrl, text, format)

ParameterTypeDescription
ctrlControl
textSalString&
formatSalBoolean

Returns: SalBoolean.

Static memberFmtFormatDateTime(dateTime, sPicture)

Formats a date/time value using a given date/time picture format. If you do not specify a picture format or the one you specify is invalid, the default local settings are used

ParameterTypeDescription
dateTimeSalDateTimeThe date/time value to format.
sPictureSalStringThe date/time picture format.

Returns: SalString. the formatted date/time string.

Static memberFmtFormatNumber(num, sPicture)

Formats a number value using a number picture format. If you do not specify a picture format or the one you specify is invalid, the default local settings are used

ParameterTypeDescription
numSalNumberThe number value to format.
sPictureSalStringThe number picture format.

Returns: SalString. a formatted number string.

Static memberFmtGetFormat(ctrl)

Returns the current format of a data field or table window column.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: SalNumber. a number that indicates the format of the field.

The return value is one of the following constants: Date fields can be formatted as: FMT_Format_Date, FMT_Format_DateTime, FMT_Format_Picture, FMT_Format_Time, and FMT_Format_Unformatted. Number fields can be formatted as: FMT_Format_Currency, FMT_Format_Decimal, FMT_Format_Percentage, FMT_Format_Picture, and FMT_Format_Unformatted. String fields can be: FMT_Format_Invisible, FMT_Format_LowerCase, FMT_Format_UpperCase, and FMT_Format_Unformatted.

Static memberFmtGetInputMask(ctrl, mask)

ParameterTypeDescription
ctrlControl
maskSalString&

Returns: SalBoolean.

Static memberFmtGetParmNum(ctrl, nParm, nValue)

ParameterTypeDescription
ctrlControl
nParmSalNumber
nValueSalNumber&

Returns: SalBoolean.

Static memberFmtGetParmStr(ctrl, nParm, value)

ParameterTypeDescription
ctrlControl
nParmSalNumber
valueSalString&

Returns: SalBoolean.

Static memberFmtGetPicture(ctrl, format)

ParameterTypeDescription
ctrlControl
formatSalString&

Returns: SalBoolean.

Static memberFmtGetProfile(ctrl)

Returns the culture profile for the specified field.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: SalNumber.

Static memberFmtIsValidField(ctrl)

Validates the contents of a data field or table window column using the current profile.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: SalBoolean. true if the field's contents are valid and false if the field's contents are invalid.

Strips off formatting characters and validates a field's contents according to type. After that, validates extra picture formatting characters that you enter to ensure that they conform to the profile requirements.

Static memberFmtIsValidInputMask(mask)

Validates the input mask of a data field or table window column.

ParameterTypeDescription
maskSalStringAn input mask.

Returns: SalBoolean. true if mask is a valid input mask and false if it is not valid.

Static memberFmtIsValidPicture(format, type)

Validates a numeric or date/time picture format.

ParameterTypeDescription
formatSalStringThe picture string.
typeSalNumberSpecify whether the format is for a number or date/time value with one of these constants: FMT_Pic_DateTimeFMT_Pic_Number

Returns: SalBoolean. true if the picture format is valid and false otherwise.

These are examples of date/time picture formats: |

Date/Time Picture
d MMMM, yyyy
dddd, MMMM d, yyyy
M/d/yy
dd-MM-yyyy
d "of " MMMM, yyyy
M/d/yy-hh.mm.ss AMPM
These are examples of number picture formats:
Number Picture
:---
0.00%
0.00e+00
0.00e-00
$#,##0; ($#,##0)
$#,##0; ($#,##0)
0.00

Static memberFmtKeepMask(keep)

Turns on/off the flag that indicates whether to keep the mask when reading the text from masked edit controls.

ParameterTypeDescription
keepSalBooleanIf false (default), removes input mask characters when you copy a value. If true, keeps the input mask characters when you copy a value.

Returns: SalBoolean. the value that you specified in keep.

By default, input mask characters are removed when you copy the value in a data field, table window column, or combo box. For example, if you create a data field with the input mask AA-AA and copy its value to another data field, the hyphen is not copied. You can call FmtKeepMask to change the default behavior so that the input mask characters are kept when you copy the value in a data field, table window column, or combo box. For example, if you create a data field with the input mask AA-AA and copy its value to another data field, the hyphen would be copied. The "^" character in an input mask overrides a setting that you make with this function.

Static memberFmtSetFormat(ctrl, format)

Sets a data field's or table window column's format.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
formatSalNumberThe format for ctrl. Potential formats include: FMT_Format_Currency, FMT_Format_Date, FMT_Format_DateTime, FMT_Format_Decimal, FMT_Format_Invisible, FMT_Format_LowerCase, FMT_Format_Percentage, FMT_Format_PictureFMT_Format_Time, FMT_Format_Unformatted, and FMT_Format_UpperCase.

Returns: SalBoolean. the format for ctrl.

A field's country profile determines a format's characteristics. A field's format must agree with the field's data type, so for example, number fields can only be formatted as decimal, percentage, or currency values.

Static memberFmtSetInputMask(ctrl, mask)

Sets the input mask of a data field or table window column.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
maskSalStringThe string that holds the input mask. If mask is an empty string (''), ctrl will be set to be unformatted.

Returns: SalBoolean. true if the function succeeds and false if it fails.

Static memberFmtSetParmNum(ctrl, nParm, nValue)

Modifies the specified formatting rule on the control. The control must use the customized profile set using FMT_Profile_Program.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
nParmSalNumber
nValueSalNumber

Returns: SalBoolean.

Static memberFmtSetParmStr(ctrl, nParm, value)

Modifies the specified formatting rule on the control. The control must use the customized profile set using FMT_Profile_Program.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
nParmSalNumber
valueSalString

Returns: SalBoolean.

Static memberFmtSetPicture(ctrl, picture)

Sets the picture format of a data field, table window column or date time picker.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
pictureSalStringThe picture format.

Returns: SalBoolean. true if the function succeeds and false if it fails. Returns false if any of the following are true: The window handle is not valid. The field/column is not of date/time or number data type.The picture format is not valid.

Static memberFmtSetProfile(ctrl, nProfile)

Changes the culture profile for the specified field.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
nProfileSalNumber

Returns: SalBoolean.

Static memberFmtStrToField(ctrl, value, format)

Copies a string to a data field or table window column. After copying the string to the field, formats the string.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
valueSalStringThe string to copy.
formatSalBooleanSpecify whether (true) or not (false) the string value has the same format as the field.

Returns: SalBoolean. true if the string's value has the same format as the data field or table window column. Returns false if the string's value is unformatted.

Static memberFmtUnmaskInput(ctrl, text)

ParameterTypeDescription
ctrlControl
textSalString&

Returns: SalBoolean.

Static memberFmtValidateField(ctrl, validate)

Validates and formats a data field's or table window column's contents.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
validateSalNumberA constant value that indicates what happens if a format error occurs and the function returns FALSE: FMT_Validate_DialogFMT_Validate_None

Returns: SalBoolean. true if the function succeeds and false otherwise, such as when the input is invalid. If it returns false, optionally displays an error dialog box.

Strips off formatting characters and validates a field's contents according to type. After that, validates picture formatting characters that you enter to ensure that they conform to the profile requirements. For dates, you must enter the proper separator characters in order for the field to be validated successfully.

Static memberFontGet(ctrl, name, size, enhancement)

ParameterTypeDescription
ctrlControl
nameSalString&
sizeSalNumber&
enhancementSalNumber&

Returns: SalBoolean.

Static memberFontGetNames(type, fonts)

Gets the names of the fonts.

ParameterTypeDescription
typeSalNumberNot used.
fontsSalArray<SalString>Receives the name of an array of strings that contains the font names returned.

Returns: SalNumber. the number of font names returned.

Static memberFontGetSizes(get, fontName, fontSizes)

Deprecated memberDeprecated: Use FontFamilies instead.

ParameterTypeDescription
getSalNumber
fontNameSalString
fontSizesSalArray`1&

Returns: SalNumber.

Static memberFontSet(ctrl, name, size, enhancement)

Sets a window's font, font size, and font enhancements.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
nameSalStringThe name of the font.
sizeSalNumberThe size of the font (in points).
enhancementSalNumberThe font enhancements ie bold, italic in the form of font enhancement flags. To combine two or more of the font enhancement flags, use the OR (|) operator.

Returns: SalBoolean. true if the function succeeds and false if it fails.

Font Enhancement Flags: FONT_EnhBoldFONT_EnhDefaultFONT_EnhItalicFONT_EnhNormalFONT_EnhStrikeOutFONT_EnhUnderline

Static memberFormGetParmNum(ctrl, paramType, value)

ParameterTypeDescription
ctrlControl
paramTypeSalNumber
valueSalNumber&

Returns: SalBoolean.

Static memberFormUnitsToPixels(ctrl, formUnits, vertical)

Computes the number of pixels in the number of form units. Form units are a unit of measurement used by functions which move and position objects. Form units are computed using physical units (pixels) in conjunction with the window's font size.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
formUnitsSalNumberThe number of form units.
verticalSalBooleanIf the form units are on the X axis, set this parameter to false. If the form units are on the Y axis, set this parameter to true.

Returns: SalNumber. the number of pixels if the function succeeds. Returns zero (0) if ctrl is invalid.

Static memberGetBufferLength(buffer)

Returns the current buffer length of a binary variable.

ParameterTypeDescription
bufferSalBinaryThe string you want to get the storage buffer length for.

Returns: SalNumber. The number of bytes used.

Static memberGetBufferLength(str)

Returns the current buffer length of a string.

ParameterTypeDescription
strSalStringThe string you want to get the storage buffer length for.

Returns: SalNumber. The number of bytes used.

Static memberGetDataType(ctrl)

Returns a data field's or table window column's data type.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: SalNumber. a number that indicates the data field's or table window column's data type. Its value is one of a predetermined set of constants: DT_DateTimeDT_LongStringDT_NumberDT_String

Use this function with internal functions that handle data fields and table window columns generically. Such internal functions pass only a window handle; the internal function does not know the data type of the associated window.

Static memberGetDefButton(ctrl)

Returns the handle of the default push button on a form window or dialog box. The default push button is the one that has the focus by default.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: SalWindowHandle. the handle of the default push button. It equals hWndNULLif hWndParent is not the handle of a valid form window or dialog box, or if the window associated with hWndParent does not have a default push button.

Static memberGetFirstChild(ctrl, typeMask)

Returns the handle of the first child window of the specified type. You can use this function to get the handles of MDI child windows.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
typeMaskSalNumberOne or more window types combined (using the OR (|) operator) to create a mask of child window types.

Returns: SalWindowHandle. the first child window of the specified type. Returns hWndNULL if there is no child window or if hWndParent is invalid.

Window types: TYPE_AccFrameTYPE_AnyTYPE_BkgdTextTYPE_CheckBoxTYPE_ChildGridTYPE_ChildTableTYPE_ComboBoxTYPE_CustControlTYPE_DataFieldTYPE_DatePickerTYPE_DateTimePickerTYPE_DialogBoxTYPE_FormToolBarTYPE_FormWindowTYPE_FrameTYPE_GridWindowTYPE_GroupBoxTYPE_HorizScrollBarTYPE_LineTYPE_ListBoxTYPE_MDIWindowTYPE_MultilineTextTYPE_OptButtonTYPE_PictureTYPE_PushButtonTYPE_RadioButtonTYPE_TabBarTYPE_TableColumnTYPE_TableWindowTYPE_VertScrollBar TYPE_Line and TYPE_Frame are statistics by default and not implemented as windows. If you want this function to work for lines and frames set the system variable bStaticsAsWindows to TRUE. This is a global system variable, so the setting persists until it is changed.

Static memberGetFocus()

Returns the handle of the window with the focus.

Returns: SalWindowHandle. windowFocus which identifies the window that can currently receive input from the keyboard.

Static memberGetItemName(ctrl, name)

ParameterTypeDescription
ctrlControl
nameSalString&

Returns: SalBoolean.

Static memberGetMaxDataLength(ctrl)

Returns the maximum length of a data field, multi line text field, or table window column.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: SalNumber. a number that specifies the maximum length of ctrl. A length of DW_Default (-1) indicates that the object was declared with a length of 'Default'.

Note: This function returns 0 (zero) for a table window column that is dynamically created using either TblCreateColumn or TblCreateColumnEx.

Static memberGetNextChild(ctrl, typeMask)

Returns the handle of the next child window that matches a specified type.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
typeMaskSalNumberOne or more window types combined (using the OR (|) operator) to create a mask of child window types.

Returns: SalWindowHandle. the next child window of the specified type. Returns hWndNULL if there is no child window or if hWndChild is invalid.

Window types: TYPE_AccFrameTYPE_AnyTYPE_BkgdTextTYPE_CheckBoxTYPE_ChildGridTYPE_ChildTableTYPE_ComboBoxTYPE_CustControlTYPE_DataFieldTYPE_DatePickerTYPE_DateTimePickerTYPE_DialogBoxTYPE_FormToolBarTYPE_FormWindowTYPE_FrameTYPE_GridWindowTYPE_GroupBoxTYPE_HorizScrollBarTYPE_LineTYPE_ListBoxTYPE_MDIWindowTYPE_MultilineTextTYPE_OptButtonTYPE_PictureTYPE_PushButtonTYPE_RadioButtonTYPE_TabBarTYPE_TableColumnTYPE_TableWindowTYPE_VertScrollBar Use this function after calling GetFirstChild to get the other child window siblings. You can use this function to get the handles of MDI child windows. If you want this function to work for lines and frames, set the system variable bStaticsAsWindows to true. This is a global system variable, so the setting persists until you change it.

Static memberGetProfileInt(section, entry, defaultValue, fileName)

Retrieves the integer value of an entry in the specified section of an initialization file or registry.

ParameterTypeDescription
sectionSalStringThe section heading.
entrySalStringThe entry whose associated value is being retrieved
defaultValueSalNumberSpecify the default value to return if the function cannot find the entry.
fileNameSalStringThe name of the initialization file or company name depending on the settings made using the UseRegistry function.

Returns: SalNumber. the integer value of an entry in the specified section of a file or registry, if the function is successful. Returns zero if the value found is not an integer. Returns the default value of the entry if GetProfileInt() cannot find the specified entry.

Static memberGetProfileString(section, entry, defaultValue, value, fileName)

ParameterTypeDescription
sectionSalString
entrySalString
defaultValueSalString
valueSalString&
fileNameSalString

Returns: SalNumber.

Static memberGetReportObject(handle)

Returns the instance of ISalReport that is identified by the handle.

ParameterTypeDescription
handleIntPtr

Returns: ISalReport.

Static memberGetVersion()

Returns the version of the library.

Returns: SalNumber. The version number.

Static memberGetWindowLabel(ctrl)

Retrieves the window handle of the label (label control) that is associated with the windowTarget parameter. There must be a mnemonic in that label, and it must immediately precede windowTarget, or this function will fail.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: SalWindowHandle.

Static memberGetWindowLabelText(ctrl, text, maxLength)

ParameterTypeDescription
ctrlControl
textSalString&
maxLengthSalNumber

Returns: SalNumber.

Static memberGetWindowLoc(ctrl, x, y)

ParameterTypeDescription
ctrlControl
xSalNumber&
ySalNumber&

Returns: SalBoolean.

Static memberGetWindowSize(ctrl, width, height)

ParameterTypeDescription
ctrlControl
widthSalNumber&
heightSalNumber&

Returns: SalBoolean.

Static memberGetWindowState(ctrl)

Returns a window's current state.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: SalNumber. a constant that indicates a window's current state. It is equal to one of a predefined set of values (Window_InvalidWindow_MaximizedWindow_MinimizedWindow_NormalWindow_NotVisible).

Static memberGetWindowText(ctrl, text, maxLen)

ParameterTypeDescription
ctrlControl
textSalString&
maxLenSalNumber

Returns: SalNumber.

Static memberHideWindow(ctrl)

Hides a window.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: SalBoolean. true if the function succeeds and false if it fails.

This function does not destroy the window; it only makes the window invisible.

Static memberHideWindowAndLabel(ctrl)

Hides a window and its associated label.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: SalBoolean. true if the previous state of the window was visible and false if it was hidden. Use this information to hide many windows without first checking that they are visible. When you restore them to their original state at a later point in time, the return lets you make visible only those windows that were previously visible.

A label is the background text that immediately precedes the window in the outline. This function does not destroy the window; it only makes the window invisible.

Static memberHStringToNumber(str)

Converts a string to a number so you can pass it as a message parameter.

ParameterTypeDescription
strSalStringThe string whose handle you want to change to a number.

Returns: SalNumber. a number that represents the converted string handle.

NOTE: Use this function only for strings to be passed as parameters with messages posted using SendMsg. Do not use this function for strings passed as parameters in messages posted using PostMsg.

Static memberIdleKick()

Simulates an idle state.

Returns: SalBoolean. true if this function succeeds and false otherwise.

Once an idle state is detected, it does not detect another idle state until some messages have appeared in the message queue. Call IdleKick when you want idle processing to occur even though no messages have been posted. The function is rarely used because idle processing is most often used to detect user input.Since user input causes messages to be posted, an idle state is detected automatically.Usually this function is used when idle processing is needed after another program or a DLL sends a notification message.

Static memberIdleRegisterWindow(ctrl, message, wParam, lParam)

Sends a message to a specified window whenever an idle state is detected. An idle state is detected when a window has processed all the messages in its input queue.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
messageSalNumberMessage to send to the window. Usually this is a SAM_User message.
wParamSalNumberStandard message parameter that you can set.
lParamSalNumberStandard message parameter that you can set.

Returns: SalBoolean. true if this function succeeds and false otherwise.

Static memberIdleUnregisterWindow(ctrl)

Stops sending idle messages to a control for which you had previously called IdleRegisterWindow

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: SalBoolean. true if this function succeeds and false otherwise.

Static memberInvalidateWindow(ctrl)

Causes a window to be repainted.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: SalBoolean. true if this function succeeds and false otherwise.

Static memberIsButtonChecked(ctrl)

Determines whether a radio button is set or a check box is checked.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: SalBoolean. true if ctrl is set or checked and false otherwise.

Static memberIsNull(ctrl)

Verifies whether a data field, multi line text field, or table window column is null. or empty.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: SalBoolean. true if ctrl is null or empty, and false otherwise.

Static memberIsValidDateTime(ctrl)

Verifies whether a data field, multi line text field, or table window column contains a valid date/time value. For multi line text fields, the date/time value must be the only item in the field.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: SalBoolean. true if ctrl contains a valid date/time value and false otherwise.

Static memberIsValidDecimal(ctrl, precision, scale)

Verifies whether a data field, multi line text field, or table window column contains a valid decimal value. For multi line text fields, the decimal value must be the only item in the field.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
precisionSalNumberThe number of digits to display.
scaleSalNumberThe number of digits to the right of the decimal point.

Returns: SalBoolean. true if ctrl contains a number of the specified precision and scale, and false if ctrl's value does not match the parameter specifications.

Static memberIsValidInteger(ctrl)

Verifies whether a data field, multi line text field, or table window column contains a valid integer value. For multi line text fields, the integer value must be the only item in the field.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: SalBoolean. true if ctrl contains a valid integer value and false if the number is a fraction, decimal, or any other invalid integer value.

Static memberIsValidNumber(ctrl)

Verifies whether a data field, multi line text field, or table window column contains a valid numeric value. Valid numbers are integers or floating point numbers, negative and positive. For multi line text fields, the numeric value must be the only item in the field.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: SalBoolean. true if ctrl contains a valid number and false otherwise

Static memberIsWindowEnabled(ctrl)

Determines whether a window is enabled for mouse and keyboard input.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: SalBoolean. true if ctrl is enabled and false if ctrl is not enabled or is not a valid handle.

Static memberIsWindowVisible(ctrl)

Determines whether a window is currently visible.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: SalBoolean. true if the window is visible and false otherwise.

Static memberListAdd(ctrl, text)

Adds a string to a list box or combo box.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
textSalStringText of the item to add to the list.

Returns: SalNumber. Index of the added item. Returns LB_Erron an error and LB_ErrSpace if there is insufficient memory to store the new string.

If the list box is sorted (the default), inserts the string into the list in the appropriate place. If the list box is not sorted, adds the string to the end of the list box. Uses ANSI ascending order in the sort.

Static memberListClear(ctrl)

Deletes all entries from a list box or combo box.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: SalBoolean. true if the function succeeds and false if it fails.

Static memberListDelete(ctrl, index)

Deletes a list box or combo box entry.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
indexSalNumberIndex of the item to remove from the list.

Returns: SalNumber. the number of rows remaining in the list box or combo box if the function succeeds. Returns LB_Err if an error occurs.

Static memberListFiles(ctrl, ctrlPath, pathName, attributes)

ParameterTypeDescription
ctrlControl
ctrlPathControl
pathNameSalString&
attributesSalNumber

Returns: SalBoolean.

Static memberListGetMultiSelect(ctrl, selectedArray)

Returns an array of index numbers of selected list box entries.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
selectedArraySalArray<SalNumber>Array to receive the list of selected indices.

Returns: SalBoolean. True if at least 1 item selected, otherwise false.

Use the ListQueryMultiCount function to return the number of selected list box entries.

Static memberListInsert(ctrl, index, text)

Inserts an entry into a list box or combo box at a specified position.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
indexSalNumberPosition in the list where to add the text .
textSalStringText to add to the list.

Returns: SalNumber. the index of the new entry. Returns LB_Err on an error and LB_ErrSpace if there is insufficient memory to store the new string.

Static memberListPopulate(ctrl, sql, select)

Populates a list box or combo box with a result set. ListPopulate overrides any settings made with ListSetTabs. If the SELECT statement returns data from multiple columns, each column's data displayed in a list box is separated by tabs.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
sqlSalSqlHandleA SalSqlHandle to execute the sql command.
selectSalStringSQL command to execute.

Returns: SalBoolean. true if the function succeeds and false if any of the parameters are invalid or if select contains INTO variables.

The SELECT statement can contain bind variables, but it cannot contain INTO variables. If select is null (''), uses the previously prepared SELECT statement associated with sql This avoids re-preparing each time ListPopulate executes.

Static memberListPopulate(ctrl, sql, select, errorHandler)

Populates a list box or combo box with a result set. If the SELECT statement returns data from multiple columns, each column's data displayed in the list box is separated by tabs.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
sqlSalSqlHandleA SalSqlHandle to execute the sql command.
selectSalStringSQL command to execute.
errorHandlerWhenSqlErrorHandlerSQL error handler callback.

Returns: SalBoolean. true if the function succeeds and false if any of the parameters are invalid or if select contains INTO variables.

Static memberListQueryCount(ctrl)

Returns the number of list box or combo box entries.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: SalNumber. Number of items in the list.

Static memberListQueryFile(ctrl, fileName)

ParameterTypeDescription
ctrlControl
fileNameSalString&

Returns: SalBoolean.

Static memberListQueryMultiCount(ctrl)

Returns the number of selected entries in a multiple-selection list box. Specify single-selection or multiple-selection in the list box's customizer.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: SalNumber. Number of selected items.

Static memberListQuerySelection(ctrl)

Returns the index of the selected entry in a combo box or single-selection list box.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: SalNumber. Index of the currently selected item in the list, or -1 for no selection.

Static memberListQueryState(ctrl, index)

Determines whether the specified list box or combo box entry is selected.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
indexSalNumberIndex of the item to query.

Returns: SalBoolean. True is the specified item is selected.

Static memberListQueryText(ctrl, index, text)

ParameterTypeDescription
ctrlControl
indexSalNumber
textSalString&

Returns: SalNumber.

Static memberListQueryTextLength(ctrl, index)

Returns the length of a list box or combo box entry.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
indexSalNumberIndex of the item to retrieve the text length for.

Returns: SalNumber. Length of the text of the specified item.

Static memberListQueryTextX(ctrl, index)

Returns the text of the specified item.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
indexSalNumberIndex of the item to retrieve the text for.

Returns: SalString. Text of the specified item.

Static memberListRedraw(ctrl, redraw)

Redraws entries in a list box or combo box, or prevents them from being redrawn.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
redrawSalNumberTrue to redraw the control.

Returns: SalBoolean. true if the function succeeds and false otherwise, such as when ctrl is not valid.

Static memberListSelectString(ctrl, startIndex, text)

Finds and selects a combo box or single-selection list box entry.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
startIndexSalNumberPosition where to start the search for text .
textSalStringText to search for in the list.

Returns: SalNumber. Index of the first item that matches the text or -1 if not found.

Static memberListSetMultiSelect(ctrl, index, select)

Selects or deselects a combo box or multiple-selection list box entry.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
indexSalNumberIndex of the item to select or deselect. Use -1 for all the items in the list.
selectSalBooleanTrue to select, or false to deselect the item.

Returns: SalBoolean. true if the function succeeds and false if it fails.

Static memberListSetSelect(ctrl, index)

Selects or deselects a combo box or single-selection list box entry.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
indexSalNumberIndex of the item to select. Use -1 for all the items in the list.

Returns: SalBoolean. true if the function succeeds and false if it fails. Returns LB_Err if an error occurs.

Static memberListSetTabs(ctrl, tabStops)

Sets tabs in a list box.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
tabStopsSalArray<SalNumber>Array of tab stop position.

Returns: SalBoolean. true if the function succeeds and false if it fails.

List boxes use tabs to align columns of data. You need to set tabs when you are using a proportional font. Note: Since SalListPopulate overrides any settings made with SalListSetTabs, call SalListSetTabs (to set tabs) after you populate a list box using SalListPopulate.Note that you can use SalListSetTabs (to set tab stops) after you populate using SalListPopulate.

Static memberLoadApp(name, parameters)

Starts an application.

ParameterTypeDescription
nameSalStringThe name of the application to start.
parametersSalStringOptional command line arguments. A space marks the end of one argument and the start of the next.

Returns: SalBoolean. true if the function succeeds. false if the application cannot be found or started.

You can start another application by calling LoadApp(). You can use LoadApp() to pass command line arguments from one application to another.

Static memberLoadAppAndProcessMsgs(name, mode, retCode)

ParameterTypeDescription
nameSalString
modeSalNumber
retCodeSalNumber&

Returns: SalBoolean.

Static memberLoadAppAndWait(name, mode, retCode)

ParameterTypeDescription
nameSalString
modeSalNumber
retCodeSalNumber&

Returns: SalBoolean.

Static memberLog(fileName, message)

Appends the string to the file.

ParameterTypeDescription
fileNameSalString
messageSalString

Returns: SalBoolean.

Static memberLogLine(fileName, message)

Appends the string and a new line to the file.

ParameterTypeDescription
fileNameSalString
messageSalString

Returns: SalBoolean.

Static memberLogResource(fileName)

Deprecated memberDeprecated: Use Sal.Log(). Logs the available resources to the file.

ParameterTypeDescription
fileNameSalString

Returns: SalBoolean.

Static memberMapEnterToTab(state)

Changes the behavior of the Enter key from executing the default button on a window to moving the focus to the next field. This function takes one parameter (true or false) to enable or disable this action.

ParameterTypeDescription
stateSalBooleanIf true, the Enter key shifts the focus to the next editable object. If false(default), the Enter key executes the default push button on the form window or dialog box.

Returns: SalBoolean. true if the function succeeds and false if you do not specify a Boolean value.

Static memberMDIArrangeIcons(ctrl)

Arranges minimized child window icons in an MDI window.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: SalBoolean. true if the function succeeds and false if it fails.

Static memberMDICascade(ctrl)

Cascades all non-iconized child windows of an MDI window.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: SalBoolean. true if the function succeeds and false if it fails.

Static memberMDITile(ctrl, position)

Tiles all non-iconized child windows of an MDI window. Windows that are not sizable will not be tiled.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
positionSalBooleanHow to tile the child windows. If true, tile the windows vertically; if false, tile the windows horizontally

Returns: SalBoolean. true if the function succeeds and false if it fails.

Static memberMessageBeep(alertLevel)

Plays a waveform sound that corresponds to a given system alert level. A user can set the sound for each alert level with the sounds application in the Control Panel.

ParameterTypeDescription
alertLevelSalNumberThe alert level: Use 0 or -1 for the standard beep using the computer speaker, or any of the MB_* constants.

Returns: SalBoolean. true if the function succeeds and false if it fails.

MB constants: MB_IconAsteriskMB_IconExclamationMB_IconStopMB_IconQuestionMB_Ok

Static memberMessageBox(text)

Displays a message box and returns a number that indicates the user's response. You can customize the message box push buttons and icons. The active parent window creates the message box.

ParameterTypeDescription
textSalStringThe message text.

Returns: SalNumber. The value of the push button that the user clicks. Possible values: IDABORTIDCANCELIDIGNOREIDNOIDOKIDRETRYIDYES

Static memberMessageBox(text, title, flags)

Displays a message box and returns a number that indicates the user's response. You can customize the message box push buttons and icons. The active parent window creates the message box.

ParameterTypeDescription
textSalStringThe message text.
titleSalStringThe message box title.
flagsSalNumberThe message box style. Combine the MB_* options using the OR (|) operator.

Returns: SalNumber. The value of the push button that the user clicks. Possible values: IDABORTIDCANCELIDIGNOREIDNOIDOKIDRETRYIDYES

A style has four components: Push buttons: MB_AbortRetryIgnoreMB_Ok (default) MB_OkCancelMB_RetryCancelMB_YesNoMB_YesNoCancel Message icons, if any: MB_IconAsteriskMB_IconExclamationMB_IconHandMB_IconQuestionMB_IconStop A default button: MB_DefButton1MB_DefButton2MB_DefButton3MB_NoFocus Whether the message box is system modal: MB_ApplModal (default) or MB_SystemModal

Static memberMessageBox(owner, text, title, flags)

Displays a message box and returns a number that indicates the user's response. You can customize the message box push buttons and icons.

ParameterTypeDescription
ownerControlThe owner of the message box.
textSalStringThe message text.
titleSalStringThe message box title.
flagsSalNumberThe message box style. Combine the MB_* options using the OR (|) operator.

Returns: SalNumber. The value of the push button the user clicks.

Static memberModalDialog(dialogType, owner, parameters)

Creates a modal dialog box.

ParameterTypeDescription
dialogTypeTypeThe type of the modal dialog box to create.
ownerControlthe owner window. Use hWndNULL for a dialog box that does not have an owner.
parametersObject[]window parameters

Returns: SalNumber. the value specified in the second parameter of EndDialog. Returns -1 if the dialog box is not created.

A modal dialog box suspends the application until the user closes the dialog box. EndDialog destroys the modal dialog box and enables all windows that were disabled. ModalDialog() can pass information to the dialog box by accepting a variable number of parameters. The data types of these parameters must match the parameter data types of the dialog box being created. You define parameters for the dialog box in the Window Parameters section of the application outline. You can use window parameters to return information from the window being created by using a reference type. Note: Attempting to use the return value from this function to set a Window Handle variable will result in a compile error when compiling to a.NET build target.This function returns a number, not a window handle.

Static memberModalDialog(dialogName, owner, parameters)

Creates a modal dialog box.

ParameterTypeDescription
dialogNameSalStringThe name of the modal dialog box to create.
ownerControlthe owner window. Use hWndNULL for a dialog box that does not have an owner.
parametersObject[]window parameters

Returns: SalNumber. the value specified in the second parameter of EndDialog. Returns -1 if the dialog box is not created.

A modal dialog box suspends the application until the user closes the dialog box. EndDialog destroys the modal dialog box and enables all windows that were disabled. ModalDialog() can pass information to the dialog box by accepting a variable number of parameters. The data types of these parameters must match the parameter data types of the dialog box being created. You define parameters for the dialog box in the Window Parameters section of the application outline. You can use window parameters to return information from the window being created by using a reference type. Note: Attempting to use the return value from this function to set a Window Handle variable will result in a compile error when compiling to a.NET build target.This function returns a number, not a window handle.

Static memberModalDialog(dialogName, owner)

Creates a modal dialog box.

ParameterTypeDescription
dialogNameSalStringThe name of the modal dialog box to create.
ownerControlthe owner window. Use hWndNULL for a dialog box that does not have an owner.

Returns: SalNumber. the value specified in the second parameter of EndDialog. Returns -1 if the dialog box is not created.

A modal dialog box suspends the application until the user closes the dialog box. EndDialog destroys the modal dialog box and enables all windows that were disabled. ModalDialog() can pass information to the dialog box by accepting a variable number of parameters. The data types of these parameters must match the parameter data types of the dialog box being created. You define parameters for the dialog box in the Window Parameters section of the application outline. You can use window parameters to return information from the window being created by using a reference type. Note: Attempting to use the return value from this function to set a Window Handle variable will result in a compile error when compiling to a.NET build target.This function returns a number, not a window handle.

Static memberModalDialogFromStr(dialogName, owner)

Creates a modal dialog box.

ParameterTypeDescription
dialogNameSalStringThe name of the modal dialog box to create.
ownerControlthe owner window. Use hWndNULL for a dialog box that does not have an owner.

Returns: SalNumber. the value specified in the second parameter of EndDialog. Returns -1 if the dialog box is not created.

A modal dialog box suspends the application until the user closes the dialog box. EndDialog destroys the modal dialog box and enables all windows that were disabled. ModalDialog() can pass information to the dialog box by accepting a variable number of parameters. The data types of these parameters must match the parameter data types of the dialog box being created. You define parameters for the dialog box in the Window Parameters section of the application outline. You can use window parameters to return information from the window being created by using a reference type. Note: Attempting to use the return value from this function to set a Window Handle variable will result in a compile error when compiling to a.NET build target.This function returns a number, not a window handle.

Static memberMoveWindow(ctrl, xOffset, yOffset)

Moves a window a given number of form units on the X and Y axes relative to its current position.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
xOffsetSalNumberThe number of form units to move the window on the X axis.
yOffsetSalNumberThe number of form units to move the window on the Y axis.

Returns: SalBoolean. true if the function succeeds, and false if ctrl is invalid.

Static memberMTSCreateInstance(obj)

ParameterTypeDescription
objObject&

Returns: SalBoolean.

Static memberMTSDisableCommit()

Indicates that the object's transactional updates cannot be committed in the present time until SalMTSEnableCommit() or SalMTSSetComplete() is called. For non-MTS components the SalMTSDisableCommit() will fail (returns FALSE).

Returns: SalBoolean. true if successful, returns false if it fails.

Static memberMTSEnableCommit()

Indicates that the object’s work is not necessarily done, but that its transactional updates can be committed in their current form (stateful object). EnableCommit is the default state when an object is activated. For non-MTS components the SalMTSEnableCommit() will fail (returns FALSE).

Returns: SalBoolean. true if successful, returns false if it fails.

Static memberMTSGetObjectContext(obj, context)

Deprecated memberDeprecated: Not supported.

ParameterTypeDescription
objObject
contextSalNumber&

Returns: SalBoolean.

Static memberMTSIsCallerInRole(role, inRole)

ParameterTypeDescription
roleSalString
inRoleSalBoolean&

Returns: SalBoolean.

Static memberMTSIsInTransaction(isInTransaction)

ParameterTypeDescription
isInTransactionSalBoolean&

Returns: SalBoolean.

Static memberMTSIsSecurityEnabled(isSecurityEnabled)

ParameterTypeDescription
isSecurityEnabledSalBoolean&

Returns: SalBoolean.

Static memberMTSSetAbort()

Indicates that the object’s work can never be committed. The entire transaction is aborted. The object is deactivated upon return from the method. For non-MTS components the SalMTSSetAbort() will fail (returnS FALSE).

Returns: SalBoolean. true if successful, returns false if it fails.

Static memberMTSSetComplete()

Indicates that the object has successfully completed its work for the transaction. The object is deactivated upon return from the method that first entered the context (stateless object). For non-MTS components the SalMTSSetComplete() will fail (returns FALSE).

Returns: SalBoolean. true if successful, returns false if it fails.

Adds a new group to the specified pane of a navigation bar.

ParameterTypeDescription
controlControlThe NavBar control.
paneIndexSalNumberZero-based index of the pane to which you want to add a group.
groupIndexSalNumberZero-based index that the new group will occupy.
groupTitleSalStringThe title of the new group.
heightSalNumberThe height of the new group in form units.

Returns: SalBoolean. true if the function succeeds, false if an error occurs.

See PixelsToFormUnits or FormUnitsToPixels for information about the "form unit". If the group is added before an existing group, the group that follows the new group will resize smaller to accommodate the new group. If the new group is appended, the group that immediately precedes the new group will resize smaller. If this does not provide enough space, the next group will be resized as well. For example, if the newly added group (group A) has a height of 200, and the group preceding it (group B) has a height of 100, group B will shrink to a height of 0, and the group that immediately precedes group B (group C) will have its height reduced by 100. Note: When controls appear above the first defined group separator in a navigation pane, they are categorized as "ungrouped" controls. The controls that appear after the first separator belong to group zero. The controls that appear after the second separator belong to group one. If groupIndex = 0, the new group will appear immediately above the current group zero, and below any "ungrouped" controls.

Inserts a pane into the navigation bar control.

ParameterTypeDescription
controlControlThe NavBar control.
paneIndexSalNumberIndicates a zero-based pane index. The new pane will be inserted after the pane indicated by nPaneIndex. Use -1 to append as the last pane.
nameSalStringName of the new pane (object title)
expandedImageSalStringFile name of the image to display for the new pane when it is expanded.
collapsedImageSalStringFile name of the image to display for the new pane when it is collapsed.

Returns: SalBoolean. true if the function succeeds, false if it fails (for example, as a result of an invalid window handle).

Associates a control to a pane.

ParameterTypeDescription
controlControlThe NavBar control.
paneIndexSalNumberZero-based index of the pane.
groupIndexSalNumberZero-based index of the group. If the pane has no groups, use zero.
childControlthe control you're associating to the pane.

Returns: SalBoolean. true if the function succeeds, false if it fails (for example, as a result of an invalid control).

Disassociates a control from a pane.

ParameterTypeDescription
controlControlThe NavBar control.
paneIndexSalNumberZero-based index of the pane
childControlThe control you're disassociating

Returns: SalBoolean. true if the function succeeds, false if it fails (for example, as a result of an invalid control).

Enables or disables a pane on the navigation bar.

ParameterTypeDescription
controlControlThe NavBar control.
paneIndexSalNumberIndex for the pane to enable (start at 0).
enableSalBooleanSet TRUE to enable pane, FALSE to disable.

Returns: SalBoolean. the previous state of the pane: true if it was previously enabled, false if it was previously disabled.

Expands or collapses a group.

ParameterTypeDescription
controlControlThe NavBar control.
paneIndexSalNumberZero-based index of the pane
groupIndexSalNumberZero-based index of the group
expandSalBooleanSet to TRUE to expand, FALSE to collapse

Returns: SalBoolean. true if the function succeeds, false if it fails (for example, as a result of an invalid control).

Returns the index of the currently selected pane.

ParameterTypeDescription
controlControlThe NavBar control.

Returns: SalNumber. The zero-based index of the currently selected pane.

ParameterTypeDescription
controlControl
paneIndexSalNumber
binarySalBinary&
formatSalNumber
expandedSalBoolean

Returns: SalBoolean.

Finds the pane by its name and returns a zero-based index of the pane if successful or -1 if the pane is not found.

ParameterTypeDescription
controlControlThe NavBar control.
nameSalStringThe name of the pane (object title)

Returns: SalNumber. the zero-based index of the pane. If the pane is not found, index is -1.

ParameterTypeDescription
controlControl
paneIndexSalNumber
titleSalString&

Returns: SalBoolean.

Returns the title of a pane.

ParameterTypeDescription
controlControlThe NavBar control.
paneIndexSalNumberIndex for the pane whose title you want to get (start at 0)

Returns: SalString. true if the function succeeds, false if it fails (for example, as a result of an invalid control or index).

Retrieves the group status. The function returns true if the group is expanded; false if collapsed.

ParameterTypeDescription
controlControlThe NavBar control.
paneIndexSalNumberZero-based index of the pane
groupIndexSalNumberZero-based index of the group

Returns: SalBoolean. true if the group is expanded; false if collapsed.

If the pane is not currently selected, the function returns the cached state which will apply to the group when the pane is selected.

Restore the settings of a navigation bar from an XML string.

ParameterTypeDescription
controlControlThe NavBar control.
xmlSalStringThe string where the state is saved.

Returns: SalBoolean. true if the function succeeds, false if it fails (for example, as a result of an invalid window control).

Information restored includes: -Navigation bar expanded or collapsed. -Number of buttons visible in the navigation bar. -Enabled panes and disabled panes. -Sequence of the panes. -Current(selected) pane. -States of the groups(expanded or collapsed) in the current pane.

Returns true if the pane is enabled (visible in the pane navigator); false if disabled (not visible).

ParameterTypeDescription
controlControlThe NavBar control.
paneIndexSalNumberIndex of pane (start at 0) whose status you want to check.

Returns: SalBoolean. true if the pane is enabled (visible in the pane navigator); false if disabled (not visible).

Removes a group from the navigation bar control.

ParameterTypeDescription
controlControlThe NavBar control.
paneIndexSalNumberZero-based index of the pane to be removed.
groupIndexSalNumberZero-based index of the group to remove.

Returns: SalBoolean. true if the function succeeds, false if it fails.

Removes a pane from the navigation bar control.

ParameterTypeDescription
controlControlThe NavBar control.
paneIndexSalNumberZero-based index of the pane to be removed.

Returns: SalBoolean. true if the function succeeds, false if it fails (for example, as a result of an invalid window handle).

ParameterTypeDescription
controlControl
xmlSalString&

Returns: SalBoolean.

Activates the indicated pane.

ParameterTypeDescription
controlControlThe NavBar control.
paneIndexSalNumberThe zero-based index of the pane to activate.

Returns: SalBoolean. true if the function succeeds, false if it fails (for example, as a result of an invalid NavBar control.).

Sets the title of a pane.

ParameterTypeDescription
controlControlThe NavBar control.
paneIndexSalNumberIndex for the pane.
binarySalBinaryBuffer that stores the image (bmp or icon).
formatSalNumberIndicates the image format. Use PIC_FormatIcon or PIC_FormatBitmap.
expandedSalBooleanTRUE for "expanded" image, FALSE for "collapsed" image

Returns: SalBoolean. true if the function succeeds, false if it fails (for example, as a result of an invalid control or index).

Sets the title of a pane.

ParameterTypeDescription
controlControlThe NavBar control.
paneIndexSalNumberIndex for the pane whose title you want to get (start at 0).
titleSalStringThe new title for the pane.

Returns: SalBoolean. true if the function succeeds, false if it fails (for example, as a result of an invalid control or index).

Static memberNumberAbs(num)

Computes a number's absolute value.

ParameterTypeDescription
numSalNumberThe number whose absolute value you want.

Returns: SalNumber. the absolute value of num

Static memberNumberArcCos(num)

Computes the arc cosine of a value in the range 0 to 1. The value's domain is -1 to 1.

ParameterTypeDescription
numSalNumberThe number whose arc cosine you want.

Returns: SalNumber. the arc cosine of num . Returns NUMBER_Null if num is less than -1 or greater than 1.

Static memberNumberArcSin(num)

Computes a value's arc sine. The value's domain is -1 to 1.

ParameterTypeDescription
numSalNumberThe number whose arc sine you want.

Returns: SalNumber. the arc sine of num . Returns NUMBER_Null if num is less than -1 or greater than 1.

Static memberNumberArcTan(num)

Computes a value's arc tangent.

ParameterTypeDescription
numSalNumberThe number whose arc tangent you want.

Returns: SalNumber. the arc tangent of num .The value returned will be in the range -1 to 1.

Static memberNumberArcTan2(numY, numX)

Computes the arc tangent of two nums. This function uses the signs of both parameters to determine the quadrant of the return value.

ParameterTypeDescription
numYSalNumberOne of two values whose arc tangent you want.
numXSalNumberThe other of two values whose arc tangent you want.

Returns: SalNumber. the arc tangent of numX and numY . The value returned will be in the range -1/2 to 1/2.

Static memberNumberCos(angle)

Computes an angle's cosine. You must specify the angle in terms of radians.

ParameterTypeDescription
angleSalNumberThe value of the angle whose cosine you want.

Returns: SalNumber. the cosine of nAngle. If the angle is large, the value returned can reflect a partial loss of significance. If the angle is so large that significance is totally lost, returns zero (0).

Static memberNumberCosH(angle)

Computes an angle's hyperbolic cosine. You must specify the angle in terms of radians.

ParameterTypeDescription
angleSalNumberThe value of the angle whose hyperbolic cosine you want.

Returns: SalNumber. the hyperbolic cosine of nAngle. If the return value is too large, returns zero (0).

Static memberNumberExponent(num)

Computes a value's exponential function.

ParameterTypeDescription
numSalNumberThe value whose exponential function you want.

Returns: SalNumber. the result of 'e' to the power of num . When there is an underflow or overflow, returns NUMBER_Null.

Static memberNumberHigh(num)

Returns a number's high-order word value (most significant 16 bits).

ParameterTypeDescription
numSalNumberThe number whose high-order word value you want. Treated as an unsigned 32-bit number.

Returns: SalNumber. the high-order word value of num

Static memberNumberHypot(x, y)

Computes the length of the hypotenuse of a right triangle, given the lengths of the other two sides.

ParameterTypeDescription
xSalNumberThe length of one side of a right triangle.
ySalNumberThe length of another side of a right triangle.

Returns: SalNumber. the length of the hypotenuse of a right triangle. If the computation of the hypotenuse results in an overflow, returns zero (0).

Static memberNumberLog(num)

Computes a number's natural logarithm.

ParameterTypeDescription
numSalNumberThe number whose natural logarithm you want.

Returns: SalNumber. the natural logarithm of num . If num is negative or 0, returns NUMBER_Null.

Static memberNumberLogBase10(num)

Computes a number's base -10 logarithm.

ParameterTypeDescription
numSalNumberThe number whose base 10 logarithm you want.

Returns: SalNumber. the base-10 logarithm of num . If num is negative or 0, returns NUMBER_Null.

Static memberNumberLow(num)

Returns a number's low-order word value (least significant 16 bits).

ParameterTypeDescription
numSalNumberThe number whose low-order word value you want. Treated as an unsigned 32-bit number.

Returns: SalNumber. the low-order word value of num .

Static memberNumberMax(num1, num2)

Returns the greater of two numbers.

ParameterTypeDescription
num1SalNumberThe first of two values.
num2SalNumberThe second of two values.

Returns: SalNumber. the greater of num1 and num2 .

Static memberNumberMin(num1, num2)

Returns the lesser of two numbers.

ParameterTypeDescription
num1SalNumberThe first value.
num2SalNumberThe second value.

Returns: SalNumber. the lesser of num1 and num2 .

Static memberNumberMod(num, mod)

Returns a number's modulo. This function divides num by mod and returns the remainder.

ParameterTypeDescription
numSalNumberThe number to divide.
modSalNumberThe number by which to divide num

Returns: SalNumber. the remainder of num divided by mod .

Static memberNumberPi(num)

Multiples a number by Pi. Pi is equal to 3.1415926535979323.

ParameterTypeDescription
numSalNumberThe number to multiply by Pi.

Returns: SalNumber. num multiplied by Pi.

Static memberNumberPower(num, exponent)

Computes num raised to the power of exponent . This function does not recognize integral, floating-point values greater than 2 to the 64th power, such as 1.0E100.

ParameterTypeDescription
numSalNumberThe number to raise to the power of exponent
exponentSalNumberThe exponent.

Returns: SalNumber. num raised to the exponent power, with the following conditions:

  1. If num is not 0 and exponent is 0, returns 1.
  2. If num is 0 and exponent is negative, returns to zero(0).
  3. If both num and exponent are zero(0), or if num is negative and exponent is not a whole number, returns zero(0), meaning that an error occurred.
  4. In instances where an overflow or an underflow occurs, returns zero(0).

Static memberNumberRandInit(seed)

Sets the starting point for generating a series of pseudo-random numbers using NumberRandom.

ParameterTypeDescription
seedSalNumberThe starting point. A whole number in the range of 0 to 32767.

Returns: SalBoolean. true if the function succeeds and false if it fails.

Use NumberRandInit() when you want to generate the same set of pseudo-random numbers over and over again (e.g. when doing reproducible experiments).

Static memberNumberRandom()

Generates a pseudo-random number. The numbers generated by this function are integers in the range 0 to 32767.

Returns: SalNumber. a pseudo-random number.

See NumberRandInit

Static memberNumberRound(num)

Returns a rounded number. If the fractional part of a number is greater than or equal to .5, rounds the number up. For example, the number 1.4 returns 1; the number 1.5 returns 2.

ParameterTypeDescription
numSalNumberThe number to round.

Returns: SalNumber. num after rounding.

Static memberNumberSin(angle)

Computes an angle's sine. You must specify the angle in terms of radians.

ParameterTypeDescription
angleSalNumberThe value of the angle whose sine you want.

Returns: SalNumber. the sine of angle . If the angle is large, the value returned can reflect a partial loss of significance. If the angle is so large that significance is totally lost, returns zero (0).

Static memberNumberSinH(angle)

Computes an angle's hyperbolic sine. You must specify the angle in terms of radians.

ParameterTypeDescription
angleSalNumberThe value of the angle whose hyperbolic sine you want.

Returns: SalNumber. the hyperbolic sine of nAngle. If the angle is too large, returns zero (0).

Static memberNumberSqrt(num)

Computes a number's square root.

ParameterTypeDescription
numSalNumberThe number whose square root you want.

Returns: SalNumber. the square root of num . If num is negative, it is out of the domain of valid values and zero (0) is returned.

Static memberNumberTan(angle)

Computes an angle's tangent.

ParameterTypeDescription
angleSalNumberThe value of the angle whose tangent you want.

Returns: SalNumber. the tangent of angle . If the angle is large, the value returned can reflect a partial loss of significance. If the angle is so large that significance is totally lost, returns zero (0).

Static memberNumberTanH(angle)

Computes an angle's hyperbolic tangent. You must specify the angle in terms of radians.

ParameterTypeDescription
angleSalNumberThe value of the angle whose hyperbolic tangent you want.

Returns: SalNumber. the hyperbolic tangent of angle . If the angle is large, the value returned can reflect a partial loss of significance. If the angle is so large that significance is totally lost, returns zero (0).

Static memberNumberToChar(num)

Converts a decimal value to a UNICODE character. This function uses the MultiByteToWideChar API using ANSI code page for numbers less than 255.

ParameterTypeDescription
numSalNumberThe number to convert.

Returns: SalString. the character converted from num

Static memberNumberToHString(handle)

Converts a string handle to the corresponding string instance.

ParameterTypeDescription
handleSalNumberThe numeric value of the string handle to convert.

Returns: SalString. a string handle that represents the number converted.

Static memberNumberToStr(num, decimalPlaces, str)

ParameterTypeDescription
numSalNumber
decimalPlacesSalNumber
strSalString&

Returns: SalNumber.

Static memberNumberToStrX(num, decimalPlaces)

Converts a number to a string.

ParameterTypeDescription
numSalNumberThe number to convert.
decimalPlacesSalNumberThe number of decimal places you want in the string.

Returns: SalString. the string converted from num

Static memberNumberToWindowHandle(num)

Converts a number to a window handle.

ParameterTypeDescription
numSalNumberThe number to convert.

Returns: SalWindowHandle. the window handle converted from num

Static memberNumberTruncate(num, precision, scale)

Truncates a number.

ParameterTypeDescription
numSalNumberThe number to truncate, starting with the leftmost.
precisionSalNumberThe number of digits to display, starting with the leftmost.
scaleSalNumberThe number of digits to the right of the decimal point. The precision parameter must be large enough to hold the number of digits that you specify in this parameter.

Returns: SalNumber. the result of truncating num

Static memberObjCreateFromString(className)

Creates an instance of the class.

ParameterTypeDescription
classNameSalStringClass name

Returns: SalFunctionalClass. Reference to the object created.

Static memberObjGetType(userObject)

This function returns the name of the class for the object.

ParameterTypeDescription
userObjectSalFunctionalClassThe object whose class name is to be determined.

Returns: SalString. Class name of the object if successful, STRING_Null if unsuccessful.

Static memberObjIsDerived(userObject, className)

Returns true if the object is derived from the class specified or an instance of a subclass inherited from the user-defined class.

ParameterTypeDescription
userObjectSalFunctionalClassReference to the object in question.
classNameSalStringThe name of the class to use for the match.

Returns: SalBoolean. true if userObject is an instance of the class identified by the value of className or if userObject is an instance of a subclass of the class identified by the value of className ; false otherwise.

Static memberObjIsNull(userObject)

This function checks to see if the variable of a functional, CoClass, or interface class is null.

ParameterTypeDescription
userObjectSalFunctionalClassA variable of a functional, coclass, or interface class.

Returns: SalBoolean. true if the parameter is a null reference, and false if it is not.

Static memberObjIsValidClasname(className)

Determine whether className holds a valid user-defined class name.

ParameterTypeDescription
classNameSalStringThe name of the class

Returns: SalBoolean. true if className is valid; false otherwise.

Static memberParentWindow(ctrl)

Returns the handle of an object's parent window.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: SalWindowHandle. parent window handle of ctrl. If ctrl is a top-level window, returns the window handle of the owner window, as passed to CreateWindow, otherwise returns hWndNULL.

|

Where Called
Tool bar child in a top-level object
Tool bar child in an MDI window
Child table window in a tool bar
Top-level Object in an MDI window

Static memberPause(milliseconds)

Pauses the application for the specified number of milliseconds. It keeps dispatching messages.

ParameterTypeDescription
millisecondsSalNumberThe number of milliseconds to pause.

Returns: SalBoolean. true if the function succeeds and false if it fails.

Static memberPicClear(ctrl)

Deletes the contents of a picture.

ParameterTypeDescription
ctrlControlTarget control (picture) on which to execute the call.

Returns: SalBoolean. true if the function succeeds and false if hWnd is not a valid picture.

Static memberPicGetDescription(ctrl, description, maxLen)

ParameterTypeDescription
ctrlControl
descriptionSalString&
maxLenSalNumber

Returns: SalNumber.

Static memberPicGetImage(ctrl, buffer, type)

ParameterTypeDescription
ctrlControl
bufferSalString&
typeSalNumber&

Returns: SalNumber.

Static memberPicGetImage(ctrl, buffer, type)

ParameterTypeDescription
ctrlControl
bufferSalBinary&
typeSalNumber&

Returns: SalNumber.

Static memberPicGetString(ctrl, format, buffer)

ParameterTypeDescription
ctrlControl
formatSalNumber
bufferSalString&

Returns: SalNumber.

Static memberPicGetString(ctrl, format, buffer)

ParameterTypeDescription
ctrlControl
formatSalNumber
bufferSalBinary&

Returns: SalNumber.

Static memberPicSet(ctrl, resourceType, format)

Inserts a resource into a picture.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
resourceTypeSalResourceAn icon or bitmap in the Resources section of the outline.
formatSalNumberThe resource type. If you specify zero, the resource type will be determined. Otherwise, specify one of these values: PIC_FormatBitmapPIC_FormatIcon

Returns: SalBoolean. true if the function succeeds and false if it fails.

Static memberPicSetFile(ctrl, fileName)

Inserts a file's contents into a picture.

ParameterTypeDescription
ctrlControlTarget control (picture) on which to execute the call.
fileNameSalStringThe name of the file whose contents are to be inserted into ctrl

Returns: SalBoolean. true if the function succeeds and false if it fails.

Function SalPicSetFile() loads most picture formats. The file extension must match the format type. Valid files are of the following types:. .bmp(Windows bitmap files), .dib(Device Independent bitmaps, a holdover from earlier versions of Windows), .pcx, .tif(Tagged Image File Format(TIFF) files), .wmf(Windows MetaFile format), .gif(Graphics Interchange Format files).jpg(Joint Photographic Experts Group (JPEG) files)

Static memberPicSetFit(ctrl, fit, scaleWidth, scaleHeight)

Sets the fit for a picture.

ParameterTypeDescription
ctrlControlTarget control (picture) on which to execute the call.
fitSalNumberThe type of fit: PIC_FitBestFitPIC_FitScalePIC_FitSizeToFit
scaleWidthSalNumberThe width scaling percentage if fit is PIC_FitScale.
scaleHeightSalNumberThe height scaling percentage if fit is PIC_FitScale.

Returns: SalBoolean. true if the function succeeds and false if it fails.

Static memberPicSetHandle(ctrl, type, handle)

Sets the picture image of a picture window with the handle of a bitmap (HBITMAP) or icon (HICON). Usually, HBITMAPs and HICONs are loaded from DLLs.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
typeSalNumberSet this to PIC_FormatIcon if nHandle is an HICON or to PIC_FormatBitmap if nHandle is an HBITMAP.
handleSalNumberAn HBITMAP or HICON.

Returns: SalBoolean. true if this function succeeds and false otherwise.

Static memberPicSetImage(ctrl, buffer, type)

Inserts the contents of a picture to an image without the image header.

ParameterTypeDescription
ctrlControlTarget control (picture) on which to execute the call.
bufferSalStringString buffer which stores the image bytes.
typeSalNumberReceives the format of the picture contents: PIC_ImageTypeNonePIC_ImageTypeBMPPIC_ImageTypeICONPIC_ImageTypeWMFPIC_ImageTypeTIFFPIC_ImageTypePCXPIC_ImageTypeGIFPIC_ImageTypeJPEGPIC_ImageTypeNuVEQ

Returns: SalBoolean. true if the function succeeds and false if it fails.

Static memberPicSetString(ctrl, format, buffer)

Inserts the contents of a string into a picture.

ParameterTypeDescription
ctrlControlTarget control (picture) on which to execute the call.
formatSalNumber
bufferSalString

Returns: SalBoolean.

Static memberPicSetString(ctrl, format, buffer)

Inserts the contents of a binary buffer into a picture.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
formatSalNumberThe format of the picture contents: PIC_FormatBitmapPIC_FormatIconPIC_FormatObject
bufferSalBinaryA memory image of a picture. You can use FileRead to read a bitmap file into a string. You can also SELECT a long varchar database column that contains a bitmap or icon into a string.

Returns: SalBoolean. true if the function succeeds and false if it fails.

Static memberPixelsToFormUnits(ctrl, numPixels, vertical)

Computes the number of form units based on the number of pixels. Form units are a unit of measurement used by functions that move and position objects. Form units are computed using physical units (pixels) in conjunction with a window's font sizes.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
numPixelsSalNumberThe number of pixels.
verticalSalBooleanIf the form units are on the X axis, set this parameter to false. If the form units are on the Y axis, set this parameter to true.

Returns: SalNumber. the number of form units returned if the function call is successful. Returns zero (0) if ctrl is invalid.

Static memberPostMsg(ctrl, msg, wParam, lParam)

Posts the specified message to a window by adding msg to ctrl's message queue.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
msgSalNumberThe message number.
wParamSalNumberThe wParam for the message. A generic parameter used to hold numeric information useful for messages processing.
lParamSalNumberThe lParam for the message.A generic parameter used to hold numeric information useful for messages processing.

Returns: SalBoolean. true if the function succeeds and false if it fails.

Static memberPrtExtractRect(lParam, left, top, right, bottom)

ParameterTypeDescription
lParamSalNumber
leftSalNumber&
topSalNumber&
rightSalNumber&
bottomSalNumber&

Returns: SalBoolean.

Static memberPrtGetDefault(device, driver, port)

ParameterTypeDescription
deviceSalString&
driverSalString&
portSalString&

Returns: SalBoolean.

Static memberPrtGetParmNum(parm, value)

ParameterTypeDescription
parmSalNumber
valueSalNumber&

Returns: SalBoolean.

Static memberPrtPreviewForm(ctrl)

Prints a form window, table window, or dialog box, including its contents and row header flags.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: SalBoolean. bOk

Static memberPrtPrintForm(ctrl)

Prints a form window, table window, or dialog box, including its contents and row header flags.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: SalBoolean. true if the function succeeds and false if it fails.

If a form window or dialog box contains a child table window, list box or combo box, only the rows on screen print. Lines, frames, and pictures print as well. Tries to print a window in the font displayed on screen.For best results, use only those fonts supported by your printer. If the window is wider or higher than the paper size, the window prints on as many pages as needed.

Static memberPrtSetDefault(device, driver, port)

Sets the default device (printer), driver, and port.

ParameterTypeDescription
deviceSalStringThe default device.
driverSalStringThe default driver.
portSalStringThe default port.

Returns: SalBoolean. true if the function succeeds and false if it fails.

NOTE: The port number in NT is a volatile value. If a network printer is deleted from the list of printers, the port number Nexx changes. Setting the port name (i.e., \PrintServer\PrinterName) for both the device and port parameters circumvents this.

Static memberPrtSetParmDefaults()

Resets print parameters back to their default values.

Returns: SalBoolean. true if the function succeeds and false if it fails.

The print parameters are a set of global variables which are initialized to default values and can be set using PrtSetParmNum, retrieved using PrtGetParmNum or reinitialized using PrtSetParmDefaults

Static memberPrtSetParmNum(parm, value)

Sets the value of a print parameter. The print parameters are a set of global variables which are initialized to default values and can be set using PrtSetParmNum, retrieved using PrtGetParmNum or reinitialized using PrtSetParmDefaults

ParameterTypeDescription
parmSalNumberA constant that represents the parameter to set; one of the PRT_* constants.
valueSalNumberThe parameter value.

Returns: SalBoolean. true if the function succeeds and false if it fails.

PRT_* constants: PRT_nCopyCountPRT_nDraftModePRT_nFromPagePRT_nMarginLeftPRT_nMarginTopPRT_nPrintAllPRT_nShowFormPageRectPRT_nToPage

Static memberPrtSetup(device, driver, port, activeOnly)

ParameterTypeDescription
deviceSalString&
driverSalString&
portSalString&
activeOnlySalBoolean

Returns: SalBoolean.

Static memberQueryFieldEdit(ctrl)

Returns the setting of the Field Edit Flag for a data field, multi line field, combo box, table window's context row cell, or picture.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: SalBoolean. true if hWndField's field edit flag is set and false otherwise.

The field edit flag is set whenever the user changes the value of an editable data field, multiline text field, or table window column. For a picture, the field edit flag is set whenever a server application is opened for editing. The field edit flag is not set if you make the change with a Set statement or a fetch from the database. This function does NOT clear the field edit flag of ctrl. Important: For some objects(such as table window scroll bars) GetType returns zero.Do not call QueryFieldEdit for any object where GetType returns zero.

Static memberQuit()

Exits an application.

Returns: SalBoolean. true if the function succeeds. False if the function fails.

Static memberReportClose(windowReport)

Closes a report window. Call this function when you want to close a report preview window.

ParameterTypeDescription
windowReportSalWindowHandleThe name of a report window.

Returns: SalBoolean. true if the function succeeds and false if windowReport is invalid.

Static memberReportCmd(windowReport, command)

Sends a command to an open report window. Use ReportCmd() to control a window that displays a report.

ParameterTypeDescription
windowReportSalWindowHandleThe name of a report window.
commandSalNumberThe command to send to the report. Possible values include any of the RPT_Cmd* commands.

Returns: SalBoolean. true if the function succeeds and false if it fails

When you call ReportView, its second parameter contains the handle of the window in which the report displays. The application creates that window. Use ReportCmd() to send commands that control the window to Report Builder. RPT_Cmd* commands: RPT_CmdFirstPageRPT_CmdGoToPageRPT_CmdLastPageRPT_CmdNextPageRPT_CmdPrevPageRPT_CmdPrintRPT_CmdPrinterSetupRPT_CmdSizeActualRPT_CmdSizeFit

Static memberReportCreate(fileName, variableNames, inputs, defaultReport, error)

ParameterTypeDescription
fileNameSalString
variableNamesSalString
inputsSalString
defaultReportSalBoolean
errorSalNumber&

Returns: SalBoolean.

Static memberReportCreate(fileName, variableNames, inputs, defaultReport, error, template)

ParameterTypeDescription
fileNameSalString
variableNamesSalString
inputsSalString
defaultReportSalBoolean
errorSalNumber&
templateSalString

Returns: SalBoolean.

Static memberReportDlgOptions(windowReport, caption, line1, line2, docName)

Sets the options for the report printing dialog box.

ParameterTypeDescription
windowReportSalWindowHandleThe wParam of a SAM_Report* message that contains the window handle.
captionSalStringThe replacement text for the Print dialog box caption text.
line1SalStringThe replacement text for the first centered-text field.
line2SalStringThe replacement text for the second centered-text field.
docNameSalStringThe name of the document that Print Manager displays when the output is spooled and waiting to print.

Returns: SalBoolean. true if the function succeeds and false if it fails.

Static memberReportGetDateTimeVar(windowReport, variableName, value)

ParameterTypeDescription
windowReportSalWindowHandle
variableNameSalString
valueSalDateTime&

Returns: SalBoolean.

Static memberReportGetNumberVar(windowReport, variableName, value)

ParameterTypeDescription
windowReportSalWindowHandle
variableNameSalString
valueSalNumber&

Returns: SalBoolean.

Static memberReportGetObjectVar(windowReport, variableName, value)

ParameterTypeDescription
windowReportSalWindowHandle
variableNameSalString
valueSalString&

Returns: SalBoolean.

Static memberReportGetPrinterSettings(windowReport, printerName, orientation, paperType, width, height)

ParameterTypeDescription
windowReportSalWindowHandle
printerNameSalString&
orientationSalNumber&
paperTypeSalNumber&
widthSalNumber&
heightSalNumber&

Returns: SalBoolean.

Static memberReportGetStringVar(windowReport, variableName, value)

ParameterTypeDescription
windowReportSalWindowHandle
variableNameSalString
valueSalString&

Returns: SalBoolean.

Static memberReportPrint(owner, template, variableNames, inputs, copies, options, firstPage, lastPage, error)

ParameterTypeDescription
ownerControl
templateSalString
variableNamesSalString
inputsSalString
copiesSalNumber
optionsSalNumber
firstPageSalNumber
lastPageSalNumber
errorSalNumber&

Returns: SalWindowHandle.

Static memberReportPrintToFile(owner, template, destFile, variableNames, inputs, copies, options, firstPage, lastPage, rtfFormat, error)

ParameterTypeDescription
ownerControl
templateSalString
destFileSalString
variableNamesSalString
inputsSalString
copiesSalNumber
optionsSalNumber
firstPageSalNumber
lastPageSalNumber
rtfFormatSalBoolean
errorSalNumber&

Returns: SalWindowHandle.

Static memberReportPrintToFile(owner, template, destFile, variableNames, inputs, options, firstPage, lastPage, error)

ParameterTypeDescription
ownerControl
templateSalString
destFileSalString
variableNamesSalString
inputsSalString
optionsSalNumber
firstPageSalNumber
lastPageSalNumber
errorSalNumber&

Returns: SalWindowHandle.

Static memberReportReset(windowReport)

Re-populates the report window.

ParameterTypeDescription
windowReportSalWindowHandleThe name of the report window.

Returns: SalBoolean. true if the function succeeds and false if it fails.

This function re-sends the SAM_ReportFetchInit message, and one or more SAM_ReportFetchNext messages to populate the report window with the new data.

Static memberReportSetDateTimeVar(windowReport, variableName, value)

Sets the value of a date/time report variable.

ParameterTypeDescription
windowReportSalWindowHandleThe name of a report window.
variableNameSalStringThe name of the variable whose value you want to set.
valueSalDateTimeThe value of variableName .

Returns: SalBoolean. true if the function succeeds and false if it fails.

Static memberReportSetNumberVar(windowReport, variableName, value)

Sets the value of a numeric report variable.

ParameterTypeDescription
windowReportSalWindowHandleThe name of a report window.
variableNameSalStringThe name of the variable whose value you want to set.
valueSalNumberThe value of variableName .

Returns: SalBoolean. true if the function succeeds and false if it fails.

Static memberReportSetObjectVar(windowReport, variableName, value)

Sets the value of an object report variable.

ParameterTypeDescription
windowReportSalWindowHandleThe window handle of the report window.
variableNameSalStringThe name of the variable whose value you want to set.
valueSalStringThe value of variableName .

Returns: SalBoolean. true if the function succeeds and false if it fails.

Static memberReportSetPrinterSettings(windowReport, printerName, orientation, paperType, width, height)

Sets the printer properties at runtime. This function should be called while processing the SAM_ReportStart event.

ParameterTypeDescription
windowReportSalWindowHandleThe handle of a report window.
printerNameSalStringFriendly name of the printer. Pass STRING_Null or an empty string if you do not want to switch the printer.
orientationSalNumberPaper Orientation. Use one of the following constants:
* RPT_Portrait for portrait mode.
* RPT_Landscape for landscape mode.
* Use -1 if you do not want to change the orientation.
paperTypeSalNumberPaper type. Use one of the RPT_Paper* constants or the PaperKind enum.
widthSalNumberPaper width in milli-inches. This value is ignored for all paper types except for RPT_PaperCustom.
heightSalNumberPaper height in milli-inches. This value is ignored for all paper types except for RPT_PaperCustom.

Returns: SalBoolean. true if the function succeeds and false if it fails.

RPT_Paper* constants: RPT_PaperA3RPT_PaperA3RPT_PaperA4RPT_PaperA5RPT_PaperB5RPT_PaperLegalRPT_PaperLetterRPT_PaperTabloidRPT_PaperCustom

Static memberReportSetStringVar(windowReport, variableName, value)

Sets the value of a string report variable.

ParameterTypeDescription
windowReportSalWindowHandleThe window handle of the report window.
variableNameSalStringThe name of the variable whose value you want to set.
valueSalStringThe value of variableName .

Returns: SalBoolean. true if the function succeeds and false if it fails.

Static memberReportTableCreate(fileName, table, error)

ParameterTypeDescription
fileNameSalString
tableControl
errorSalNumber&

Returns: SalBoolean.

Static memberReportTableCreate(fileName, table, error, template)

ParameterTypeDescription
fileNameSalString
tableControl
errorSalNumber&
templateSalString

Returns: SalBoolean.

Static memberReportTablePrint(table, template, paramArray, error)

ParameterTypeDescription
tableControl
templateSalString
paramArraySalArray<SalNumber>
errorSalNumber&

Returns: SalWindowHandle.

Static memberReportTableView(table, parent, template, error)

ParameterTypeDescription
tableControl
parentControl
templateSalString
errorSalNumber&

Returns: SalWindowHandle.

Static memberReportView(owner, parent, template, variableNames, inputs, flags)

ParameterTypeDescription
ownerControl
parentControl
templateSalString
variableNamesSalString
inputsSalString
flagsSalNumber&

Returns: SalWindowHandle.

Static memberResolveType(asm, typeName)

Finds the type in any loaded assembly. The first specified assembly argument has the precedence.

ParameterTypeDescription
asmAssembly
typeNameString

Returns: Type.

Static memberScrollGetPos(ctrl, pos)

ParameterTypeDescription
ctrlControl
posSalNumber&

Returns: SalBoolean.

Static memberScrollGetRange(ctrl, min, max, line, page)

ParameterTypeDescription
ctrlControl
minSalNumber&
maxSalNumber&
lineSalNumber&
pageSalNumber&

Returns: SalBoolean.

Static memberScrollSetPos(ctrl, pos)

Sets the scrollbar's value.

ParameterTypeDescription
ctrlControlTarget control (vertical or horizontal scroll bar) on which to execute the call.
posSalNumberThe scroll bar position. If this value is outside the scroll bar's range, sets the scroll bar position to the scroll range minimum or the scroll range maximum, depending on whether pos is below or above the range.

Returns: SalBoolean. true if the function succeeds and false if it fails.

This function is equivalent to using a Set statement to assign a value to the scroll bar.

Static memberScrollSetRange(ctrl, min, max, line, page)

Sets a scroll bar's range, line increment, and page increment.

ParameterTypeDescription
ctrlControlTarget control (vertical or horizontal scroll bar) on which to execute the call.
minSalNumberThe minimum position of the scroll bar.
maxSalNumberThe maximum position of the scroll bar.
lineSalNumberThe number of units to increment or decrement the scroll bar when the user clicks the scroll bar arrow.
pageSalNumberThe number of units to increment or decrement the scroll bar when the user clicks either side of the scroll box.

Returns: SalBoolean. true if the function succeeds and false if it fails.

When the scroll bar is created, it is assigned these values: Minimum scroll position: 0 Maximum scroll position: 100 Line Increment: 1 Page Increment: 10 If the scroll bar's position before calling this function is outside the range specified by min and max , its position changes to fall within the new range. min and max must lie within the range of -32,767 to 32,767.

Static memberSendClassMessage(message, wParam, lParam)

Invokes the message actions implemented or inherited by an object's class when called from either a derived class or from an object that is an instance of a class.

ParameterTypeDescription
messageSalNumberThe message number.
wParamSalNumberThe wParam for the message. A generic parameter used to hold numeric information useful for messages processing.
lParamSalNumberThe lParam for the message.A generic parameter used to hold numeric information useful for messages processing.

Returns: SalNumber. the message return value. If the message has no return, returns zero (0).

Note: This function cannot be used against a Visual Toolchest or QuickObject class when building to a .NET build target.

Static memberSendClassMessageNamed(type, message, wParam, lParam)

Invokes the message actions implemented or inherited by an object's class when called from either a derived class or from an object that is an instance of a class.

ParameterTypeDescription
typeTypeThe ancestor's class name.
messageSalNumberThe message number.
wParamSalNumberThe wParam for the message. A generic parameter used to hold numeric information useful for messages processing.
lParamSalNumberThe lParam for the message.A generic parameter used to hold numeric information useful for messages processing.

Returns: SalNumber. the message return value. If the message has no return, returns zero (0).

Use this function instead of SendClassMessage with a class that is the result of multiple inheritance. It lets you specify which base class message action you want to execute. type must be a direct base class of the class from which this call is made. Note: This function cannot be used against a Visual Toolchest or QuickObject class when building to a.NET build target.

Static memberSendMsg(ctrl, message, wParam, lParam)

Sends the specified message to a window. SendMsg does not return until the processing for the message is complete.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
messageSalNumberThe message number.
wParamSalNumberThe wParam for the message. A generic parameter used to hold numeric information useful for messages processing.
lParamSalNumberThe lParam for the message.A generic parameter used to hold numeric information useful for messages processing.

Returns: SalNumber. the message return value. If the message has no return, returns zero (0).

Static memberSendMsgToChildren(ctrl, message, wParam, lParam)

Sends a message to all child items of a form window, dialog box, table window, or MDI window.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
messageSalNumberThe message number.
wParamSalNumberThe wParam for the message. A generic parameter used to hold numeric information useful for messages processing.
lParamSalNumberThe lParam for the message.A generic parameter used to hold numeric information useful for messages processing.

Returns: SalBoolean. true if the function succeeds and false if it fails.

Static memberSendValidateMsg()

Sends a SAM_Validate message to the object with the focus data field, multi line field, or table window column if it was edited and sets the wParam and lParam message variables to zero (0).

Returns: SalNumber. VALIDATE_Cancel, VALIDATE_Ok, or VALIDATE_OkClearFlag

Call this function to force field validation before processing a menu pick. SAM_Validate message is not automatically sent on a menu pick.

Static memberSetBufferLength(buffer, length)

ParameterTypeDescription
bufferSalBinary&
lengthSalNumber

Returns: SalBoolean.

Static memberSetBufferLength(str, length)

ParameterTypeDescription
strSalString&
lengthSalNumber

Returns: SalBoolean.

Static memberSetDefButton(ctrl)

Sets the default push button of a form window or dialog box.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: SalBoolean. true if the function succeeds and false if ctrl is not a valid button.

When this function returns, the default push button gets the focus only if the focus was on one of the push buttons before you called SetDefButton.

Static memberSetErrorInfo(code, desc, helpfileName, helpContext)

Sets COM error information.

ParameterTypeDescription
codeSalNumberA number identifying the error. This number should be less than -1000 and negative.
descSalStringA textual, human-readable description of the error intended for the end user.
helpfileNameSalStringThe fully qualified drive, path, and file name of a help file with more information about the error.
helpContextSalNumberThe help context identifier of a topic in the help file. This field is ignored when helpfileName is empty.

Returns: SalBoolean. true if the function succeeds and false if it fails.

If an error occurs during a method, you can call SetErrorInfo() to set standard error information. This function does not halt processing. This function should be the last statement that the method executes.

Static memberSetFieldEdit(ctrl, set)

Sets or clears the field edit flag for an editable data field, combo box, multi line text field, table window column, or picture.

ParameterTypeDescription
ctrlControlThe data field, multiline text field, table window column, or picture on which to execute the call.
setSalBooleantrue sets the flag; false clears it.

Returns: SalBoolean. true if the function succeeds and false if it fails.

The Field Edit Flag is set whenever the user changes the value of a data field, multiline field, combo box or table window column. For a picture, the field edit flag is set whenever a server application is opened for editing. The field edit flag is not set if you make the change with a Set statement or a fetch from a database.

Static memberSetFocus(ctrl)

Sets the focus to a specified window.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call-the window to receive the focus.

Returns: SalWindowHandle. the window that previously had the focus.

Warning: You cannot call SalSetFocus in SAM_KillFocus processing.

Static memberSetMaxDataLength(ctrl, length)

Sets a limit on the number of characters that a user can enter into a data field, multi line text field, or table window column.

ParameterTypeDescription
ctrlControlTarget data field, multiline text field, or table window column on which to execute the call.
lengthSalNumberThe character limit.

Returns: SalBoolean. true if the function succeeds and false if it fails.

Static memberSetProfileString(section, entry, value, fileName)

Set the value of an entry in the specified section of an initialization file or registry.

ParameterTypeDescription
sectionSalStringThe section heading.
entrySalStringThe entry whose associated value is being set.
valueSalStringThe value of entry.
fileNameSalStringThe name of the initialization file or company name depending on the settings made using the UseRegistry function.

Returns: SalBoolean. true if the function succeeds and false if it fails.

Static memberSetWindowLabelText(ctrl, text)

Sets the text of the label associated to a control. Important: The label control does not require a mnemonic for the function to operate.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
textSalStringThe window text.

Returns: SalBoolean. true if the function succeeds and false if it fails.

Static memberSetWindowLoc(ctrl, x, y)

Moves a window to a new position (x, y) on the X and Y axes.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
xSalNumberThe position on the X axis (expressed in form units).
ySalNumberThe position on the Y axis (expressed in form units).

Returns: SalBoolean. true if the function succeeds and false if ctrl is not a valid window.

Static memberSetWindowSize(ctrl, width, height)

Resizes a window.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
widthSalNumberThe new width of the window (expressed in form units).
heightSalNumberThe new height of the window (expressed in form units).

Returns: SalBoolean. true if the window is successfully resized, and false if ctrl is an invalid window handle.

Static memberSetWindowText(ctrl, text)

Sets the text of a window to a specified string.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
textSalStringThe window text.

Returns: SalBoolean. true if the function succeeds and false if it fails.

A window's text is the title of a form window, modeless dialog box, table window, radio button, check box, or push button. For a data field or table window column, the text is the object's value in string form, regardless of the object's data type. For a combo box, the text is the contents of the editable data field portion.If the combo box is not editable, it tries to set the list selection to the item that matches the specified string. This latter statement is true for list boxes as well. SetWindowText clears the field edit flag.

Static memberShowWindow(ctrl)

Makes a window visible.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: SalBoolean. true if the previous state of the window was visible and false if it was hidden. Use this information to hide many windows without first checking that they are visible. When you restore them to their original state at a later point in time, the return lets you make visible only those windows that were previously visible.

Static memberShowWindowAndLabel(ctrl)

Makes a window and its associated label visible. A label is the label control that immediately precedes the window in the outline.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: SalBoolean. true if the previous state of the window was visible and false if it was hidden. Use this information to hide many windows without first checking that they are visible. When you restore them to their original state at a later point in time, the return lets you make visible only those windows that were previously visible.

Static memberStartTrace(outputType, traceFile, clearExisting)

Begins tracing.

ParameterTypeDescription
outputTypeSalNumber
traceFileSalString
clearExistingSalBoolean

Returns: SalBoolean.

Static memberStaticFirst(form)

Returns a "handle" to the first static on a window

ParameterTypeDescription
formControl

Returns: SalNumber.

Static memberStaticGetLabel(ctrl)

Gets the static "handle" if the label for a specified control

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: SalNumber.

Static memberStaticGetLoc(form, handle, x, y)

ParameterTypeDescription
formControl
handleSalNumber
xSalNumber&
ySalNumber&

Returns: SalBoolean.

Static memberStaticGetSize(form, handle, width, height)

ParameterTypeDescription
formControl
handleSalNumber
widthSalNumber&
heightSalNumber&

Returns: SalBoolean.

Static memberStaticHide(form, handle)

Hides a static

ParameterTypeDescription
formControl
handleSalNumber

Returns: SalBoolean.

Static memberStaticIsVisible(form, handle)

Determines whether a static is visible.

ParameterTypeDescription
formControl
handleSalNumber

Returns: SalBoolean.

Static memberStaticNext(form, handle)

Returns a "handle" to the last static on a window

ParameterTypeDescription
formControl
handleSalNumber

Returns: SalNumber.

Static memberStaticSetLoc(form, handle, x, y)

Sets the location coordinates of a static

ParameterTypeDescription
formControl
handleSalNumber
xSalNumber
ySalNumber

Returns: SalBoolean.

Static memberStaticSetSize(form, handle, width, height)

Sets the size of a static

ParameterTypeDescription
formControl
handleSalNumber
widthSalNumber
heightSalNumber

Returns: SalBoolean.

Static memberStaticShow(form, handle)

Shows a static

ParameterTypeDescription
formControl
handleSalNumber

Returns: SalBoolean.

Static memberStatusGetText(ctrl, text, maxLen)

ParameterTypeDescription
ctrlControl
textSalString&
maxLenSalNumber

Returns: SalNumber.

Static memberStatusSetText(ctrl, text)

Displays specified text in the status bar of a top-level or MDI window.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
textSalStringThe text to display in the status bar.

Returns: SalBoolean. true if the function succeeds and false if it fails.

Static memberStatusSetVisible(ctrl, show)

Shows or hides the status bar on a top-level or MDI window.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
showSalBooleanIf true, the status bar displays; if false, the status bar hides.

Returns: SalBoolean. true if the function succeeds and false if it fails.

Static memberStrCompress(str)

ParameterTypeDescription
strSalString&

Returns: SalBoolean.

Static memberStrFirstChar(str, charCode)

ParameterTypeDescription
strSalString&
charCodeSalNumber&

Returns: SalBoolean.

Static memberStrGetBufferLength(str)

Returns the current buffer length of a string.

ParameterTypeDescription
strSalStringThe string whose buffer length you want.

Returns: SalNumber. the length of str's buffer.

Static memberStrIsValidCurrency(money, precision, scale)

Verifies that a string represents a valid currency value.

ParameterTypeDescription
moneySalString
precisionSalNumber
scaleSalNumber

Returns: SalBoolean.

Static memberStrIsValidDateTime(str)

Verifies that string represents a valid date/time value.

ParameterTypeDescription
strSalStringThe string

Returns: SalBoolean. true if str contains a valid date/time value and false otherwise.

Static memberStrIsValidDecimal(str, precision, scale)

Verifies that an entire character string represents a valid decimal value.

ParameterTypeDescription
strSalStringThe string
precisionSalNumberThe number of digits to display.
scaleSalNumberThe number of digits to the right of the decimal point.

Returns: SalBoolean. true if str contains a number of the specified precision and scale, and false if str 's value does not match the parameter specifications.

Static memberStrIsValidIdentifierName(str)

Returns TRUE if the string is a valid identifier.

ParameterTypeDescription
strSalString

Returns: SalBoolean.

Static memberStrIsValidNumber(str)

Verifies that a string represents a valid number value. Valid numbers are integers or floating point numbers, negative and positive.

ParameterTypeDescription
strSalStringThe string

Returns: SalBoolean. true if str contains a valid number and false otherwise.

Static memberStrLeft(source, length, target)

ParameterTypeDescription
sourceSalString
lengthSalNumber
targetSalString&

Returns: SalNumber.

Static memberStrLeftX(source, length)

Returns a substring of a specified length starting at position zero.

ParameterTypeDescription
sourceSalStringThe string from which to extract characters.
lengthSalNumberThe number of characters to extract from source

Returns: SalString. the substring.

Static memberStrLength(str)

Returns a string's length.

ParameterTypeDescription
strSalStringThe string whose length you want.

Returns: SalNumber. the length of str

Static memberStrLop(str)

ParameterTypeDescription
strSalString&

Returns: SalNumber.

Static memberStrLower(source, target)

ParameterTypeDescription
sourceSalString
targetSalString&

Returns: SalNumber.

Static memberStrLowerX(source)

Converts a string to lowercase.

ParameterTypeDescription
sourceSalStringThe string to convert.

Returns: SalString. the lowercase string.

Static memberStrMid(source, startPos, length, target)

ParameterTypeDescription
sourceSalString
startPosSalNumber
lengthSalNumber
targetSalString&

Returns: SalNumber.

Static memberStrMidX(source, startPos, length)

Returns a substring, starting at a specified position and containing a specified number of characters.

ParameterTypeDescription
sourceSalStringThe source string.
startPosSalNumberThe starting position of the substring (zero is the first position) in source .
lengthSalNumberThe number of characters to put in the substring.

Returns: SalString. the substring.

Static memberStrProper(source, target)

ParameterTypeDescription
sourceSalString
targetSalString&

Returns: SalNumber.

Static memberStrProperX(source)

Converts a string to a proper name.

ParameterTypeDescription
sourceSalStringThe string to convert.

Returns: SalString. the converted string.

Static memberStrRepeat(source, times, target)

ParameterTypeDescription
sourceSalString
timesSalNumber
targetSalString&

Returns: SalNumber.

Static memberStrRepeatX(source, times)

Concatenates a string with itself a specified number of times.

ParameterTypeDescription
sourceSalStringThe source string.
timesSalNumberThe number of times to concatenate source with itself.

Returns: SalString. The new string.

Static memberStrReplace(source, startPos, length, replace, target)

ParameterTypeDescription
sourceSalString
startPosSalNumber
lengthSalNumber
replaceSalString
targetSalString&

Returns: SalNumber.

Static memberStrReplaceX(source, startPos, length, replace)

ParameterTypeDescription
sourceSalString
startPosSalNumber
lengthSalNumber
replaceSalString

Returns: SalString.

Static memberStrRight(source, length, target)

ParameterTypeDescription
sourceSalString
lengthSalNumber
targetSalString&

Returns: SalNumber.

Static memberStrRightX(source, length)

Returns a string of specified length, starting with the last character in the string.

ParameterTypeDescription
sourceSalStringThe source string.
lengthSalNumberThe number of characters to extract.

Returns: SalString. The new string.

Static memberStrScan(str1, str2)

Returns the offset of a specified substring. If there is more than one instance of the string being searched for, only the offset of the first instance is returned. Case is disregarded in the search.

ParameterTypeDescription
str1SalStringThe string to search. The first character in the string is at offset zero (0).
str2SalStringThe string to search for.

Returns: SalNumber. a number that indicates the offset (0 origin) of str2 in str1 . If str2 is not found in str1 , returns -1.

You can use pattern matching characters. The percent character (%) matches any set of characters. The underscore character (_) matches any single character. The use of a backslash() with SalStrScan differs when searching for a backslash, percent, or underscore character. Its usage also differs depending on whether or not the second parameter is a string literal. When searching for a backslash and strString2 is a string literal, you need four backslashes:StrScan( 'This is a \', '\\' ) When searching for a percent character or an underscore character and strString2 is a string literal, you need two backslashes: StrScan( 'This is a %', '\%' ) StrScan( 'This is an ', '\' ) Even if str2 is not a string literal, you need a single backslash to search for a percent character or an underscore.

Static memberStrSetBufferLength(str, length)

ParameterTypeDescription
strSalString&
lengthSalNumber

Returns: SalBoolean.

Static memberStrToDate(str)

Converts a string to a date/time value. This function uses the system date format to convert a date string. If you want to be format independent, use DateConstruct.

ParameterTypeDescription
strSalStringThe string to convert.

Returns: SalDateTime. the date/time value converted from str

Static memberStrTokenize(source, startDel, endDel, target)

Parses a string into substrings (tokens) based on specified start and end delimiters. Delimiters are used to recognize the beginning and end of each substring.

ParameterTypeDescription
sourceSalStringThe string to parse.
startDelSalStringA string that contains the start delimiter character. Pass an empty string ('') to specify the lack of a start delimiter.
endDelSalStringA string that contains the end delimiter character. Pass an empty string ('') to specify the lack of an end delimiter.
targetSalArray<SalString>The name of an array of substrings created from source .

Returns: SalNumber. the number of substrings created. Returns zero (0) if no substrings are created, or if an error occurs.

Interprets the first non-start delimiter character as the beginning of a substring, and skips any start delimiters that precede this character. For example, if '!' is a start delimiter, the strings 'Hello' and '!!!Hello' produce the same token: 'Hello'. If the first non-start delimiter character is an end delimiter character, it is interpreted as a null substring. This is useful for comma-separated data where ',' is an end delimiter. For example, the records 'data1,data2,,data4' and ',data2,data3,data4' have four tokens each, one of which is null. Once the beginning of a substring is found, it interprets all characters that follow as elements of the substring until it finds an end delimiter. For example, if '!' is a start delimiter and '?' is an end delimiter, the string 'abc!def?ghi!' produces the tokens: 'abc!def' and 'ghi!'. Although the exclamation point is a start delimiter, they are correctly interpreted as elements of the substring.

Static memberStrToNumber(str)

Converts a string to a number.

ParameterTypeDescription
strSalStringThe string to convert.

Returns: SalNumber. the number resulting from the conversion.

Static memberStrTrim(source, target)

ParameterTypeDescription
sourceSalString
targetSalString&

Returns: SalNumber.

Static memberStrTrimX(source)

Strips leading and trailing blanks and compresses multiple spaces and tabs within a string to single spaces.

ParameterTypeDescription
sourceSalStringThe original string.

Returns: SalString. the new string.

Static memberStrUncompress(str)

ParameterTypeDescription
strSalString&

Returns: SalBoolean.

Static memberStrUpper(source, target)

ParameterTypeDescription
sourceSalString
targetSalString&

Returns: SalNumber.

Static memberStrUpperX(source)

Converts a string to uppercase.

ParameterTypeDescription
sourceSalStringThe string to convert.

Returns: SalString. the uppercase string.

Static memberTabAddPage(control, pageIndex, pageName)

Adds a tab page at a valid tab set index position.

ParameterTypeDescription
controlControlThe name of the tab-bar control.
pageIndexSalNumberSpecifies the index insertion position within a tabset. For the first tab page, pageIndex = 0.
pageNameSalStringSpecifies the name of the tab page to be added.

Returns: SalBoolean. true if the function succeeds and false if it fails.

Static memberTabAddPageEx(control, pageIndex, pageName, imageFile, tooltip)

Adds a tab page at a valid tab set index position. You can include an image and a tool tip.

ParameterTypeDescription
controlControlThe name of the tab-bar control.
pageIndexSalNumberIndicates a zero-based page index. The new page will be inserted after the page indicated by pageIndex.
pageNameSalStringName of the new page (object title).
imageFileSalStringFile name of the image to display for the new page.
tooltipSalStringTooltip for the new page.

Returns: SalBoolean. true if the function succeeds; false if it fails.

Static memberTabAssociateChild(control, pageIndex, child)

Associates a child to a tab page.

ParameterTypeDescription
controlControlThe name of the tab-bar control.
pageIndexSalNumberSpecifies the index of a tab page. For the first tab page, pageIndex = 0.
childControlThe name of the child object.

Returns: SalBoolean. true if the function succeeds and false if it fails.

Static memberTabAttachWindow(control, pageIndex, form)

Assigns a child window created at runtime to the specified tab page as its container window. You can programmatically create a Form Window or Dialog Box as child and assign it to a tab page by using this function.

ParameterTypeDescription
controlControlname of tab control.
pageIndexSalNumberIndex of a tab page. Start from 0
formControlThe child window to assign to specified tab page.

Returns: SalBoolean. the Window to which the child window was previously attached. This function returns hWndNULL if function fails.

Note:

  1. The child window( form ) will resize to fill the tab page, even if form is the handle for a single object. If you want several objects on the tab page, use a parent window that contains the desired objects
  2. When creating the form or dialog box to associate with the tab, make sure to use the tab bar as the parent window in the call to CreateWindowEx and/or the nFlag parameter with CREATE_AsChild
  3. If a top level window has Accessories Enabled and it was not created with the tab bar it is going to be associated with as the parent, and the call will fail and return hWndNULL

Static memberTabDetachWindow(control, pageIndex)

Detaches a child window from the specified tab control. The tab page will be associated to a new default tab control.

ParameterTypeDescription
controlControlThe tab control.
pageIndexSalNumberIndex of a tab page to detach. Start from 0.

Returns: SalWindowHandle. The tab control to which the tab page was previously attached.

Static memberTabDisablePage(control, pageIndex)

Disables a tab page.

ParameterTypeDescription
controlControlThe name of the tab-bar control.
pageIndexSalNumberInteger that specifies the index of a tab page to be enabled. For the first tab page, pageIndex = 0.

Returns: SalBoolean. true if the function succeeds and false if it fails.

Static memberTabDisassociateChild(control, pageIndex, child)

Disassociates a child with a tab page.

ParameterTypeDescription
controlControlThe name of the tab-bar control.
pageIndexSalNumberInteger that specifies the index of a tab page. For the first tab page, pageIndex = 0.
childControlThe name of the child object.

Returns: SalBoolean. true if the function succeeds and false if it fails.

Static memberTabEnablePage(control, pageIndex)

Enables a tab page

ParameterTypeDescription
controlControlThe name of the tab-bar control.
pageIndexSalNumberInteger that specifies the index of a tab page to be enabled. For the first tab page, pageIndex = 0.

Returns: SalBoolean. true if the function succeeds and false if it fails.

Static memberTabGetActivePage(control)

Gets the current active tab page.

ParameterTypeDescription
controlControlThe name of the tab-bar control.

Returns: SalNumber. Integer that specifies the current active tab page. For the first tab page, pageIndex = 0.

Static memberTabGetPageIndex(control, pageName)

Gets the tab page index as specified by the tab name.

ParameterTypeDescription
controlControlThe name of the tab-bar control.
pageNameSalStringString, that specifies the name of a tab page.

Returns: SalNumber. Integer that specifies the tab index of a particular tab page. For the first tab page, pageIndex = 0.

Static memberTabGetPageName(control, pageIndex)

gets the name of the tab page (not the title that appears on the tab page at runtime).

ParameterTypeDescription
controlControlThe name of the tab-bar control.
pageIndexSalNumberInteger that specifies the index of a tab page. For the first tab page, pageIndex = 0.

Returns: SalString. The name of the tabpage.

Static memberTabGetPageTitle(control, pageIndex)

Gets the tab page title as specified by the tab index.

ParameterTypeDescription
controlControlThe name of the tab-bar control.
pageIndexSalNumberInteger that specifies the index of a tab page. For the first tab page, pageIndex = 0.

Returns: SalString. String that specifies the tab name of a particular tab page index.

Static memberTabGetPageWindow(control, pageIndex)

Gets the window handle of the specified tab page.

ParameterTypeDescription
controlControlThe tab control.
pageIndexSalNumberIndex of the tab page whose window handle you are trying to obtain. Start from 0.

Returns: SalWindowHandle. the window handle of the specified tab page.

Static memberTabGetTooltip(control, pageIndex, tooltip, maxLength)

ParameterTypeDescription
controlControl
pageIndexSalNumber
tooltipSalString&
maxLengthSalNumber

Returns: SalNumber.

Static memberTabHidePage(control, pageIndex)

Hides a tab page and all controls within that page.

ParameterTypeDescription
controlControlThe tab bar control.
pageIndexSalNumberInteger that specifies the index of the tab page to be hidden. For the first tab page, pageIndex = 0.

Returns: SalBoolean. true if the function succeeds and false if it fails.

Static memberTabHideStrip(control)

Hides the tab page selector inside the specified tab control. While the tab selector strop is hidden, you can change the active tab page by using TabSetActivePage.

ParameterTypeDescription
controlControlThe tab control.

Returns: SalBoolean. true if the function succeeds and false if it fails.

Static memberTabPageCount(control)

Returns the number of tab pages.

ParameterTypeDescription
controlControlThe name of the tab-bar control.

Returns: SalNumber. The number of tabs in the tabset.

Static memberTabRemovePage(control, pageIndex)

Removes a tab page.

ParameterTypeDescription
controlControlThe name of the tab-bar control.
pageIndexSalNumberInteger that specifies the index of a tab page to be removed. For the first tab page, pageIndex = 0.

Returns: SalBoolean. true if the function succeeds and false if it fails.

Static memberTabRenamePage(control, pageIndex, pageName)

Renames a tab page.

ParameterTypeDescription
controlControlThe name of the tab-bar control.
pageIndexSalNumberInteger that specifies the index of a tab page to be renamed. For the first tab page, pageIndex = 0.
pageNameSalStringString, that specifies the new name of the tab page.

Returns: SalBoolean. true if the function succeeds and false if it fails.

Static memberTabSetActivePage(control, pageIndex)

Activates a tab specified by a particular tab index.

ParameterTypeDescription
controlControlThe name of the tab-bar control.
pageIndexSalNumberInteger that specifies the index of a tab page to be activated. For the first tab page,pageIndex = 0.

Returns: SalBoolean. true if the function succeeds and false if it fails.

Static memberTabSetPageTitle(control, pageIndex, pageTitle)

Sets the title of the specified tab page.

ParameterTypeDescription
controlControlThe tab control.
pageIndexSalNumberIndex of a tab page. Start from 0.
pageTitleSalStringTab page title to set.

Returns: SalBoolean. true if the function succeeds and false if it fails.

Static memberTabSetTooltip(control, pageIndex, tooltip)

Sets the tool tip text on the specified tab page. Tool tip text appears only on tab selector, not on a tab container window.

ParameterTypeDescription
controlControlThe tab control.
pageIndexSalNumberIndex of a tab page. Start from 0.
tooltipSalStringReceives the tooltip text.

Returns: SalBoolean. a number that indicates the length of tooltip

Static memberTabShowPage(control, pageIndex)

Shows a tab page specified by the pageIndex and all controls within that page.

ParameterTypeDescription
controlControlThe tab bar control
pageIndexSalNumberInteger that specifies the index of the tab page to be shown. For the first tab page, pageIndex = 0.

Returns: SalBoolean. true if the function succeeds and false if it fails.

Static memberTabShowStrip(control)

Shows the tab page selector inside the specified tab control.

ParameterTypeDescription
controlControlThe tab control.

Returns: SalBoolean. true if the function succeeds and false if it fails.

Static memberTabUpdate(control)

Updates the Tab bar after a TabAssociateChild or TabDisassociateChild is called.

ParameterTypeDescription
controlControlThe tab bar control.

Returns: SalBoolean. true if the function succeeds and false if it fails.

Static memberTBarSetVisible(ctrl, show)

Shows or hides the tool bar on a top-level or MDI window.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
showSalBooleanIf true, displays the tool bar; if false, hides the tool bar.

Returns: SalBoolean. true if the function succeeds and false if it fails.

Static memberTblAnyRows(table, flagsOn, flagsOff)

Determines whether any rows in the specified table window match certain flags.

ParameterTypeDescription
tableControlThe name of a table window or grid.
flagsOnSalNumberThe flags that the row should have. You can combine ROW * flags using the OR (|) operator.
flagsOffSalNumberThe flags that the row should not have. You can combine ROW * flags using the OR (|) operator.

Returns: SalBoolean. true if any of the table window's or grid's rows have any of the flagsOn flags and none of the flagsOff flags.

If you set flagsOn to zero (0) and flagsOff to zero (0), TblAnyRows returns true if the table window or grid contains any rows at all, regardless of their flags. Row Flag Constants: ROW_EditedROW_HiddenROW_HideMarksROW_MarkDeletedROW_NewROW_SelectedROW_UnusedFlag1ROW_UnusedFlag2

Static memberTblClearSelection(table)

Deselects all rows of a table window.

ParameterTypeDescription
tableControlThe name of a table window or grid.

Returns: SalBoolean. true if the function succeeds and false if it fails.

Static memberTblColumnAverage(table, columnId, flagsOn, flagsOff)

Computes the average of all column values or only specified column values in a table window.

ParameterTypeDescription
tableControlThe name of a table window or grid.
columnIdSalNumberThe Column Identifier.
flagsOnSalNumberThe flags that the row should have. You can combine ROW* flags using the OR (|) operator.
flagsOffSalNumberThe flags that the row should not have. You can combine ROW* flags using the OR (|) operator:

Returns: SalNumber. the average of all column values or only specified column values in a table window or grid. Returns zero (0) if an error occurs.

Static memberTblColumnSum(table, columnId, flagsOn, flagsOff)

Computes the sum of all column values or only specified column values in a table window.

ParameterTypeDescription
tableControlThe table window or grid.
columnIdSalNumberThe Column Identifier.
flagsOnSalNumberThe flags that the row should have. You can combine ROW* flags using the OR (|) operator.
flagsOffSalNumberThe flags that the row should not have. You can combine ROW* flags using the OR (|) operator.

Returns: SalNumber. The sum of all column values or only specified column values in a table window or grid. Returns zero (0) if an error occurs.

Use row flag constants to specify the rows to use to compute the sum. For example, you can choose to sum only the values of modified rows.

Static memberTblCopyRows(table, flagsOn, flagsOff)

Copies the contents of the specified table window rows to the Clipboard in text format.

ParameterTypeDescription
tableControlThe name of a table window or grid.
flagsOnSalNumberThe flags that the row should have. You can combine ROW* flags using the OR (|) operator.
flagsOffSalNumberThe flags that the row should not have. You can combine ROW* flags using the OR (|) operator.

Returns: SalBoolean. true if any of the table window or grid rows are copied to the Clipboard and false if no rows matched the indicated flags, or if none of the matched rows could be copied to the Clipboard.

In the Clipboard, columns are delimited by TAB characters and rows are delimited by end-of-line characters. Set flagsOn to zero (0) and flagsOff to zero (0) to copy the entire table. The copy stops, without indicating a failure, after copying 64 Kbytes of text. Each individual column value is limited to 512 bytes of text. Row Flag Constants: ROW_EditedROW_HiddenROW_HideMarksROW_MarkDeletedROW_NewROW_SelectedROW_UnusedFlag1ROW_UnusedFlag2

Static memberTblCreateColumn(table, columnPos, displayWidth, maxChars, title)

Creates a table window column of string data type at runtime. When you return to design mode, the column is destroyed.

ParameterTypeDescription
tableControlThe name of a table window or grid.
columnPosSalNumberThe Column Position.
displayWidthSalNumberThe display width of the column in inches.
maxCharsSalNumberThe maximum number of characters that the column can contain.
titleSalStringThe column title.

Returns: SalNumber. the Column Identifier of the new column. Returns negative one (-1) if an error occurs.

Static memberTblCreateColumnEx(table, columnPos, displayWidth, title, maxChars, dataType)

Creates a table window column using a given data type at runtime. Allowed types are DT_String, DT_Number and DT_DateTime. When you return to design mode, the column is destroyed.

ParameterTypeDescription
tableControlThe name of a table window or grid.
columnPosSalNumberThe Column Position
displayWidthSalNumberThe display width of the column in inches
titleSalStringThe column title.
maxCharsSalNumberThe maximum number of characters that the column can contain.
dataTypeSalNumberOne of the datatype constants: DT_Boolean, DT_DateTimeDT_LongStringDT_NumberDT_String

Returns: SalNumber. the Column Identifier of the new column. Returns negative one (-1) if an error occurs

Static memberTblCreateColumnFromClass(table, className, position)

Uses the specified class as a template to create a new column in a SalTableWindow.

ParameterTypeDescription
tableControlThe table into which the new column will be inserted.
classNameSalStringThe name of the column class to be used as a template.
positionSalNumberThe position in the grid or table where the new column where be inserted. 1 is the left-most position. -1 indicates to append the column to the end of the table.

Returns: SalWindowHandle. The new column. NULL if an error occurs.

Static memberTblDefineCheckBoxColumn(column, flags, checkedValue, uncheckedValue)

Define a column as a check box.

ParameterTypeDescription
columnControl
flagsSalNumber
checkedValueSalString
uncheckedValueSalString

Returns: SalBoolean.

Static memberTblDefineDropDownListColumn(column, flags, lines)

Define a column as a drop down list.

ParameterTypeDescription
columnControl
flagsSalNumber
linesSalNumber

Returns: SalBoolean.

Static memberTblDefinePopupEditColumn(column, flags, lines)

Define a column as a popup edit window.

ParameterTypeDescription
columnControl
flagsSalNumber
linesSalNumber

Returns: SalBoolean.

Static memberTblDefineRowHeader(table, title, width, flags, column)

Defines the appearance and behavior of a table window's row header.

ParameterTypeDescription
tableControlThe table window or grid.
titleSalStringThe title of the row header column.
widthSalNumberThe width of the row header in pixels.
flagsSalNumberThe row header attributes. You can combine these flags using the OR (|) operator. Possible values include: TBL_RowHdr_VisibleTBL_RowHdr_MarkEditsTBL_RowHdr_ShareColorTBL_RowHdr_Sizable
columnControlThe column that the row header mirrors. If column is hWndNULL, the row header is blank.

Returns: SalBoolean. TRUE if the function succeeds and FALSE if it fails.

The row header is a non-editable area on the left edge of a table window or grid that displays information that stays displayed even when a user scrolls horizontally. A typical use of a row header is the display of row numbers.

Static memberTblDefineSplitWindow(table, rowsLowerHalf, dragAdjust)

Splits a table window horizontally.

ParameterTypeDescription
tableControlThe name of a table window to split.
rowsLowerHalfSalNumberThe number of rows to make visible in the lower half of the split window. If you specify zero (0), the table window is not split.
dragAdjustSalBooleanSpecify whether (true) or not (false) to let the user drag-adjust the visible rows in both halves of a split window.

Returns: SalBoolean. true if the function succeeds and false if it fails.

Static memberTblDeleteRow(table, row, flag)

Deletes a row from a table window but not from the database.

ParameterTypeDescription
tableControlThe name of a table window or grid.
rowSalNumberThe number of the row to delete.
flagSalNumberA constant used to coordinate a delete from the table window with a with a delete from a SQLBase result set. This parameter can be one of these values: TBL_AdjustTBL_NoAdjust

Returns: SalBoolean. true if the function succeeds and false if it fails.

Static memberTblDeleteSelected(table, sql)

Applies a SQL DELETE statement to all table window rows with the ROW Selected flag.

ParameterTypeDescription
tableControlThe name of a table window or grid
sqlSalSqlHandleThe handle of a DELETE statement.

Returns: SalBoolean. true if the function succeeds and false if table or sql is invalid.

You must prepare or retrieve the SQL DELETE statement before calling this function. As each row is deleted from the database, SQLWindows deletes it from the table window or grid display. This function does not perform a COMMIT. You must perform a COMMIT to ensure that the deletions are not lost in the case of a rollback.

Static memberTblDeleteSelected(table, sql, errorHandler)

Applies a SQL DELETE statement to all table window rows with the ROW Selected flag.

ParameterTypeDescription
tableControlThe name of a table window or grid
sqlSalSqlHandleThe handle of a DELETE statement.
errorHandlerWhenSqlErrorHandlerThe error handler.

Returns: SalBoolean. true if this function succeeds and false if it fails.

You must prepare or retrieve the SQL DELETE statement before calling this function. As each row is deleted from the database, SQLWindows deletes it from the table window or grid display. This function does not perform a COMMIT. You must perform a COMMIT to ensure that the deletions are not lost in the case of a rollback.

Static memberTblDestroyColumns(table)

Destroys all automatic columns created by SalTblCreateColumn or SalTblPopulate at runtime. This function only works on table windows that contain only automatic columns.

ParameterTypeDescription
tableControlThe name of a table window or grid.

Returns: SalBoolean. true if the function succeeds and false if table is invalid or the table window or grid contains non-automatic columns (columns created at design time).

Static memberTblDoDeletes(table, sql, flagsOn, errorHandler)

Applies a SQL DELETE statement to all table window rows that have flagsOn flags.

ParameterTypeDescription
tableControlThe name of a table window or grid.
sqlSalSqlHandleThe handle of a DELETE statement.
flagsOnSalNumberRow flags are used to determine which rows to delete. You can specify either of these flags:ROW_MarkDeletedROW_Selected
errorHandlerWhenSqlErrorHandlerThe error handler

Returns: SalBoolean. true if any rows are deleted and false otherwise. Returns false if table or sql is invalid.

Static memberTblDoDeletes(table, sql, flagsOn)

Applies a SQL DELETE statement to all table window rows that have flagsOn flags.

ParameterTypeDescription
tableControlThe name of a table window or grid.
sqlSalSqlHandleThe handle of a DELETE statement.
flagsOnSalNumberRow flags are used to determine which rows to delete. You can specify either of these flags:ROW_MarkDeletedROW_Selected

Returns: SalBoolean. true if any rows are deleted and false otherwise. Returns false if table or sql is invalid.

As each row is deleted from the database, SQLWindows deletes it from the table window or grid display. This function does not perform a COMMIT. You must perform a COMMIT to ensure that the deletions are not lost in the case of a rollback.

Static memberTblDoInserts(table, sql, clearFlags)

Applies a SQL INSERT statement to all the rows in a table window that have the ROW New flag.

ParameterTypeDescription
tableControlThe name of a table window or grid.
sqlSalSqlHandleThe handle of an INSERT statement.
clearFlagsSalBooleanWhether to reset the ROW New flag. If TRUE, the ROW New flag of each inserted row is cleared; if FALSE, the ROW New flag of each inserted row is not cleared.. This is useful for error handling; if an error occurs, you can rollback the transaction and try again.

Returns: SalBoolean. true if the function succeeds and false if it does nit.

You must prepare the SQL INSERT statement before calling this function. This function does not perform a COMMIT. You must perform a COMMIT to ensure that insertions are not lost in the case of a rollback.

Static memberTblDoInserts(table, sql, clearFlags, errorHandler)

Applies a SQL INSERT statement to all the rows in a table window that have the ROW New flag.

ParameterTypeDescription
tableControl
sqlSalSqlHandle
clearFlagsSalBoolean
errorHandlerWhenSqlErrorHandler

Returns: SalBoolean.

Static memberTblDoUpdates(ctrl, sql, clearFlags)

Applies a SQL UPDATE statement to all table window rows with the Row Edited flag.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
sqlSalSqlHandle
clearFlagsSalBoolean

Returns: SalBoolean.

Static memberTblDoUpdates(table, sql, clearFlags, errorHandler)

Applies a SQL UPDATE statement to all table window rows with the Row Edited flag.

ParameterTypeDescription
tableControl
sqlSalSqlHandle
clearFlagsSalBoolean
errorHandlerWhenSqlErrorHandler

Returns: SalBoolean.

Static memberTblFetchRow(table, row)

Sends a SAM_FetchRow message to a table window if the row you specify is not currently in the table window cache.

ParameterTypeDescription
tableControl
rowSalNumber

Returns: SalNumber.

Static memberTblFindNextRow(table, row, flagsOn, flagsOff)

ParameterTypeDescription
tableControl
rowSalNumber&
flagsOnSalNumber
flagsOffSalNumber

Returns: SalBoolean.

Static memberTblFindPrevRow(table, row, flagsOn, flagsOff)

ParameterTypeDescription
tableControl
rowSalNumber&
flagsOnSalNumber
flagsOffSalNumber

Returns: SalBoolean.

Static memberTblGetColumnText(table, columnId, text)

ParameterTypeDescription
tableControl
columnIdSalNumber
textSalString&

Returns: SalBoolean.

Static memberTblGetColumnTitle(column, text, maxLen)

ParameterTypeDescription
columnControl
textSalString&
maxLenSalNumber

Returns: SalNumber.

Static memberTblGetColumnWindow(table, col, flags)

Gets the handle of a table window column.

ParameterTypeDescription
tableControl
colSalNumber
flagsSalNumber

Returns: SalWindowHandle.

Static memberTblInsertRow(table, row)

Inserts a new blank row into a table window.

ParameterTypeDescription
tableControl
rowSalNumber

Returns: SalNumber.

Static memberTblKillEdit(table)

Takes a row out of edit mode and selects the row. This causes the row to receive both SAM_Validate and SAM_KillFocus messages.

ParameterTypeDescription
tableControl

Returns: SalBoolean.

Static memberTblKillFocus(table)

Turns off the table window's focus frame.

ParameterTypeDescription
tableControl

Returns: SalBoolean.

Static memberTblObjectsFromPoint(table, x, y, row, column, flags)

ParameterTypeDescription
tableControl
xSalNumber
ySalNumber
rowSalNumber&
columnSalWindowHandle&
flagsSalNumber&

Returns: SalBoolean.

Static memberTblPasteRows(table)

Pastes the contents of the Clipboard to the specified table window. Assumes the Clipboard data is in text format with cells delimited by tab characters and rows delimited by end-of-line characters. Inserts the new rows into the table window without overwriting existing rows, and converts the data to the data types of the corresponding table window columns.

ParameterTypeDescription
tableControl

Returns: SalBoolean.

Static memberTblPopulate(table, sql, select, method)

Compiles, binds, and executes a SQL SELECT statement, then fetches the rows of the result set and populates a table window with them.

ParameterTypeDescription
tableControl
sqlSalSqlHandle
selectSalString
methodSalNumber

Returns: SalBoolean.

Static memberTblPopulate(table, sql, select, method, errorHandler)

Compiles, binds, and executes a SQL SELECT statement, then fetches the rows of the result set and populates a table window with them.

ParameterTypeDescription
tableControl
sqlSalSqlHandle
selectSalString
methodSalNumber
errorHandlerWhenSqlErrorHandler

Returns: SalBoolean.

Static memberTblPopulateFromXML(table, file, rootNode, tableNode, useSchema)

Clears a table window or grid and then fills new rows with data from an XML document. Optionally uses an XML schema to set attributes in the table.

ParameterTypeDescription
tableControlTable window to populate.
fileSalStringThe name of the XML document file containing data to be used to populate the table.
rootNodeSalStringThe name of the XML root node of the table, or the name of the XML node pertaining to a table row. See tableNode .
tableNodeSalBooleanIf true, it means that the name specified in rootNode is the actual root node of the table, and this function should use the default name "row" as the name of the node for each table row. If false, it means that the name in rootNode is actually the name of a row node, and each node found with that name should be processed as a table window or grid row.
useSchemaSalBooleanIndicates whether to retrieve and use an XML schema for determining data types and attributes. If true, the schema is retrieved. If false, data is written into table window cells with the presumption that the table structure is already correct. Currently, useSchema cannot be specified true when tableNode is false.

Returns: SalBoolean. True if the function succeeds and FALSE if fails. Some failure conditions, such as an invalid file name or invalid root node name, may cause error message dialogs to be displayed.

After each row of data is populated, this function sends message SAM_XMLRowDone to the table window. If an error occurs during the read, then the data in the table may be incomplete and should not be relied upon. When useSchema is set to true, and if the table window's columns were created at design time, the length of each column's value will be the length assigned at design time. If the table window or grid has no design-time columns and they are being automatically created during the call to this function, then the length of each column's value will be the length that is specified in the XML schema. This raises the possibility of truncation, if the value of an element contains more characters than are specified by the design-time length or the XML schema length.

Static memberTblQueryCheckBoxColumn(column, flags, checkedValue, uncheckedValue)

ParameterTypeDescription
columnControl
flagsSalNumber&
checkedValueSalString&
uncheckedValueSalString&

Returns: SalBoolean.

Static memberTblQueryColumnCellType(column, type)

ParameterTypeDescription
columnControl
typeSalNumber&

Returns: SalBoolean.

Static memberTblQueryColumnFlags(column, flags)

Tests the state of a table window column's flags.

ParameterTypeDescription
columnControl
flagsSalNumber

Returns: SalBoolean.

Static memberTblQueryColumnID(column)

Gets a table window column's identifier.

ParameterTypeDescription
columnControl

Returns: SalNumber.

Static memberTblQueryColumnPos(column)

Gets a table window column's relative position.

ParameterTypeDescription
columnControl

Returns: SalNumber.

Static memberTblQueryColumnWidth(column, width)

ParameterTypeDescription
columnControl
widthSalNumber&

Returns: SalBoolean.

Static memberTblQueryContext(table)

Returns a table window's current context row. Before sending a SAM_FetchRow message, automatically sets the context row so that assignments made while processing the message reference the correct row.

ParameterTypeDescription
tableControl

Returns: SalNumber.

Static memberTblQueryDropDownListColumn(column, flags, lines)

ParameterTypeDescription
columnControl
flagsSalNumber&
linesSalNumber&

Returns: SalBoolean.

Static memberTblQueryFocus(table, row, column)

ParameterTypeDescription
tableControl
rowSalNumber&
columnSalWindowHandle&

Returns: SalBoolean.

Static memberTblQueryLinesPerRow(table, nLines)

ParameterTypeDescription
tableControl
nLinesSalNumber&

Returns: SalBoolean.

Static memberTblQueryLockedColumns(table)

Retrieves the number of locked table window columns.

ParameterTypeDescription
tableControl

Returns: SalNumber.

Static memberTblQueryPopupEditColumn(column, flags, lines)

ParameterTypeDescription
columnControl
flagsSalNumber&
linesSalNumber&

Returns: SalBoolean.

Static memberTblQueryRowFlags(table, row, flags)

Queries a row's flags.

ParameterTypeDescription
tableControl
rowSalNumber
flagsSalNumber

Returns: SalBoolean.

Static memberTblQueryRowHeader(table, title, maxTitle, width, flags, windowCol)

ParameterTypeDescription
tableControl
titleSalString&
maxTitleSalNumber
widthSalNumber&
flagsSalNumber&
windowColSalWindowHandle&

Returns: SalBoolean.

Static memberTblQueryScroll(table, position, minRange, maxRange)

ParameterTypeDescription
tableControl
positionSalNumber&
minRangeSalNumber&
maxRangeSalNumber&

Returns: SalBoolean.

Static memberTblQuerySplitWindow(table, rowsLowerHalf, dragAdjust)

ParameterTypeDescription
tableControl
rowsLowerHalfSalNumber&
dragAdjustSalBoolean&

Returns: SalBoolean.

Static memberTblQueryTableFlags(table, flags)

Tests the state of a table window's flags.

ParameterTypeDescription
tableControl
flagsSalNumber

Returns: SalBoolean.

Static memberTblQueryVisibleRange(table, minRange, maxRange)

ParameterTypeDescription
tableControl
minRangeSalNumber&
maxRangeSalNumber&

Returns: SalBoolean.

Static memberTblReset(table)

Clears a table window by discarding all rows from the table window cache and setting the table range to 0, -1.

ParameterTypeDescription
tableControl

Returns: SalBoolean.

Static memberTblScroll(table, row, column, flags)

Scrolls a table window to the specified row and column.

ParameterTypeDescription
tableControl
rowSalNumber
columnControl
flagsSalNumber

Returns: SalBoolean.

Static memberTblScroll(table, row, column)

Scrolls a table window to the specified row and column.

ParameterTypeDescription
tableControl
rowSalNumber
columnControl

Returns: SalBoolean.

Static memberTblSetCellTextColor(column, colorValue, discardable)

Changes a table window cell's text color.

ParameterTypeDescription
columnControl
colorValueSalNumber
discardableSalBoolean

Returns: SalBoolean.

Static memberTblSetCellTextColor(column, colorValue)

Changes a table window cell's text color.

ParameterTypeDescription
columnControl
colorValueSalNumber

Returns: SalBoolean.

Static memberTblSetColumnFlags(column, flags, set)

Sets or clears a table window column's flags.

ParameterTypeDescription
columnControl
flagsSalNumber
setSalBoolean

Returns: SalBoolean.

Static memberTblSetColumnPos(column, nPos)

Moves a table window column to a new position.

ParameterTypeDescription
columnControl
nPosSalNumber

Returns: SalBoolean.

Static memberTblSetColumnText(table, columndId, text)

Assigns data to a column of a table window's context row.

ParameterTypeDescription
tableControl
columndIdSalNumber
textSalString

Returns: SalBoolean.

Static memberTblSetColumnTitle(column, title)

Sets the title of a table window column.

ParameterTypeDescription
columnControl
titleSalString

Returns: SalBoolean.

Static memberTblSetColumnWidth(column, width)

Sets a table window column's display width.

ParameterTypeDescription
columnControl
widthSalNumber

Returns: SalBoolean.

Static memberTblSetContext(table, nRow)

Sets a table window's context row. Setting the context row does not send a SAM_FetchRow message. If the row is not currently in memory, creates a new row in memory and sets its cell values to null.

ParameterTypeDescription
tableControl
nRowSalNumber

Returns: SalBoolean.

Static memberTblSetFlagsAnyRows(table, flags, set, flagsOn, flagsOff)

Sets or clears row flags.

ParameterTypeDescription
tableControl
flagsSalNumber
setSalBoolean
flagsOnSalNumber
flagsOffSalNumber

Returns: SalBoolean.

Static memberTblSetFocusCell(table, row, column, editMin, editMax)

Sets the focus to the specified table window cell (row and column). Puts the table window into edit mode and lets the user select a portion of the data in the cell.

ParameterTypeDescription
tableControl
rowSalNumber
columnControl
editMinSalNumber
editMaxSalNumber

Returns: SalBoolean.

Static memberTblSetFocusRow(table, row)

Sets a table window's focus frame row.

ParameterTypeDescription
tableControl
rowSalNumber

Returns: SalBoolean.

Static memberTblSetLinesPerRow(table, lines)

Sets the height of a row in lines.

ParameterTypeDescription
tableControl
linesSalNumber

Returns: SalBoolean.

Static memberTblSetLockedColumns(table, lockedColumns)

Sets the number of locked table window columns.

ParameterTypeDescription
tableControl
lockedColumnsSalNumber

Returns: SalBoolean.

Static memberTblSetRange(table, min, max)

Defines the minimum and maximum rows (range) of a table.

ParameterTypeDescription
tableControl
minSalNumber
maxSalNumber

Returns: SalBoolean.

Static memberTblSetRow(table, rowPosition)

Sets the focus to the first, last, next, or previous row in a table window.

ParameterTypeDescription
tableControl
rowPositionSalNumber

Returns: SalNumber.

Static memberTblSetRowFlags(table, row, flags, set)

Sets or clears a table window row's flags.

ParameterTypeDescription
tableControl
rowSalNumber
flagsSalNumber
setSalBoolean

Returns: SalBoolean.

Static memberTblSetTableFlags(table, flags, set)

Sets or clears a table window's flags.

ParameterTypeDescription
tableControl
flagsSalNumber
setSalBoolean

Returns: SalBoolean.

Static memberTblSortRows(table, columnId, order)

Sorts the rows of a table window based on the values in one of the table window's columns.

ParameterTypeDescription
tableControl
columnIdSalNumber
orderSalNumber

Returns: SalBoolean.

Static memberTblWriteXMLandSchema(table, path, writeTypes)

Writes the contents and properties of a table window to an XML file and/or a schema file.

ParameterTypeDescription
tableControlTable Window.
pathSalStringThe path and name of the output file. Note that the schema file will have the same name, plus the suffix "_schema".
writeTypesSalNumberOne of the XML constants(XML_DocAndSchema, XML_Document ,XML_Schema), determining whether to write XML, schema, or both.

Returns: SalBoolean. True if the function succeeds.

If the table window contains a Date/Time column, and a cell in that column is empty, then no content will be written for that particular XML document node.

Static memberTblWriteXMLandSchemaEx(table, path, writeTypes, flagsOn, flagsOff)

Writes the contents and properties of a table window to an XML file and/or a schema file.

ParameterTypeDescription
tableControlTable Window.
pathSalStringThe path and name of the output file. Note that the schema file will have the same name, plus the suffix "_schema".
writeTypesSalNumberOne of the XML constants(XML_DocAndSchema, XML_Document ,XML_Schema), determining whether to write XML, schema, or both.
flagsOnSalNumberA combination of one or more of the row flags. Rows must have these flags on in order to be part of the output to XML.
flagsOffSalNumberA combination of one or more of the row flags. Rows must have these flags off in order to be part of the output to XML.

Returns: SalBoolean. True if the function succeeds.

If the table window contains a Date/Time column, and a cell in that column is empty, then no content will be written for that particular XML document node.

Static memberTimerKill(ctrl, eventId)

Destroys an object's system timer. Removes any pending SAM_Timer messages from the message queue of ctrl.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
eventIdSalNumberThe timer ID to kill.

Returns: SalBoolean. true if the event is successfully killed and false if the specified timer cannot be found.

Set a system timer with the TimerSet function. Note: Timers are a limited global resource. Your application must check the value returned by TimerSet to verify that the timer was created.

Static memberTimerSet(ctrl, eventId, milliseconds)

Creates a system timer for a given object. When a timer event occurs, sends SAM_Timer messages to the object in specified intervals. Timers are a limited global resource. Your application must check the value returned by SalTimerSet to verify that the timer was created.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
eventIdSalNumberThe timer ID number.
millisecondsSalNumberThe elapsed time between each SAM_Timer message, in milliseconds.

Returns: SalBoolean. true if the function succeeds and false if it fails.

Static memberTrace(severity, textToWrite)

Outputs a string to the trace output target.

ParameterTypeDescription
severitySalNumber
textToWriteSalString

Returns: SalBoolean.

Static memberTrackPopupMenu(owner, menuName, flags, x, y)

Creates pop-up menus at runtime.

ParameterTypeDescription
ownerControlThe top-level window that processes messages generated by the pop-up menu.
menuNameSalStringThe name of a pop-up menu accessible to owner. For example, a menu defined by owner or its MDI window parent, or a global menu.
flagsSalNumberSpecifies how the pop-up menu displays. You can combine flag values using the OR (|) operator.
xSalNumberThe position of the pop-up menu on the X axis. The value of this parameter is ignored if you set the TPM_CursorX flag in flags.
ySalNumberThe position of the pop-up menu on the Y axis. The value of this parameter is ignored if you set the TPM_CursorX in flags. The x and y Parameters together represent a point (the top left, top middle, or top right) of the pop-up menu, depending on the flags value.

Returns: SalBoolean. true if the function succeeds and false if it fails.

Possible flag values: TPM_CenterAlignTPM_ContextMenuTPM_CursorXTPM_CursorYTPM_LeftAlignTPM_LeftButtonTPM_RightAlignTPM_RightButton

Static memberTrackPopupMenu(owner, menuType, flags, x, y)

Creates pop-up menus at runtime.

ParameterTypeDescription
ownerControlThe top-level window that processes messages generated by the pop-up menu.
menuTypeTypeThe type of a pop-up menu accessible to owner.
flagsSalNumberSpecifies how the pop-up menu displays. You can combine flag values using the OR (|) operator.
xSalNumberThe position of the pop-up menu on the X axis. The value of this parameter is ignored if you set the TPM_CursorX flag in flags.
ySalNumberThe position of the pop-up menu on the Y axis. The value of this parameter is ignored if you set the TPM_CursorX in flags. The x and y Parameters together represent a point (the top left, top middle, or top right) of the pop-up menu, depending on the flags value.

Returns: SalBoolean. true if the function succeeds and false if it fails.

Possible flag values: TPM_CenterAlignTPM_ContextMenuTPM_CursorXTPM_CursorYTPM_LeftAlignTPM_LeftButtonTPM_RightAlignTPM_RightButton

Static memberTreeCollapseItem(ctrl, hItem)

Collapse a tree item. If the tree item handle is 0, then the top level tree items of the tree control are collapsed.

ParameterTypeDescription
ctrlControlTree control.
hItemSalNumberHandle to the tree item.

Returns: SalBoolean. TRUE if the function succeeds and FALSE if it fails.

Static memberTreeDeleteItem(ctrl, hItem)

Removes a tree item from a tree control. All child items of the tree item are also removed.

ParameterTypeDescription
ctrlControlTree control.
hItemSalNumberHandle to the tree item.

Returns: SalBoolean. TRUE if the item was deleted successfully.

Static memberTreeDemoteItem(ctrl, hItem)

Moves a tree item so it becomes the child of its previous sibling. This function will fail if the tree item has no previous sibling.

ParameterTypeDescription
ctrlControlTree control.
hItemSalNumberHandle to the tree item.

Returns: SalBoolean. TRUE if the function succeeds and FALSE if it fails.

Static memberTreeEditItem(ctrl, hItem)

Allows the user to edit the value of the tree item's label. SAM_Validate is sent to the tree control when the edit control loses focus with wParam indicating the handle to the tree item.

ParameterTypeDescription
ctrlControlTree control.
hItemSalNumberHandle to the tree item.

Returns: SalBoolean. TRUE if edit has been activated.

Static memberTreeEnableItem(ctrl, hItem, bEnable)

Enables the tree item when bEnable is true, disables the tree item when bEnable is false.

ParameterTypeDescription
ctrlControlTree control.
hItemSalNumberHandle to the tree item.
bEnableSalBooleanSet to TRUE to enable the item. Set to FALSE to disable the item.

Returns: SalBoolean. previous state of the item before this function was called. TRUE if it was enabled, FALSE if it was disabled.

Static memberTreeExpandItem(ctrl, hItem)

Expand a tree item. If the tree item handle is 0, then the top level tree items of the tree control are expanded.

ParameterTypeDescription
ctrlControlTree control.
hItemSalNumberHandle to the tree item.

Returns: SalBoolean. TRUE if the function succeeds and FALSE if it fails.

Static memberTreeFindItemByData(ctrl, hItem, nData)

Finds a tree item by its Object Data. Returns 0 if not found. Searches the child items of the tree item handle argument(hItem). If the handle is 0, searches the top level tree items.

ParameterTypeDescription
ctrlControlTree control.
hItemSalNumberHandle to the tree item.
nDataSalNumberData of the item to find.

Returns: SalNumber. Handle of the tree item whose Data matches the nData parameter.

Static memberTreeFindItemByTitle(ctrl, hItem, sTitle)

Finds a tree item by its object title. Returns 0 if not found. Searches the child items of the tree item handle argument. If the handle is 0, searches the top level tree items.

ParameterTypeDescription
ctrlControlTree control.
hItemSalNumberHandle to the tree item.
sTitleSalStringTitle of the item to find.

Returns: SalNumber. Handle of the item whose title matches the sTitle parameter.

Static memberTreeGetFirstItem(ctrl, hItem)

Gets the first child tree item of the passed tree item handle. Returns 0 if not found. If the handle is 0, returns the first child of the tree control. If the ShowRootLines attribute is set to Yes, and 0 is passed in, returns the root node of the tree control.

ParameterTypeDescription
ctrlControlTree control.
hItemSalNumberHandle to the tree item.

Returns: SalNumber. Handle of the tree item.

Static memberTreeGetItemCount(ctrl, hItem)

Gets the number of child items. If the handle argument is 0, then number of first level child items is returned.

ParameterTypeDescription
ctrlControlTree control.
hItemSalNumberHandle to the tree item.

Returns: SalNumber. Number of items.

Static memberTreeGetItemData(ctrl, hItem)

Returns the numeric value assigned to the tree item.

ParameterTypeDescription
ctrlControlTree control.
hItemSalNumberHandle to the tree item.

Returns: SalNumber. Numeric value assigned to the tree item.

Static memberTreeGetItemParent(ctrl, hItem)

Returns the handle of hItem's parent, or 0 if hItem is a top level child of the tree control.

ParameterTypeDescription
ctrlControlTree control.
hItemSalNumberHandle to the tree item.

Returns: SalNumber. Handle of hItem's parent.

Static memberTreeGetItemText(ctrl, hItem)

Returns the string title of the item.

ParameterTypeDescription
ctrlControlTree control.
hItemSalNumberHandle to the tree item.

Returns: SalString. String title of the item.

Static memberTreeGetItemTooltip(ctrl, hItem)

Returns the current tooltip for the tree item.

ParameterTypeDescription
ctrlControlTree control.
hItemSalNumberHandle to the tree item.

Returns: SalString. Current tooltip for the tree item.

Static memberTreeGetNextItem(ctrl, hItem)

Gets the next sibling tree item of the passed tree item handle. Returns 0 if there are no more sibling tree items.

ParameterTypeDescription
ctrlControlTree control.
hItemSalNumberHandle to the tree item.

Returns: SalNumber. Handle of the next tree item.

Static memberTreeGetPrevItem(ctrl, hItem)

Gets the previous sibling tree item of the passed tree item handle. Returns 0 if there are no more sibling items.

ParameterTypeDescription
ctrlControlTree control.
hItemSalNumberHandle to the tree item.

Returns: SalNumber. Handle of the previous tree item.

Static memberTreeGetSelectedItem(ctrl)

Returns the handle to the selected tree item, or 0 if no item is selected.

ParameterTypeDescription
ctrlControlTree control.

Returns: SalNumber. Handle to the selected tree item, or 0 if no item is selected.

Static memberTreeInsertItem(ctrl, hItem, nIndex, sTitle)

Inserts a tree item into the tree control. The new item will be a child of nItem.If nItem is 0, the tree item is added as a top level child of the tree control. If nIndex is greater than or equal to the number of child items, or if nIndex is less than zero, the new item is appended.

ParameterTypeDescription
ctrlControlTree control.
hItemSalNumberHandle of the tree item which will be the parent of the new item.
nIndexSalNumberIndex to insert (starting at zero).
sTitleSalStringTitle of the new item.

Returns: SalNumber. Handle of the newly created item.

Static memberTreeItemHasCheckBox(ctrl, hItem)

Returns true if the tree item has a checkbox displayed.

ParameterTypeDescription
ctrlControlTree control.
hItemSalNumberHandle to the tree item.

Returns: SalBoolean. TRUE if the item has a checkbox displayed, FALSE if not.

Static memberTreeItemIsChecked(ctrl, hItem)

Returns true if the item checkbox is checked. Returns false if the checkbox is not displayed.

ParameterTypeDescription
ctrlControlTree control.
hItemSalNumberHandle to the tree item.

Returns: SalBoolean. TRUE if the checkbox is checked. If the checkbox is not checked, or is not displayed, bIsChecked is FALSE.

Static memberTreeItemIsExpanded(ctrl, hItem)

Returns whether the item is expanded.

ParameterTypeDescription
ctrlControlTree control.
hItemSalNumberHandle to the tree item.

Returns: SalBoolean. TRUE if the item is expanded, FALSE if not.

Static memberTreeItemIsSelected(ctrl, hItem)

Returns whether the item is selected.

ParameterTypeDescription
ctrlControlTree control.
hItemSalNumberHandle to the tree item.

Returns: SalBoolean. TRUE if the item is selected, FALSE if not.

Static memberTreeItemsHaveCheckBoxes(ctrl)

Returns true if the tree shows checkboxes next to the items.

ParameterTypeDescription
ctrlControlTree control.

Returns: SalBoolean. TRUE if the items have a checkbox displayed, FALSE if not.

Static memberTreeMoveDownItem(ctrl, hItem)

Moves a tree item downward. This functions fails if the tree item is the last child of its parent.

ParameterTypeDescription
ctrlControlTree control.
hItemSalNumberHandle to the tree item.

Returns: SalBoolean. TRUE if the function succeeds and FALSE if it fails.

Static memberTreeMoveItem(ctrl, hItem, hParentItem, nPosition)

Moves a tree node and all its sub-nodes to a new location in the tree control.

ParameterTypeDescription
ctrlControlTree control.
hItemSalNumberHandle to the tree item.
hParentItemSalNumberHandle to the new parent tree item.
nPositionSalNumberPosition in the new parents list of children to place the new child (0-n).

Returns: SalBoolean. TRUE if the function succeeds and FALSE if it fails.

Static memberTreeMoveUpItem(ctrl, hItem)

Moves a tree item upward . This functions fails if the tree item is the first child of its parent.

ParameterTypeDescription
ctrlControlTree control.
hItemSalNumberHandle to the tree item.

Returns: SalBoolean. TRUE if the function succeeds and FALSE if it fails.

Static memberTreePromoteItem(ctrl, hItem)

Moves a tree item so it becomes the sibling of its parent. This functions fails if the tree item has no grandparent.

ParameterTypeDescription
ctrlControlTree control.
hItemSalNumberHandle to the tree item.

Returns: SalBoolean. TRUE if the function succeeds and FALSE if it fails.

Static memberTreeReset(ctrl, bRemove)

Clears a tree control with the option to retain or destroy design-time nodes.

ParameterTypeDescription
ctrlControlTree control.
bRemoveSalBooleanTRUE = Remove all nodes. FALSE = Remove nodes created dynamically; the tree goes back to the initial state.

Returns: SalBoolean. TRUE if the function succeeds and FALSE if it does not succeed.

Static memberTreeSetItemChecked(ctrl, hItem, bChecked)

Sets or clears the checkbox. If the checkbox is not displayed, this function has no effect.

ParameterTypeDescription
ctrlControlTree control.
hItemSalNumberHandle to the tree item.
bCheckedSalBooleanTRUE to set the box as checked, FALSE to clear the checkbox.

Returns: SalBoolean. TRUE if the function succeeds and FALSE if it fails.

Static memberTreeSetItemData(ctrl, hItem, nValue)

Sets the numeric value of the tree item.

ParameterTypeDescription
ctrlControlTree control.
hItemSalNumberHandle to the tree item.
nValueSalNumberValue to set.

Returns: SalNumber. Value that was previously assigned to the tree item.

Static memberTreeSetItemEditable(ctrl, hItem, bEditable)

Sets whether the tree item's label can be edited. If bEditable is true, the label can be edited.

ParameterTypeDescription
ctrlControlTree control.
hItemSalNumberHandle to the tree item.
bEditableSalBooleanWhether to enable or disable editing.

Returns: SalBoolean. TRUE if the function succeeds and FALSE if it fails.

Static memberTreeSetItemFontEnh(ctrl, hItem, nFontEnh)

Sets the font enhancement for a tree item.

ParameterTypeDescription
ctrlControlTree control.
hItemSalNumberHandle to the tree item.
nFontEnhSalNumber

Returns: SalBoolean. TRUE if the function succeeds and FALSE if it fails.

Static memberTreeSetItemImage(ctrl, hItem, bSelected, sImageFile)

Sets the image of a tree item. If the bSelected parameter is true, the selected image is set; otherwise the non-selected image is set.

ParameterTypeDescription
ctrlControlTree control.
hItemSalNumberHandle to the tree item.
bSelectedSalBooleanIf TRUE, use selected image. If FALSE, use non-selected image.
sImageFileSalStringFilename of the image.

Returns: SalBoolean. TRUE if the function succeeds and FALSE if it fails.

Static memberTreeSetItemImageFromBinary(ctrl, hItem, bSelected, nFormat, bPicture)

Sets the image of a tree item. If the bSelected parameter is true, the selected image is set; otherwise the non-selected image is set.

ParameterTypeDescription
ctrlControlTree control.
hItemSalNumberHandle to the tree item.
bSelectedSalBooleanIf TRUE, use selected image. If FALSE, use non-selected image.
nFormatSalNumberThe format of the picture contents: PIC_FormatBitmap, PIC_FormatIcon, PIC_FormatObject
bPictureSalBinaryThe image data to be assigned to the tree node.

Returns: SalBoolean. TRUE if the function succeeds and FALSE if it fails.

Static memberTreeSetItemImageFromResource(ctrl, hItem, bSelected, tResource)

Sets the image of a tree item. If the bSelected parameter is true, the selected image is set; otherwise the non-selected image is set.

ParameterTypeDescription
ctrlControlTree control.
hItemSalNumberHandle to the tree item.
bSelectedSalBooleanIf TRUE, use selected image. If FALSE, use non-selected image.
tResourceSalResourceResource object.

Returns: SalBoolean. TRUE if the function succeeds and FALSE if it fails.

Static memberTreeSetItemText(ctrl, hItem, sText)

Sets the title of the item.

ParameterTypeDescription
ctrlControlTree control.
hItemSalNumberHandle to the tree item.
sTextSalStringText to set as the title for this tree item.

Returns: SalBoolean. TRUE if the function succeeds and FALSE if it fails.

Static memberTreeSetItemTextColor(ctrl, hItem, nColor)

Sets the text color of the tree item.

ParameterTypeDescription
ctrlControlTree control.
hItemSalNumberHandle to the tree item.
nColorSalNumberColor to set.

Returns: SalBoolean. TRUE if the function succeeds and FALSE if it fails.

Static memberTreeSetItemTooltip(ctrl, hItem, sTooltip)

Sets the tooltip for the tree item.

ParameterTypeDescription
ctrlControlTree control.
hItemSalNumberHandle to the tree item.
sTooltipSalStringTooltip text.

Returns: SalBoolean. TRUE if the function succeeds and FALSE if it fails.

Static memberTreeSetSelectedItem(ctrl, hItem)

Selects a tree item.

ParameterTypeDescription
ctrlControlTree control.
hItemSalNumberHandle to the tree item.

Returns: SalBoolean. TRUE if the function succeeds and FALSE if it fails.

Static memberTreeShowItemCheckBox(ctrl, hItem, bShow)

Shows or hides the checkbox for a tree item.

ParameterTypeDescription
ctrlControlTree control.
hItemSalNumberHandle to the tree item.
bShowSalBooleanTRUE to show the checkbox, FALSE to hide it.

Returns: SalBoolean. TRUE if the function succeeds and FALSE if it fails.

Static memberTreeShowItemsCheckBoxes(ctrl, bShow)

Shows or hides the checkboxes for a tree control.

ParameterTypeDescription
ctrlControlTree control.
bShowSalBooleanTRUE to show the checkboxes, FALSE to hide them.

Returns: SalBoolean. TRUE if the function succeeds and FALSE if it fails.

Static memberUpdateWindow(ctrl)

Forces the update of a window.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: SalBoolean. true if the function succeeds and false if ctrl is not a valid window.

Painting is a low priority. Paint messages are sent to the end of an object's message queue and are processed after all other messages in the queue. If, during the development phase of your application, you find that painting is being delayed, you can force a window to update.

Static memberUseEventLog(useLog, resume)

Enables logging of unhandled exceptions in the event log.

ParameterTypeDescription
useLogSalBoolean
resumeSalBoolean

Returns: SalBoolean.

Static memberUseRegistry(useRegistry, companyName)

Redirects all SalProfile* functions to use the Registry.

ParameterTypeDescription
useRegistrySalBooleantrue if registry is to be used, false if INI files are to be used.
companyNameSalStringName of company to be used under the registry.

Returns: SalBoolean. the current "use registry" state.

Static memberValidateSet(window, state, lParam)

Deprecated memberDeprecated: Not supported. Not supported.

ParameterTypeDescription
windowSalWindowHandle
stateSalBoolean
lParamSalNumber

Returns: SalBoolean.

Static memberWaitCursor(on)

Displays or removes the hourglass cursor.

ParameterTypeDescription
onSalBooleanWhether to turn the hourglass on (true) or off (false).

Returns: SalBoolean. true if the function succeeds and false if it fails.

The hourglass is a visual indicator that the application is busy. You must always call this function twice; once to turn the cursor into an hourglass and again to restore it to its original form.

Static memberWindowClassName(ctrl)

Return the name of a window's class as a string.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Returns: SalString. the name of a window's class as a string. Returns an empty string if the window is not a class object.

Static memberWindowGetDockSetting(window, orientation)

ParameterTypeDescription
windowSalWindowHandle
orientationSalNumber&

Returns: SalBoolean.

Static memberWindowGetProperty(ctrl, name, value)

ParameterTypeDescription
ctrlControl
nameSalString
valueSalString&

Returns: SalBoolean.

Static memberWindowHandleToNumber(window)

Converts a SalWindowHandle to a number.

ParameterTypeDescription
windowSalWindowHandleThe handle to convert.

Returns: SalNumber. the number converted from window.

Static memberWindowHandleToNumber(file)

Converts a SalFileHandle to a number.

ParameterTypeDescription
fileSalFileHandleThe handle to convert.

Returns: SalNumber. the number converted from file.

Static memberWindowHandleToNumber(sql)

Converts a SalSqlHandle to a number.

ParameterTypeDescription
sqlSalSqlHandleThe handle to convert.

Returns: SalNumber. the number converted from sql.

Static memberWindowHandleToNumber(session)

Converts a SalSqlSessionHandle to a number.

ParameterTypeDescription
sessionSalSqlSessionHandleThe handle to convert

Returns: SalNumber. the number converted from session.

Static memberWindowIsDerivedFromClass(ctrl, type)

Determines whether a window is an instance of the specified class.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
typeTypeThe class type. Not a string. Type the class name without single quotes.

Returns: SalBoolean. true if the window is an instance of the named class or an instance of a class that is derived from the named class.

Tells you if a window is an instance of the class that you specify or an instance of a class that is derived from the class that you specify. Call this function to determine if you can make a late-bound call to a function defined in the named class using the window handle that you specify. If you make a late-bound function call with a handle that is not for a window derived from the named class and the function returns a value, you get an error at runtime and the application ends.

Static memberWindowSetProperty(ctrl, name, value, length)

Sets the value of a named property.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
nameSalString
valueSalString
lengthSalNumber

Returns: SalBoolean.

Static memberWinHelp(ctrl, file, command, index, key)

Starts the Windows help system. Sends a SAM_Help message to the top-level object when the user presses the F1 key. Process this message by calling WinHelp.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.
fileSalStringThe file name of the help system file.
commandSalNumberThe type of help requested; any HELP_* value.
indexSalNumberSpecify zero (0) unless: command is HELP_SetIndex and index specifies the current help index.
keySalStringThe context or keyword string of the requested help topic. This parameter is null unless command is equal to HELP_Key.

Returns: SalBoolean. true if the function succeeds and false if it fails.

HELP Constants HELP_FinderHELP_HelpOnHelpHELP_IndexHELP_KeyHELP_QuitHELP_SetIndex

Static memberXMLDeserialize<T>(obj, filePath)

ParameterTypeDescription
T
objT&
filePathSalString

Returns: SalBoolean.

Static memberXMLDeserialize<T>(xml)

Deserializes an object from a XML string.

ParameterTypeDescription
T
xmlSalStringXML to deserialize.

Returns: T. An instance of the deserialized XML.

Static memberXMLGetLastError(errorCode, errorMessage)

ParameterTypeDescription
errorCodeSalNumber&
errorMessageSalString&

Returns: SalBoolean.

Static memberXMLSerialize<T>(obj, filePath)

Serializes the object to a XML file.

ParameterTypeDescription
T
objTThe object to serialize.
filePathSalStringThe file path of the target XML file.

Returns: SalBoolean.

Static memberXMLSerialize<T>(obj)

Serializes the object to a XML string.

ParameterTypeDescription
T
objTObject to serialize.

Returns: SalString. Serialized XMl string.

Static memberYield(ctrl)

Processes messages in the message loop. This function replaces all SalYield* functions. It must be placed in the loop that block execution.

ParameterTypeDescription
ctrlControlTarget control on which to execute the call.

Static memberYieldEnable(set)

Deprecated memberDeprecated: Use Sal.Yield(window). Not Supported.

ParameterTypeDescription
setSalBoolean

Returns: SalBoolean.

Static memberYieldQueryState()

Deprecated memberDeprecated: Use Sal.Yield(window). Not Supported.

Returns: SalBoolean.

Static memberYieldStartMessages(window)

Deprecated memberDeprecated: Use Sal.Yield(window). Not Supported.

ParameterTypeDescription
windowSalWindowHandle

Returns: SalBoolean.

Static memberYieldStopMessages()

Deprecated memberDeprecated: Use Sal.Yield(window). Not Supported.

Returns: SalBoolean.