Sal

PPJ.Runtime.Sal

Namespace: PPJ.Runtime

Assembly: PPJ.Runtime.49 (4.9.0.0)

Contains all Sal.* static functions.

public class Sal

Properties

Interpreter

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

SalReportType

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

Methods

Abort(exitCode)

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

Parameter
Type
Description

exitCode

The 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.

ActiveXAutoErrorMode(on)

Turns on/off automatic COM error handling.

Parameter
Type
Description

Returns: SalBoolean.

ActiveXDoVerb(ctrl, verb, size)

Perform one of the object's enumerated actions.

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: SalBoolean.

ActiveXGetObject(ctrl, obj)

Returns the COM object for the specified AX control.

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: SalBoolean.

AppDisable()

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.

AppEnable()

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.

AppFind(name, activate)

Finds a visible top-level window.

Parameter
Type
Description

name

The name of the application without the extension.

activate

If 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.

ArrayAvg(array)

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

Parameter
Type
Description

array

The name of an array of numbers.

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

ArrayDimCount(array, dim)

Parameter
Type
Description

Returns: SalBoolean.

ArrayGetLowerBound(array, dim, bound)

Parameter
Type
Description

Returns: SalBoolean.

ArrayGetUpperBound(array, dim, bound)

Parameter
Type
Description

Returns: SalBoolean.

ArrayIsEmpty(array)

Determines if a dynamic array contains data.

Parameter
Type
Description

array

The name of the array to query.

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

ArrayMax(array)

Returns the maximum value in an array of numbers.

Parameter
Type
Description

array

The name of an array of numbers.

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

ArrayMin(array)

Returns the minimum value in an array of numbers.

Parameter
Type
Description

array

The name of an array of numbers.

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

ArrayQueryBounds(array, min, max)

Parameter
Type
Description

Returns: SalNumber.

ArraySetBounds(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().

Parameter
Type
Description

array

The name of the array to query.

lower

The new lower bound.

upper

The new upper bound or AC_Dynamic.

Returns: SalBoolean. bOk

ArraySetUpperBound(array, dim, bound)

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

Parameter
Type
Description

array

The name of the array.

dim

Number of the dimension. The first dimension is one, the second is two, and so on.

bound

Upper 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.

ArraySum(array)

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

Parameter
Type
Description

array

The name of an array of numbers.

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

BringWindowToTop(ctrl)

Brings a window to the top of all overlapping windows.

Parameter
Type
Description

ctrl

Target control on which to execute the call.

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

CenterWindow(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.

Parameter
Type
Description

ctrl

Target control on which to execute the call.

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

ClearField(ctrl)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

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

ColorFromRGB(red, green, blue)

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

Parameter
Type
Description

red

A number from 0 to 255.

green

A number from 0 to 255.

blue

A number from 0 to 255.

Returns: SalNumber. the color created.

ColorGet(ctrl, colorIndex)

Gets a window's color.

Parameter
Type
Description

ctrl

Target control on which to execute the call.

colorIndex

The 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.

ColorGetSysColor(colorIndex)

Gets a system color.

Parameter
Type
Description

colorIndex

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

Returns: SalNumber. the color

ColorSet(ctrl, colorIndex, colorValue)

Sets a window's color.

Parameter
Type
Description

ctrl

Target control on which to execute the call.

colorIndex

The color of a part of the window, represented by one of these constants: COLOR_IndexCellTextCOLOR_IndexTransparentCOLOR_IndexWindowCOLOR_SysWindowText

colorValue

A 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.

ColorToRGB(colorValue, red, green, blue)

Parameter
Type
Description

Returns: SalBoolean.

ColorToRGB(color, red, green, blue)

Parameter
Type
Description

Returns: SalBoolean.

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

Parameter
Type
Description

expression

errorPos

numReturn

sReturn

dtReturn

windowReturn

inhibitErrors

context

Returns: SalNumber.

ContextBreak()

Deprecated: Use this. Not supported.

Returns: SalString.

ContextCurrent(context)

Returns an instance of SalStringContext wrapping the current context reference.

Parameter
Type
Description

context

Returns: SalStringContext.

ContextMenuSetPopup(ctrl, menuName, flags)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

menuName

A named menu defined in one of the Named Menus section in ctrl, ctrl's MDI window parent, or Global Declarations.

flags

Set 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.

ContextMenuSetPopup(ctrl, menuType, flags)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

menuType

the Type of the menu

flags

Set 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.

CreateWindow(wndToCreate, parent, parameters)

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

Parameter
Type
Description

wndToCreate

The name of the window to create.

parent

The 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.

parameters

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.

CreateWindow(formName, parent, parameters)

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

Parameter
Type
Description

formName

The name of the window to create.

parent

The 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.

parameters

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.

CreateWindow(formName, parent)

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

Parameter
Type
Description

formName

The name of the window to create.

parent

The 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.

CreateWindowEx(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.

Parameter
Type
Description

wndToCreate

The name of the window to create.

parent

The 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.

left

Position of the x-coordinate of the upper-left corner of the window in form units.

top

Position of the y-coordinate of the upper-left corner of the window in form units.

width

Width of the window in form units.

height

Height of the window in form units.

flags

You 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.

parameters

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.

CreateWindowEx(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.

Parameter
Type
Description

formName

The name of the window to create.

parent

The 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.

left

Position of the x-coordinate of the upper-left corner of the window in form units.

top

Position of the y-coordinate of the upper-left corner of the window in form units.

width

Width of the window in form units.

height

Height of the window in form units.

flags

You 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.

CreateWindowExFromStr(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.

Parameter
Type
Description

formName

The name of the window to create.

parent

The 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.

left

Position of the x-coordinate of the upper-left corner of the window in form units.

top

Position of the y-coordinate of the upper-left corner of the window in form units.

width

Width of the window in form units.

height

Height of the window in form units.

flags

You 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.

CreateWindowFromStr(formName, parent)

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

Parameter
Type
Description

formName

The name of the window to create.

parent

The 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.

CursorClear(ctrl, type)

Clears a window's cursor.

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: SalBoolean.

CursorSet(ctrl, resource, type)

Sets a window's cursor.

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: SalBoolean.

CursorSet(ctrl, resourceId, type)

Sets a window's cursor.

Parameter
Type
Description

ctrl

Target control on which to execute the call.

resourceId

Returns: SalBoolean.

CursorSetFile(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.

Parameter
Type
Description

ctrl

Target control on which to execute the call.

fileName

Returns: SalBoolean.

CursorSetString(ctrl, blob, type)

Sets a window's cursor from a string variable.

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: SalBoolean.

DateConstruct(year, month, day, hour, minute, second)

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

Parameter
Type
Description

Returns: SalDateTime.

DateCurrent()

Returns the PC's current date/time.

Returns: SalDateTime.

DateDay(dateTime)

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

Parameter
Type
Description

dateTime

Returns: SalNumber.

DateHour(dateTime)

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

Parameter
Type
Description

dateTime

Returns: SalNumber.

DateMinute(dateTime)

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

Parameter
Type
Description

dateTime

Returns: SalNumber.

DateMonth(dateTime)

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

Parameter
Type
Description

dateTime

Returns: SalNumber.

DateMonthBegin(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.

Parameter
Type
Description

dateTime

Returns: SalDateTime.

DateQuarter(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.

Parameter
Type
Description

dateTime

Returns: SalNumber.

DateQuarterBegin(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.

Parameter
Type
Description

dateTime

Returns: SalDateTime.

DateSecond(dateTime)

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

Parameter
Type
Description

dateTime

Returns: SalNumber.

DateToStr(date, target)

Parameter
Type
Description

Returns: SalNumber.

DateWeekBegin(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.

Parameter
Type
Description

dateTime

Returns: SalDateTime.

DateWeekday(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.

Parameter
Type
Description

dateTime

Returns: SalNumber.

DateYear(dateTime)

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

Parameter
Type
Description

dateTime

Returns: SalNumber.

DateYearBegin(dateTime)

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

Parameter
Type
Description

dateTime

Returns: SalDateTime.

DestroyWindow(ctrl)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

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

DisableWindow(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.

Parameter
Type
Description

ctrl

Target control on which to execute the call.

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

DisableWindowAndLabel(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.

Parameter
Type
Description

ctrl

Target control on which to execute the call.

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

DlgChooseColor(ctrl, colorValue)

Parameter
Type
Description

colorValue

Returns: SalBoolean.

DlgChooseFont(ctrl, name, size, enhancements, color)

Parameter
Type
Description

Returns: SalBoolean.

DlgGetDockStatus(windowDlg, orientation)

Parameter
Type
Description

orientation

Returns: SalBoolean.

DlgOpenFile(ctrl, dialogTitle, filters, filtersCount, filterIndex, fileName, filePath)

Parameter
Type
Description

dialogTitle

filtersCount

filterIndex

fileName

filePath

Returns: SalBoolean.

DlgOpenFileMulti(ctrl, dialogTitle, filters, filtersCount, filterIndex, fileNames, filePaths, fileCount)

Parameter
Type
Description

dialogTitle

filtersCount

filterIndex

fileNames

filePaths

fileCount

Returns: SalBoolean.

DlgSaveFile(ctrl, dialogTitle, filters, filtersCount, filterIndex, fileName, filePath)

Parameter
Type
Description

dialogTitle

filtersCount

filterIndex

fileName

filePath

Returns: SalBoolean.

DlgSetDockStatus(windowDlg, orientation)

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

Parameter
Type
Description

windowDlg

The name of a dialog box.

orientation

A 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.

DragDropDisableDrop()

Disables dropping while in drag mode.

Returns: SalBoolean.

DragDropEnableDrop()

Enables dropping while in drag mode.

Returns: SalBoolean.

DragDropGetSource(window, x, y)

Parameter
Type
Description

Returns: SalBoolean.

DragDropGetTarget(windowTarget, x, y)

Parameter
Type
Description

Returns: SalBoolean.

DragDropStart(ctrl)

Initiates drag mode.

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: SalBoolean.

DragDropStop()

Ends drag mode.

Returns: SalBoolean.

DrawMenuBar(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.

Parameter
Type
Description

ctrl

Target 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.

DropFilesAcceptFiles(ctrl, accept)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

accept

Specify 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.

DropFilesQueryFiles(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.

Parameter
Type
Description

ctrl

Target control on which to execute the call.

arrayFiles

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.

DropFilesQueryPoint(ctrl, x, y)

Parameter
Type
Description

Returns: SalBoolean.

EditCanCopy()

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

Returns: SalBoolean. bOk

EditCanCopyTo()

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

Returns: SalBoolean.

EditCanCut()

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.

EditCanPaste()

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.

EditCanPasteFrom()

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

Returns: SalBoolean.

EditCanUndo()

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.

EditClear()

Deletes selected data from the currently selected control

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

EditCopy()

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.

EditCopyString(str)

Copies a string to the Clipboard as text.

Parameter
Type
Description

str

The string to copy to the Clipboard.

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

EditCopyTo()

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

Returns: SalBoolean.

EditCut()

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.

EditPaste()

Pastes data from the Clipboard into the currently selected control

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

EditPasteFrom()

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

Returns: SalBoolean.

EditPasteString(str)

Parameter
Type
Description

Returns: SalBoolean.

EditUndo()

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.

EnableWindow(ctrl)

Enables keyboard and mouse input to a window.

Parameter
Type
Description

ctrl

Target control on which to execute the call.

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

EnableWindowAndLabel(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.

Parameter
Type
Description

ctrl

Target control on which to execute the call.

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

EndDialog(ctrl, returnValue)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

returnValue

The return value from the ModalDialog function.

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

EndTrace()

Stops tracing.

Returns: SalBoolean.

FileClose(file)

Parameter
Type
Description

Returns: SalBoolean.

FileCopy(sourcePath, destPath, overwrite)

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

Parameter
Type
Description

sourcePath

The full path name of the source file.

destPath

The full path name of the destination file.

overwrite

Specifies 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.

FileCreateDirectory(directory)

Creates a directory.

Parameter
Type
Description

directory

The 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.

FileGetChar(file, charValue)

Parameter
Type
Description

Returns: SalBoolean.

FileGetChar(file)

Returns the next character in an open file.

Parameter
Type
Description

file

The handle of the open file.

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

FileGetCurrentDirectory(path)

Parameter
Type
Description

Returns: SalBoolean.

FileGetDateTime(fileName, dateTime)

Parameter
Type
Description

fileName

dateTime

Returns: SalBoolean.

FileGetDrive()

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(:).

FileGetStr(file, buffer, bufferSize)

Parameter
Type
Description

Returns: SalBoolean.

FileOpen(file, fileName, style)

Parameter
Type
Description

Returns: SalBoolean.

FileOpen(file, fileName, style, encoding)

Parameter
Type
Description

Returns: SalBoolean.

FileOpenExt(file, fileName, style, reopen)

Deprecated: Use Sal.FileOpen().

Parameter
Type
Description

Returns: SalBoolean.

FilePutChar(file, charValue)

Writes a character to an open file.

Parameter
Type
Description

file

The handle of the open file.

charValue

ANSI numeric value of the character to write to file.

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

FilePutStr(file, str)

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

Parameter
Type
Description

file

The handle of the open file.

str

The string to write.

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

FileRead(file, buffer, bufferLength)

Parameter
Type
Description

bufferLength

Returns: SalNumber.

FileRead(file, buffer, bufferLength)

Parameter
Type
Description

bufferLength

Returns: SalNumber.

FileRemoveDirectory(directory)

Deletes a directory.

Parameter
Type
Description

directory

The 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.

FileSeek(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.

Parameter
Type
Description

file

The handle of an open file.

bytes

The specific position of the file pointer; the number of bytes from position where the next file operation will take place.

position

The 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.

FileSetCurrentDirectory(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.

Parameter
Type
Description

path

The path name of the new current working directory.

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

FileSetDateTime(fileName, dateTime)

Sets the modification date and time of the specified file.

Parameter
Type
Description

fileName

The name of the file whose modification date you want to set.

dateTime

The modification date and time.

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

FileSetDrive(sDriveLetter)

Sets the current disk drive to the specified drive letter.

Parameter
Type
Description

sDriveLetter

The 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.

FileTell(file)

Returns the current position in an open file.

Parameter
Type
Description

file

The handle of an open file.

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

FileWrite(file, buffer, bufferLength)

Writes a string to an open file.

Parameter
Type
Description

file

The handle of an open file.

buffer

The string to write to file.

bufferLength

The number of bytes to write.

Returns: SalNumber. the number of bytes written.

FileWrite(file, buffer, bufferLength)

Writes a binary buffer to an open file.

Parameter
Type
Description

file

The handle of an open file. fileFile Handle. The handle of an open file.

buffer

The string to write to file.

bufferLength

The number of bytes to write.

Returns: SalNumber. the number of bytes written.

FindWindow(ctrl, windowName)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

windowName

A 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.

FireWindowActions(ctrl, message, wParam, lParam)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

message

wParam

lParam

Returns: SalNumber.

FireWindowActionsToChildren(ctrl, message, wParam, lParam)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

message

wParam

lParam

Returns: SalBoolean.

FmtCopyProfile(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.

Parameter
Type
Description

ctrl

Target control on which to execute the call.

nProfile

Returns: SalBoolean.

FmtFieldToStr(ctrl, text, format)

Parameter
Type
Description

Returns: SalBoolean.

FmtFormatDateTime(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

Parameter
Type
Description

dateTime

The date/time value to format.

sPicture

The date/time picture format.

Returns: SalString. the formatted date/time string.

FmtFormatNumber(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

Parameter
Type
Description

num

The number value to format.

sPicture

The number picture format.

Returns: SalString. a formatted number string.

FmtGetFormat(ctrl)

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

Parameter
Type
Description

ctrl

Target 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.

FmtGetInputMask(ctrl, mask)

Parameter
Type
Description

Returns: SalBoolean.

FmtGetParmNum(ctrl, nParm, nValue)

Parameter
Type
Description

Returns: SalBoolean.

FmtGetParmStr(ctrl, nParm, value)

Parameter
Type
Description

Returns: SalBoolean.

FmtGetPicture(ctrl, format)

Parameter
Type
Description

Returns: SalBoolean.

FmtGetProfile(ctrl)

Returns the culture profile for the specified field.

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: SalNumber.

FmtIsValidField(ctrl)

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

Parameter
Type
Description

ctrl

Target 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.

FmtIsValidInputMask(mask)

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

Parameter
Type
Description

mask

An input mask.

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

FmtIsValidPicture(format, type)

Validates a numeric or date/time picture format.

Parameter
Type
Description

format

The picture string.

type

Specify 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

FmtKeepMask(keep)

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

Parameter
Type
Description

keep

If 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.

FmtSetFormat(ctrl, format)

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

Parameter
Type
Description

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.

FmtSetInputMask(ctrl, mask)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

mask

The 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.

FmtSetParmNum(ctrl, nParm, nValue)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

nValue

Returns: SalBoolean.

FmtSetParmStr(ctrl, nParm, value)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: SalBoolean.

FmtSetPicture(ctrl, picture)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

picture

The 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.

FmtSetProfile(ctrl, nProfile)

Changes the culture profile for the specified field.

Parameter
Type
Description

ctrl

Target control on which to execute the call.

nProfile

Returns: SalBoolean.

FmtStrToField(ctrl, value, format)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

value

The string to copy.

format

Specify 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.

FmtUnmaskInput(ctrl, text)

Parameter
Type
Description

Returns: SalBoolean.

FmtValidateField(ctrl, validate)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

validate

A 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.

FontGet(ctrl, name, size, enhancement)

Parameter
Type
Description

Returns: SalBoolean.

FontGetNames(type, fonts)

Gets the names of the fonts.

Parameter
Type
Description

type

Not used.

fonts

Receives the name of an array of strings that contains the font names returned.

Returns: SalNumber. the number of font names returned.

FontGetSizes(get, fontName, fontSizes)

Deprecated: Use FontFamilies instead.

Parameter
Type
Description

fontName

fontSizes

Returns: SalNumber.

FontSet(ctrl, name, size, enhancement)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

name

The name of the font.

size

The size of the font (in points).

enhancement

The 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

FormGetParmNum(ctrl, paramType, value)

Parameter
Type
Description

paramType

Returns: SalBoolean.

FormUnitsToPixels(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.

Parameter
Type
Description

ctrl

Target control on which to execute the call.

formUnits

The number of form units.

vertical

If 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.

GetBufferLength(buffer)

Returns the current buffer length of a binary variable.

Parameter
Type
Description

buffer

The string you want to get the storage buffer length for.

Returns: SalNumber. The number of bytes used.

GetBufferLength(str)

Returns the current buffer length of a string.

Parameter
Type
Description

str

The string you want to get the storage buffer length for.

Returns: SalNumber. The number of bytes used.

GetDataType(ctrl)

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

Parameter
Type
Description

ctrl

Target 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.

GetDefButton(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.

Parameter
Type
Description

ctrl

Target 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.

GetFirstChild(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.

Parameter
Type
Description

ctrl

Target control on which to execute the call.

typeMask

One 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.

GetFocus()

Returns the handle of the window with the focus.

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

GetItemName(ctrl, name)

Parameter
Type
Description

Returns: SalBoolean.

GetMaxDataLength(ctrl)

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

Parameter
Type
Description

ctrl

Target 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.

GetNextChild(ctrl, typeMask)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

typeMask

One 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.

GetProfileInt(section, entry, defaultValue, fileName)

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

Parameter
Type
Description

section

The section heading.

entry

The entry whose associated value is being retrieved

defaultValue

Specify the default value to return if the function cannot find the entry.

fileName

The 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.

GetProfileString(section, entry, defaultValue, value, fileName)

Parameter
Type
Description

section

defaultValue

fileName

Returns: SalNumber.

GetReportObject(handle)

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

Parameter
Type
Description

handle

Returns: ISalReport.

GetVersion()

Returns the version of the library.

Returns: SalNumber. The version number.

GetWindowLabel(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.

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: SalWindowHandle.

GetWindowLabelText(ctrl, text, maxLength)

Parameter
Type
Description

Returns: SalNumber.

GetWindowLoc(ctrl, x, y)

Parameter
Type
Description

Returns: SalBoolean.

GetWindowSize(ctrl, width, height)

Parameter
Type
Description

Returns: SalBoolean.

GetWindowState(ctrl)

Returns a window's current state.

Parameter
Type
Description

ctrl

Target 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).

GetWindowText(ctrl, text, maxLen)

Parameter
Type
Description

Returns: SalNumber.

HideWindow(ctrl)

Hides a window.

Parameter
Type
Description

ctrl

Target 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.

HideWindowAndLabel(ctrl)

Hides a window and its associated label.

Parameter
Type
Description

ctrl

Target 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.

HStringToNumber(str)

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

Parameter
Type
Description

str

The 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.

IdleKick()

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.

IdleRegisterWindow(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.

Parameter
Type
Description

ctrl

Target control on which to execute the call.

message

Message to send to the window. Usually this is a SAM_User message.

wParam

Standard message parameter that you can set.

lParam

Standard message parameter that you can set.

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

IdleUnregisterWindow(ctrl)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

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

InvalidateWindow(ctrl)

Causes a window to be repainted.

Parameter
Type
Description

ctrl

Target control on which to execute the call.

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

IsButtonChecked(ctrl)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

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

IsNull(ctrl)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

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

IsValidDateTime(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.

Parameter
Type
Description

ctrl

Target control on which to execute the call.

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

IsValidDecimal(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.

Parameter
Type
Description

ctrl

Target control on which to execute the call.

precision

The number of digits to display.

scale

The 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.

IsValidInteger(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.

Parameter
Type
Description

ctrl

Target 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.

IsValidNumber(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.

Parameter
Type
Description

ctrl

Target control on which to execute the call.

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

IsWindowEnabled(ctrl)

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

Parameter
Type
Description

ctrl

Target 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.

IsWindowVisible(ctrl)

Determines whether a window is currently visible.

Parameter
Type
Description

ctrl

Target control on which to execute the call.

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

ListAdd(ctrl, text)

Adds a string to a list box or combo box.

Parameter
Type
Description

ctrl

Target control on which to execute the call.

text

Text 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.

ListClear(ctrl)

Deletes all entries from a list box or combo box.

Parameter
Type
Description

ctrl

Target control on which to execute the call.

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

ListDelete(ctrl, index)

Deletes a list box or combo box entry.

Parameter
Type
Description

ctrl

Target control on which to execute the call.

index

Index 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.

ListFiles(ctrl, ctrlPath, pathName, attributes)

Parameter
Type
Description

ctrlPath

pathName

attributes

Returns: SalBoolean.

ListGetMultiSelect(ctrl, selectedArray)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

selectedArray

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.

ListInsert(ctrl, index, text)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

index

Position in the list where to add the text .

text

Text 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.

ListPopulate(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.

Parameter
Type
Description

ctrl

Target control on which to execute the call.

sql

A SalSqlHandle to execute the sql command.

select

SQL 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.

ListPopulate(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.

Parameter
Type
Description

ctrl

Target control on which to execute the call.

sql

A SalSqlHandle to execute the sql command.

select

SQL command to execute.

errorHandler

SQL 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.

ListQueryCount(ctrl)

Returns the number of list box or combo box entries.

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: SalNumber. Number of items in the list.

ListQueryFile(ctrl, fileName)

Parameter
Type
Description

fileName

Returns: SalBoolean.

ListQueryMultiCount(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.

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: SalNumber. Number of selected items.

ListQuerySelection(ctrl)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

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

ListQueryState(ctrl, index)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

index

Index of the item to query.

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

ListQueryText(ctrl, index, text)

Parameter
Type
Description

Returns: SalNumber.

ListQueryTextLength(ctrl, index)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

index

Index of the item to retrieve the text length for.

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

ListQueryTextX(ctrl, index)

Returns the text of the specified item.

Parameter
Type
Description

ctrl

Target control on which to execute the call.

index

Index of the item to retrieve the text for.

Returns: SalString. Text of the specified item.

ListRedraw(ctrl, redraw)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

redraw

True to redraw the control.

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

ListSelectString(ctrl, startIndex, text)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

startIndex

Position where to start the search for text .

text

Text to search for in the list.

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

ListSetMultiSelect(ctrl, index, select)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

index

Index of the item to select or deselect. Use -1 for all the items in the list.

select

True to select, or false to deselect the item.

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

ListSetSelect(ctrl, index)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

index

Index 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.

ListSetTabs(ctrl, tabStops)

Sets tabs in a list box.

Parameter
Type
Description

ctrl

Target control on which to execute the call.

tabStops

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.

LoadApp(name, parameters)

Starts an application.

Parameter
Type
Description

name

The name of the application to start.

parameters

Optional 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.

LoadAppAndProcessMsgs(name, mode, retCode)

Parameter
Type
Description

Returns: SalBoolean.

LoadAppAndWait(name, mode, retCode)

Parameter
Type
Description

Returns: SalBoolean.

Log(fileName, message)

Appends the string to the file.

Parameter
Type
Description

fileName

message

Returns: SalBoolean.

LogLine(fileName, message)

Appends the string and a new line to the file.

Parameter
Type
Description

fileName

message

Returns: SalBoolean.

LogResource(fileName)

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

Parameter
Type
Description

fileName

Returns: SalBoolean.

MapEnterToTab(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.

Parameter
Type
Description

state

If 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.

MDIArrangeIcons(ctrl)

Arranges minimized child window icons in an MDI window.

Parameter
Type
Description

ctrl

Target control on which to execute the call.

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

MDICascade(ctrl)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

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

MDITile(ctrl, position)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

position

How 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.

MessageBeep(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.

Parameter
Type
Description

alertLevel

The 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

MessageBox(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.

Parameter
Type
Description

text

The message text.

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

MessageBox(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.

Parameter
Type
Description

text

The message text.

title

The message box title.

flags

The 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

MessageBox(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.

Parameter
Type
Description

owner

The owner of the message box.

text

The message text.

title

The message box title.

flags

The message box style. Combine the MB_* options using the OR (|) operator.

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

ModalDialog(dialogType, owner, parameters)

Creates a modal dialog box.

Parameter
Type
Description

dialogType

The type of the modal dialog box to create.

owner

the owner window. Use hWndNULL for a dialog box that does not have an owner.

parameters

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.

ModalDialog(dialogName, owner, parameters)

Creates a modal dialog box.

Parameter
Type
Description

dialogName

The name of the modal dialog box to create.

owner

the owner window. Use hWndNULL for a dialog box that does not have an owner.

parameters

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.

ModalDialog(dialogName, owner)

Creates a modal dialog box.

Parameter
Type
Description

dialogName

The name of the modal dialog box to create.

owner

the 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.

ModalDialogFromStr(dialogName, owner)

Creates a modal dialog box.

Parameter
Type
Description

dialogName

The name of the modal dialog box to create.

owner

the 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.

MoveWindow(ctrl, xOffset, yOffset)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

xOffset

The number of form units to move the window on the X axis.

yOffset

The 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.

MTSCreateInstance(obj)

Parameter
Type
Description

Returns: SalBoolean.

MTSDisableCommit()

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.

MTSEnableCommit()

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.

MTSGetObjectContext(obj, context)

Deprecated: Not supported.

Parameter
Type
Description

Returns: SalBoolean.

MTSIsCallerInRole(role, inRole)

Parameter
Type
Description

Returns: SalBoolean.

MTSIsInTransaction(isInTransaction)

Parameter
Type
Description

isInTransaction

Returns: SalBoolean.

MTSIsSecurityEnabled(isSecurityEnabled)

Parameter
Type
Description

isSecurityEnabled

Returns: SalBoolean.

MTSSetAbort()

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.

MTSSetComplete()

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.

Parameter
Type
Description

control

The NavBar control.

paneIndex

Zero-based index of the pane to which you want to add a group.

groupIndex

Zero-based index that the new group will occupy.

groupTitle

The title of the new group.

height

The 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.

Parameter
Type
Description

control

The NavBar control.

paneIndex

Indicates 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.

name

Name of the new pane (object title)

expandedImage

File name of the image to display for the new pane when it is expanded.

collapsedImage

File 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.

Parameter
Type
Description

control

The NavBar control.

paneIndex

Zero-based index of the pane.

groupIndex

Zero-based index of the group. If the pane has no groups, use zero.

child

the 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.

Parameter
Type
Description

control

The NavBar control.

paneIndex

Zero-based index of the pane

child

The 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.

Parameter
Type
Description

control

The NavBar control.

paneIndex

Index for the pane to enable (start at 0).

enable

Set 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.

Parameter
Type
Description

control

The NavBar control.

paneIndex

Zero-based index of the pane

groupIndex

Zero-based index of the group

expand

Set 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.

Parameter
Type
Description

control

The NavBar control.

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

Parameter
Type
Description

control

paneIndex

format

expanded

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.

Parameter
Type
Description

control

The NavBar control.

name

The name of the pane (object title)

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

Parameter
Type
Description

control

paneIndex

Returns: SalBoolean.

Returns the title of a pane.

Parameter
Type
Description

control

The NavBar control.

paneIndex

Index 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.

Parameter
Type
Description

control

The NavBar control.

paneIndex

Zero-based index of the pane

groupIndex

Zero-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.

Parameter
Type
Description

control

The NavBar control.

xml

The 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).

Parameter
Type
Description

control

The NavBar control.

paneIndex

Index 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.

Parameter
Type
Description

control

The NavBar control.

paneIndex

Zero-based index of the pane to be removed.

groupIndex

Zero-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.

Parameter
Type
Description

control

The NavBar control.

paneIndex

Zero-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).

Parameter
Type
Description

Returns: SalBoolean.

Activates the indicated pane.

Parameter
Type
Description

control

The NavBar control.

paneIndex

The 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.

Parameter
Type
Description

control

The NavBar control.

paneIndex

Index for the pane.

binary

Buffer that stores the image (bmp or icon).

format

Indicates the image format. Use PIC_FormatIcon or PIC_FormatBitmap.

expanded

TRUE 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.

Parameter
Type
Description

control

The NavBar control.

paneIndex

Index for the pane whose title you want to get (start at 0).

title

The 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).

NumberAbs(num)

Computes a number's absolute value.

Parameter
Type
Description

num

The number whose absolute value you want.

Returns: SalNumber. the absolute value of num

NumberArcCos(num)

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

Parameter
Type
Description

num

The 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.

NumberArcSin(num)

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

Parameter
Type
Description

num

The 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.

NumberArcTan(num)

Computes a value's arc tangent.

Parameter
Type
Description

num

The number whose arc tangent you want.

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

NumberArcTan2(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.

Parameter
Type
Description

numY

One of two values whose arc tangent you want.

numX

The 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.

NumberCos(angle)

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

Parameter
Type
Description

angle

The 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).

NumberCosH(angle)

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

Parameter
Type
Description

angle

The 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).

NumberExponent(num)

Computes a value's exponential function.

Parameter
Type
Description

num

The 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.

NumberHigh(num)

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

Parameter
Type
Description

num

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

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

NumberHypot(x, y)

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

Parameter
Type
Description

x

The length of one side of a right triangle.

y

The 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).

NumberLog(num)

Computes a number's natural logarithm.

Parameter
Type
Description

num

The number whose natural logarithm you want.

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

NumberLogBase10(num)

Computes a number's base -10 logarithm.

Parameter
Type
Description

num

The number whose base 10 logarithm you want.

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

NumberLow(num)

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

Parameter
Type
Description

num

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

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

NumberMax(num1, num2)

Returns the greater of two numbers.

Parameter
Type
Description

num1

The first of two values.

num2

The second of two values.

Returns: SalNumber. the greater of num1 and num2 .

NumberMin(num1, num2)

Returns the lesser of two numbers.

Parameter
Type
Description

num1

The first value.

num2

The second value.

Returns: SalNumber. the lesser of num1 and num2 .

NumberMod(num, mod)

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

Parameter
Type
Description

num

The number to divide.

mod

The number by which to divide num

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

NumberPi(num)

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

Parameter
Type
Description

num

The number to multiply by Pi.

Returns: SalNumber. num multiplied by Pi.

NumberPower(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.

Parameter
Type
Description

num

The number to raise to the power of exponent

exponent

The 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).

NumberRandInit(seed)

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

Parameter
Type
Description

seed

The 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).

NumberRandom()

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

NumberRound(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.

Parameter
Type
Description

num

The number to round.

Returns: SalNumber. num after rounding.

NumberSin(angle)

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

Parameter
Type
Description

angle

The 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).

NumberSinH(angle)

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

Parameter
Type
Description

angle

The 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).

NumberSqrt(num)

Computes a number's square root.

Parameter
Type
Description

num

The 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.

NumberTan(angle)

Computes an angle's tangent.

Parameter
Type
Description

angle

The 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).

NumberTanH(angle)

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

Parameter
Type
Description

angle

The 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).

NumberToChar(num)

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

Parameter
Type
Description

num

The number to convert.

Returns: SalString. the character converted from num

NumberToHString(handle)

Converts a string handle to the corresponding string instance.

Parameter
Type
Description

handle

The numeric value of the string handle to convert.

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

NumberToStr(num, decimalPlaces, str)

Parameter
Type
Description

decimalPlaces

Returns: SalNumber.

NumberToStrX(num, decimalPlaces)

Converts a number to a string.

Parameter
Type
Description

num

The number to convert.

decimalPlaces

The number of decimal places you want in the string.

Returns: SalString. the string converted from num

NumberToWindowHandle(num)

Converts a number to a window handle.

Parameter
Type
Description

num

The number to convert.

Returns: SalWindowHandle. the window handle converted from num

NumberTruncate(num, precision, scale)

Truncates a number.

Parameter
Type
Description

num

The number to truncate, starting with the leftmost.

precision

The number of digits to display, starting with the leftmost.

scale

The 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

ObjCreateFromString(className)

Creates an instance of the class.

Parameter
Type
Description

className

Class name

Returns: SalFunctionalClass. Reference to the object created.

ObjGetType(userObject)

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

Parameter
Type
Description

userObject

The object whose class name is to be determined.

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

ObjIsDerived(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.

Parameter
Type
Description

userObject

Reference to the object in question.

className

The 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.

ObjIsNull(userObject)

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

Parameter
Type
Description

userObject

A variable of a functional, coclass, or interface class.

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

ObjIsValidClasname(className)

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

Parameter
Type
Description

className

The name of the class

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

ParentWindow(ctrl)

Returns the handle of an object's parent window.

Parameter
Type
Description

ctrl

Target 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

Pause(milliseconds)

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

Parameter
Type
Description

milliseconds

The number of milliseconds to pause.

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

PicClear(ctrl)

Deletes the contents of a picture.

Parameter
Type
Description

ctrl

Target control (picture) on which to execute the call.

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

PicGetDescription(ctrl, description, maxLen)

Parameter
Type
Description

description

maxLen

Returns: SalNumber.

PicGetImage(ctrl, buffer, type)

Parameter
Type
Description

Returns: SalNumber.

PicGetImage(ctrl, buffer, type)

Parameter
Type
Description

Returns: SalNumber.

PicGetString(ctrl, format, buffer)

Parameter
Type
Description

Returns: SalNumber.

PicGetString(ctrl, format, buffer)

Parameter
Type
Description

Returns: SalNumber.

PicSet(ctrl, resourceType, format)

Inserts a resource into a picture.

Parameter
Type
Description

ctrl

Target control on which to execute the call.

resourceType

An icon or bitmap in the Resources section of the outline.

format

The 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.

PicSetFile(ctrl, fileName)

Inserts a file's contents into a picture.

Parameter
Type
Description

ctrl

Target control (picture) on which to execute the call.

fileName

The 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)

PicSetFit(ctrl, fit, scaleWidth, scaleHeight)

Sets the fit for a picture.

Parameter
Type
Description

ctrl

Target control (picture) on which to execute the call.

scaleWidth

The width scaling percentage if fit is PIC_FitScale.

scaleHeight

The height scaling percentage if fit is PIC_FitScale.

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

PicSetHandle(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.

Parameter
Type
Description

ctrl

Target control on which to execute the call.

type

Set this to PIC_FormatIcon if nHandle is an HICON or to PIC_FormatBitmap if nHandle is an HBITMAP.

handle

An HBITMAP or HICON.

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

PicSetImage(ctrl, buffer, type)

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

Parameter
Type
Description

ctrl

Target control (picture) on which to execute the call.

buffer

String buffer which stores the image bytes.

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

PicSetString(ctrl, format, buffer)

Inserts the contents of a string into a picture.

Parameter
Type
Description

ctrl

Target control (picture) on which to execute the call.

format

buffer

Returns: SalBoolean.

PicSetString(ctrl, format, buffer)

Inserts the contents of a binary buffer into a picture.

Parameter
Type
Description

ctrl

Target control on which to execute the call.

format

The format of the picture contents: PIC_FormatBitmapPIC_FormatIconPIC_FormatObject

buffer

A 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.

PixelsToFormUnits(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.

Parameter
Type
Description

ctrl

Target control on which to execute the call.

numPixels

The number of pixels.

vertical

If 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.

PostMsg(ctrl, msg, wParam, lParam)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

msg

The message number.

wParam

The wParam for the message. A generic parameter used to hold numeric information useful for messages processing.

lParam

The 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.

PrtExtractRect(lParam, left, top, right, bottom)

Parameter
Type
Description

Returns: SalBoolean.

PrtGetDefault(device, driver, port)

Parameter
Type
Description

Returns: SalBoolean.

PrtGetParmNum(parm, value)

Parameter
Type
Description

Returns: SalBoolean.

PrtPreviewForm(ctrl)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: SalBoolean. bOk

PrtPrintForm(ctrl)

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

Parameter
Type
Description

ctrl

Target 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.

PrtSetDefault(device, driver, port)

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

Parameter
Type
Description

device

The default device.

driver

The default driver.

port

The 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.

PrtSetParmDefaults()

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

PrtSetParmNum(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

Parameter
Type
Description

parm

A constant that represents the parameter to set; one of the PRT_* constants.

value

The 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

PrtSetup(device, driver, port, activeOnly)

Parameter
Type
Description

Returns: SalBoolean.

QueryFieldEdit(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.

Parameter
Type
Description

ctrl

Target 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.

Quit()

Exits an application.

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

ReportClose(windowReport)

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

Parameter
Type
Description

windowReport

The name of a report window.

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

ReportCmd(windowReport, command)

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

Parameter
Type
Description

windowReport

The name of a report window.

command

The 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

ReportCreate(fileName, variableNames, inputs, defaultReport, error)

Parameter
Type
Description

fileName

variableNames

inputs

defaultReport

Returns: SalBoolean.

ReportCreate(fileName, variableNames, inputs, defaultReport, error, template)

Parameter
Type
Description

fileName

variableNames

inputs

defaultReport

template

Returns: SalBoolean.

ReportDlgOptions(windowReport, caption, line1, line2, docName)

Sets the options for the report printing dialog box.

Parameter
Type
Description

windowReport

The wParam of a SAM_Report* message that contains the window handle.

caption

The replacement text for the Print dialog box caption text.

line1

The replacement text for the first centered-text field.

line2

The replacement text for the second centered-text field.

docName

The 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.

ReportGetDateTimeVar(windowReport, variableName, value)

Parameter
Type
Description

windowReport

variableName

Returns: SalBoolean.

ReportGetNumberVar(windowReport, variableName, value)

Parameter
Type
Description

windowReport

variableName

Returns: SalBoolean.

ReportGetObjectVar(windowReport, variableName, value)

Parameter
Type
Description

windowReport

variableName

Returns: SalBoolean.

ReportGetPrinterSettings(windowReport, printerName, orientation, paperType, width, height)

Parameter
Type
Description

windowReport

printerName

orientation

paperType

Returns: SalBoolean.

ReportGetStringVar(windowReport, variableName, value)

Parameter
Type
Description

windowReport

variableName

Returns: SalBoolean.

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

Parameter
Type
Description

owner

template

variableNames

inputs

copies

options

firstPage

lastPage

Returns: SalWindowHandle.

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

Parameter
Type
Description

owner

template

destFile

variableNames

inputs

copies

options

firstPage

lastPage

rtfFormat

Returns: SalWindowHandle.

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

Parameter
Type
Description

owner

template

destFile

variableNames

inputs

options

firstPage

lastPage

Returns: SalWindowHandle.

ReportReset(windowReport)

Re-populates the report window.

Parameter
Type
Description

windowReport

The 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.

ReportSetDateTimeVar(windowReport, variableName, value)

Sets the value of a date/time report variable.

Parameter
Type
Description

windowReport

The name of a report window.

variableName

The name of the variable whose value you want to set.

value

The value of variableName .

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

ReportSetNumberVar(windowReport, variableName, value)

Sets the value of a numeric report variable.

Parameter
Type
Description

windowReport

The name of a report window.

variableName

The name of the variable whose value you want to set.

value

The value of variableName .

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

ReportSetObjectVar(windowReport, variableName, value)

Sets the value of an object report variable.

Parameter
Type
Description

windowReport

The window handle of the report window.

variableName

The name of the variable whose value you want to set.

value

The value of variableName .

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

ReportSetPrinterSettings(windowReport, printerName, orientation, paperType, width, height)

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

Parameter
Type
Description

windowReport

The handle of a report window.

printerName

Friendly name of the printer. Pass STRING_Null or an empty string if you do not want to switch the printer.

orientation

Paper 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.

paperType

Paper type. Use one of the RPT_Paper* constants or the PaperKind enum.

width

Paper width in milli-inches. This value is ignored for all paper types except for RPT_PaperCustom.

height

Paper 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

ReportSetStringVar(windowReport, variableName, value)

Sets the value of a string report variable.

Parameter
Type
Description

windowReport

The window handle of the report window.

variableName

The name of the variable whose value you want to set.

value

The value of variableName .

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

ReportTableCreate(fileName, table, error)

Parameter
Type
Description

fileName

table

Returns: SalBoolean.

ReportTableCreate(fileName, table, error, template)

Parameter
Type
Description

fileName

table

template

Returns: SalBoolean.

ReportTablePrint(table, template, paramArray, error)

Parameter
Type
Description

Returns: SalWindowHandle.

ReportTableView(table, parent, template, error)

Parameter
Type
Description

table

parent

template

Returns: SalWindowHandle.

ReportView(owner, parent, template, variableNames, inputs, flags)

Parameter
Type
Description

owner

parent

template

variableNames

inputs

Returns: SalWindowHandle.

ResolveType(asm, typeName)

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

Parameter
Type
Description

typeName

Returns: Type.

ScrollGetPos(ctrl, pos)

Parameter
Type
Description

Returns: SalBoolean.

ScrollGetRange(ctrl, min, max, line, page)

Parameter
Type
Description

Returns: SalBoolean.

ScrollSetPos(ctrl, pos)

Sets the scrollbar's value.

Parameter
Type
Description

ctrl

Target control (vertical or horizontal scroll bar) on which to execute the call.

pos

The 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.

ScrollSetRange(ctrl, min, max, line, page)

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

Parameter
Type
Description

ctrl

Target control (vertical or horizontal scroll bar) on which to execute the call.

min

The minimum position of the scroll bar.

max

The maximum position of the scroll bar.

line

The number of units to increment or decrement the scroll bar when the user clicks the scroll bar arrow.

page

The 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.

SendClassMessage(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.

Parameter
Type
Description

message

The message number.

wParam

The wParam for the message. A generic parameter used to hold numeric information useful for messages processing.

lParam

The 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.

SendClassMessageNamed(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.

Parameter
Type
Description

type

The ancestor's class name.

message

The message number.

wParam

The wParam for the message. A generic parameter used to hold numeric information useful for messages processing.

lParam

The 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.

SendMsg(ctrl, message, wParam, lParam)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

message

The message number.

wParam

The wParam for the message. A generic parameter used to hold numeric information useful for messages processing.

lParam

The 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).

SendMsgToChildren(ctrl, message, wParam, lParam)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

message

The message number.

wParam

The wParam for the message. A generic parameter used to hold numeric information useful for messages processing.

lParam

The 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.

SendValidateMsg()

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.

SetBufferLength(buffer, length)

Parameter
Type
Description

Returns: SalBoolean.

SetBufferLength(str, length)

Parameter
Type
Description

Returns: SalBoolean.

SetDefButton(ctrl)

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

Parameter
Type
Description

ctrl

Target 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.

SetErrorInfo(code, desc, helpfileName, helpContext)

Sets COM error information.

Parameter
Type
Description

code

A number identifying the error. This number should be less than -1000 and negative.

desc

A textual, human-readable description of the error intended for the end user.

helpfileName

The fully qualified drive, path, and file name of a help file with more information about the error.

helpContext

The 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.

SetFieldEdit(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.

Parameter
Type
Description

ctrl

The data field, multiline text field, table window column, or picture on which to execute the call.

set

true 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.

SetFocus(ctrl)

Sets the focus to a specified window.

Parameter
Type
Description

ctrl

Target 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.

SetMaxDataLength(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.

Parameter
Type
Description

ctrl

Target data field, multiline text field, or table window column on which to execute the call.

length

The character limit.

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

SetProfileString(section, entry, value, fileName)

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

Parameter
Type
Description

section

The section heading.

entry

The entry whose associated value is being set.

value

The value of entry.

fileName

The 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.

SetWindowLabelText(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.

Parameter
Type
Description

ctrl

Target control on which to execute the call.

text

The window text.

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

SetWindowLoc(ctrl, x, y)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

x

The position on the X axis (expressed in form units).

y

The 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.

SetWindowSize(ctrl, width, height)

Resizes a window.

Parameter
Type
Description

ctrl

Target control on which to execute the call.

width

The new width of the window (expressed in form units).

height

The 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.

SetWindowText(ctrl, text)

Sets the text of a window to a specified string.

Parameter
Type
Description

ctrl

Target control on which to execute the call.

text

The 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.

ShowWindow(ctrl)

Makes a window visible.

Parameter
Type
Description

ctrl

Target 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.

ShowWindowAndLabel(ctrl)

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

Parameter
Type
Description

ctrl

Target 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.

StartTrace(outputType, traceFile, clearExisting)

Begins tracing.

Parameter
Type
Description

outputType

traceFile

clearExisting

Returns: SalBoolean.

StaticFirst(form)

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

Parameter
Type
Description

Returns: SalNumber.

StaticGetLabel(ctrl)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

Returns: SalNumber.

StaticGetLoc(form, handle, x, y)

Parameter
Type
Description

Returns: SalBoolean.

StaticGetSize(form, handle, width, height)

Parameter
Type
Description

Returns: SalBoolean.

StaticHide(form, handle)

Hides a static

Parameter
Type
Description

Returns: SalBoolean.

StaticIsVisible(form, handle)

Determines whether a static is visible.

Parameter
Type
Description

Returns: SalBoolean.

StaticNext(form, handle)

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

Parameter
Type
Description

Returns: SalNumber.

StaticSetLoc(form, handle, x, y)

Sets the location coordinates of a static

Parameter
Type
Description

Returns: SalBoolean.

StaticSetSize(form, handle, width, height)

Sets the size of a static

Parameter
Type
Description

Returns: SalBoolean.

StaticShow(form, handle)

Shows a static

Parameter
Type
Description

Returns: SalBoolean.

StatusGetText(ctrl, text, maxLen)

Parameter
Type
Description

Returns: SalNumber.

StatusSetText(ctrl, text)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

text

The text to display in the status bar.

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

StatusSetVisible(ctrl, show)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

show

If true, the status bar displays; if false, the status bar hides.

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

StrCompress(str)

Parameter
Type
Description

Returns: SalBoolean.

StrFirstChar(str, charCode)

Parameter
Type
Description

Returns: SalBoolean.

StrGetBufferLength(str)

Returns the current buffer length of a string.

Parameter
Type
Description

str

The string whose buffer length you want.

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

StrIsValidCurrency(money, precision, scale)

Verifies that a string represents a valid currency value.

Parameter
Type
Description

precision

Returns: SalBoolean.

StrIsValidDateTime(str)

Verifies that string represents a valid date/time value.

Parameter
Type
Description

str

The string

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

StrIsValidDecimal(str, precision, scale)

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

Parameter
Type
Description

str

The string

precision

The number of digits to display.

scale

The 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.

StrIsValidIdentifierName(str)

Returns TRUE if the string is a valid identifier.

Parameter
Type
Description

Returns: SalBoolean.

StrIsValidNumber(str)

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

Parameter
Type
Description

str

The string

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

StrLeft(source, length, target)

Parameter
Type
Description

Returns: SalNumber.

StrLeftX(source, length)

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

Parameter
Type
Description

source

The string from which to extract characters.

length

The number of characters to extract from source

Returns: SalString. the substring.

StrLength(str)

Returns a string's length.

Parameter
Type
Description

str

The string whose length you want.

Returns: SalNumber. the length of str

StrLop(str)

Parameter
Type
Description

Returns: SalNumber.

StrLower(source, target)

Parameter
Type
Description

Returns: SalNumber.

StrLowerX(source)

Converts a string to lowercase.

Parameter
Type
Description

source

The string to convert.

Returns: SalString. the lowercase string.

StrMid(source, startPos, length, target)

Parameter
Type
Description

source

startPos

length

Returns: SalNumber.

StrMidX(source, startPos, length)

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

Parameter
Type
Description

source

The source string.

startPos

The starting position of the substring (zero is the first position) in source .

length

The number of characters to put in the substring.

Returns: SalString. the substring.

StrProper(source, target)

Parameter
Type
Description

Returns: SalNumber.

StrProperX(source)

Converts a string to a proper name.

Parameter
Type
Description

source

The string to convert.

Returns: SalString. the converted string.

StrRepeat(source, times, target)

Parameter
Type
Description

Returns: SalNumber.

StrRepeatX(source, times)

Concatenates a string with itself a specified number of times.

Parameter
Type
Description

source

The source string.

times

The number of times to concatenate source with itself.

Returns: SalString. The new string.

StrReplace(source, startPos, length, replace, target)

Parameter
Type
Description

source

startPos

length

replace

Returns: SalNumber.

StrReplaceX(source, startPos, length, replace)

Parameter
Type
Description

source

startPos

length

replace

Returns: SalString.

StrRight(source, length, target)

Parameter
Type
Description

Returns: SalNumber.

StrRightX(source, length)

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

Parameter
Type
Description

source

The source string.

length

The number of characters to extract.

Returns: SalString. The new string.

StrScan(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.

Parameter
Type
Description

str1

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

str2

The 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.

StrSetBufferLength(str, length)

Parameter
Type
Description

Returns: SalBoolean.

StrToDate(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.

Parameter
Type
Description

str

The string to convert.

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

StrTokenize(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.

Parameter
Type
Description

source

The string to parse.

startDel

A string that contains the start delimiter character. Pass an empty string ('') to specify the lack of a start delimiter.

endDel

A string that contains the end delimiter character. Pass an empty string ('') to specify the lack of an end delimiter.

target

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.

StrToNumber(str)

Converts a string to a number.

Parameter
Type
Description

str

The string to convert.

Returns: SalNumber. the number resulting from the conversion.

StrTrim(source, target)

Parameter
Type
Description

Returns: SalNumber.

StrTrimX(source)

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

Parameter
Type
Description

source

The original string.

Returns: SalString. the new string.

StrUncompress(str)

Parameter
Type
Description

Returns: SalBoolean.

StrUpper(source, target)

Parameter
Type
Description

Returns: SalNumber.

StrUpperX(source)

Converts a string to uppercase.

Parameter
Type
Description

source

The string to convert.

Returns: SalString. the uppercase string.

TabAddPage(control, pageIndex, pageName)

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

Parameter
Type
Description

control

The name of the tab-bar control.

pageIndex

Specifies the index insertion position within a tabset. For the first tab page, pageIndex = 0.

pageName

Specifies the name of the tab page to be added.

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

TabAddPageEx(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.

Parameter
Type
Description

control

The name of the tab-bar control.

pageIndex

Indicates a zero-based page index. The new page will be inserted after the page indicated by pageIndex.

pageName

Name of the new page (object title).

imageFile

File name of the image to display for the new page.

tooltip

Tooltip for the new page.

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

TabAssociateChild(control, pageIndex, child)

Associates a child to a tab page.

Parameter
Type
Description

control

The name of the tab-bar control.

pageIndex

Specifies the index of a tab page. For the first tab page, pageIndex = 0.

child

The name of the child object.

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

TabAttachWindow(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.

Parameter
Type
Description

control

name of tab control.

pageIndex

Index of a tab page. Start from 0

form

The 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

TabDetachWindow(control, pageIndex)

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

Parameter
Type
Description

control

The tab control.

pageIndex

Index of a tab page to detach. Start from 0.

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

TabDisablePage(control, pageIndex)

Disables a tab page.

Parameter
Type
Description

control

The name of the tab-bar control.

pageIndex

Integer 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.

TabDisassociateChild(control, pageIndex, child)

Disassociates a child with a tab page.

Parameter
Type
Description

control

The name of the tab-bar control.

pageIndex

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

child

The name of the child object.

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

TabEnablePage(control, pageIndex)

Enables a tab page

Parameter
Type
Description

control

The name of the tab-bar control.

pageIndex

Integer 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.

TabGetActivePage(control)

Gets the current active tab page.

Parameter
Type
Description

control

The name of the tab-bar control.

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

TabGetPageIndex(control, pageName)

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

Parameter
Type
Description

control

The name of the tab-bar control.

pageName

String, 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.

TabGetPageName(control, pageIndex)

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

Parameter
Type
Description

control

The name of the tab-bar control.

pageIndex

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

Returns: SalString. The name of the tabpage.

TabGetPageTitle(control, pageIndex)

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

Parameter
Type
Description

control

The name of the tab-bar control.

pageIndex

Integer 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.

TabGetPageWindow(control, pageIndex)

Gets the window handle of the specified tab page.

Parameter
Type
Description

control

The tab control.

pageIndex

Index 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.

TabGetTooltip(control, pageIndex, tooltip, maxLength)

Parameter
Type
Description

control

pageIndex

tooltip

maxLength

Returns: SalNumber.

TabHidePage(control, pageIndex)

Hides a tab page and all controls within that page.

Parameter
Type
Description

control

The tab bar control.

pageIndex

Integer 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.

TabHideStrip(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.

Parameter
Type
Description

control

The tab control.

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

TabPageCount(control)

Returns the number of tab pages.

Parameter
Type
Description

control

The name of the tab-bar control.

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

TabRemovePage(control, pageIndex)

Removes a tab page.

Parameter
Type
Description

control

The name of the tab-bar control.

pageIndex

Integer 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.

TabRenamePage(control, pageIndex, pageName)

Renames a tab page.

Parameter
Type
Description

control

The name of the tab-bar control.

pageIndex

Integer that specifies the index of a tab page to be renamed. For the first tab page, pageIndex = 0.

pageName

String, that specifies the new name of the tab page.

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

TabSetActivePage(control, pageIndex)

Activates a tab specified by a particular tab index.

Parameter
Type
Description

control

The name of the tab-bar control.

pageIndex

Integer 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.

TabSetPageTitle(control, pageIndex, pageTitle)

Sets the title of the specified tab page.

Parameter
Type
Description

control

The tab control.

pageIndex

Index of a tab page. Start from 0.

pageTitle

Tab page title to set.

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

TabSetTooltip(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.

Parameter
Type
Description

control

The tab control.

pageIndex

Index of a tab page. Start from 0.

tooltip

Receives the tooltip text.

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

TabShowPage(control, pageIndex)

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

Parameter
Type
Description

control

The tab bar control

pageIndex

Integer 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.

TabShowStrip(control)

Shows the tab page selector inside the specified tab control.

Parameter
Type
Description

control

The tab control.

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

TabUpdate(control)

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

Parameter
Type
Description

control

The tab bar control.

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

TBarSetVisible(ctrl, show)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

show

If true, displays the tool bar; if false, hides the tool bar.

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

TblAnyRows(table, flagsOn, flagsOff)

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

Parameter
Type
Description

table

The name of a table window or grid.

flagsOn

The flags that the row should have. You can combine ROW * flags using the OR (|) operator.

flagsOff

The 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

TblClearSelection(table)

Deselects all rows of a table window.

Parameter
Type
Description

table

The name of a table window or grid.

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

TblColumnAverage(table, columnId, flagsOn, flagsOff)

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

Parameter
Type
Description

table

The name of a table window or grid.

columnId

The Column Identifier.

flagsOn

The flags that the row should have. You can combine ROW* flags using the OR (|) operator.

flagsOff

The 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.

TblColumnSum(table, columnId, flagsOn, flagsOff)

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

Parameter
Type
Description

table

The table window or grid.

columnId

The Column Identifier.

flagsOn

The flags that the row should have. You can combine ROW* flags using the OR (|) operator.

flagsOff

The 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.

TblCopyRows(table, flagsOn, flagsOff)

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

Parameter
Type
Description

table

The name of a table window or grid.

flagsOn

The flags that the row should have. You can combine ROW* flags using the OR (|) operator.

flagsOff

The 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

TblCreateColumn(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.

Parameter
Type
Description

table

The name of a table window or grid.

columnPos

The Column Position.

displayWidth

The display width of the column in inches.

maxChars

The maximum number of characters that the column can contain.

title

The column title.

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

TblCreateColumnEx(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.

Parameter
Type
Description

table

The name of a table window or grid.

columnPos

The Column Position

displayWidth

The display width of the column in inches

title

The column title.

maxChars

The maximum number of characters that the column can contain.

dataType

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

TblCreateColumnFromClass(table, className, position)

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

Parameter
Type
Description

table

The table into which the new column will be inserted.

className

The name of the column class to be used as a template.

position

The 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.

TblDefineCheckBoxColumn(column, flags, checkedValue, uncheckedValue)

Define a column as a check box.

Parameter
Type
Description

column

checkedValue

uncheckedValue

Returns: SalBoolean.

TblDefineDropDownListColumn(column, flags, lines)

Define a column as a drop down list.

Parameter
Type
Description

Returns: SalBoolean.

TblDefinePopupEditColumn(column, flags, lines)

Define a column as a popup edit window.

Parameter
Type
Description

Returns: SalBoolean.

TblDefineRowHeader(table, title, width, flags, column)

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

Parameter
Type
Description

table

The table window or grid.

title

The title of the row header column.

width

The width of the row header in pixels.

flags

The row header attributes. You can combine these flags using the OR (|) operator. Possible values include: TBL_RowHdr_VisibleTBL_RowHdr_MarkEditsTBL_RowHdr_ShareColorTBL_RowHdr_Sizable

column

The 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.

TblDefineSplitWindow(table, rowsLowerHalf, dragAdjust)

Splits a table window horizontally.

Parameter
Type
Description

table

The name of a table window to split.

rowsLowerHalf

The 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.

dragAdjust

Specify 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.

TblDeleteRow(table, row, flag)

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

Parameter
Type
Description

table

The name of a table window or grid.

row

The number of the row to delete.

flag

A 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.

TblDeleteSelected(table, sql)

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

Parameter
Type
Description

table

The name of a table window or grid

sql

The 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.

TblDeleteSelected(table, sql, errorHandler)

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

Parameter
Type
Description

table

The name of a table window or grid

sql

The handle of a DELETE statement.

errorHandler

The 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.

TblDestroyColumns(table)

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

Parameter
Type
Description

table

The 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).

TblDoDeletes(table, sql, flagsOn, errorHandler)

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

Parameter
Type
Description

table

The name of a table window or grid.

sql

The handle of a DELETE statement.

flagsOn

Row flags are used to determine which rows to delete. You can specify either of these flags:ROW_MarkDeletedROW_Selected

errorHandler

The error handler

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

TblDoDeletes(table, sql, flagsOn)

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

Parameter
Type
Description

table

The name of a table window or grid.

sql

The handle of a DELETE statement.

flagsOn

Row 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.

TblDoInserts(table, sql, clearFlags)

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

Parameter
Type
Description

table

The name of a table window or grid.

sql

The handle of an INSERT statement.

clearFlags

Whether 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.

TblDoInserts(table, sql, clearFlags, errorHandler)

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

Parameter
Type
Description

Returns: SalBoolean.

TblDoUpdates(ctrl, sql, clearFlags)

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

Parameter
Type
Description

ctrl

Target control on which to execute the call.

clearFlags

Returns: SalBoolean.

TblDoUpdates(table, sql, clearFlags, errorHandler)

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

Parameter
Type
Description

Returns: SalBoolean.

TblFetchRow(table, row)

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

Parameter
Type
Description

Returns: SalNumber.

TblFindNextRow(table, row, flagsOn, flagsOff)

Parameter
Type
Description

Returns: SalBoolean.

TblFindPrevRow(table, row, flagsOn, flagsOff)

Parameter
Type
Description

Returns: SalBoolean.

TblGetColumnText(table, columnId, text)

Parameter
Type
Description

Returns: SalBoolean.

TblGetColumnTitle(column, text, maxLen)

Parameter
Type
Description