Sal

PPJ.Runtime.Sal

Namespace: PPJ.Runtime

Assembly: PPJ.Runtime.49 (4.9.0.0)

Contains all Sal.* static functions.

public class Sal

Properties

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

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

Methods

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

ParameterTypeDescription

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.

Turns on/off automatic COM error handling.

ParameterTypeDescription

on

Returns: SalBoolean.

Perform one of the object's enumerated actions.

ParameterTypeDescription

ctrl

Target control on which to execute the call.

verb

size

Returns: SalBoolean.

Returns the COM object for the specified AX control.

ParameterTypeDescription

ctrl

Target control on which to execute the call.

obj

Returns: SalBoolean.

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.

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.

Finds a visible top-level window.

ParameterTypeDescription

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.

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

ParameterTypeDescription

array

The name of an array of numbers.

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

ParameterTypeDescription

array

dim

Returns: SalBoolean.

ParameterTypeDescription

array

dim

bound

Returns: SalBoolean.

ParameterTypeDescription

array

dim

bound

Returns: SalBoolean.

Determines if a dynamic array contains data.

ParameterTypeDescription

array

The name of the array to query.

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

Returns the maximum value in an array of numbers.

ParameterTypeDescription

array

The name of an array of numbers.

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

Returns the minimum value in an array of numbers.

ParameterTypeDescription

array

The name of an array of numbers.

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

ParameterTypeDescription

array

min

max

Returns: SalNumber.

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

ParameterTypeDescription

array

The name of the array to query.

lower

The new lower bound.

upper

The new upper bound or AC_Dynamic.

Returns: SalBoolean. bOk

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

ParameterTypeDescription

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.

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

ParameterTypeDescription

array

The name of an array of numbers.

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

Brings a window to the top of all overlapping windows.

ParameterTypeDescription

ctrl

Target control on which to execute the call.

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

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

ParameterTypeDescription

ctrl

Target control on which to execute the call.

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

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

ParameterTypeDescription

ctrl

Target control on which to execute the call.

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

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

ParameterTypeDescription

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.

Gets a window's color.

ParameterTypeDescription

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.

Gets a system color.

ParameterTypeDescription

colorIndex

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

Returns: SalNumber. the color

Sets a window's color.

ParameterTypeDescription

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.

ParameterTypeDescription

colorValue

red

green

blue

Returns: SalBoolean.

ParameterTypeDescription

color

red

green

blue

Returns: SalBoolean.

ParameterTypeDescription

expression

error

errorPos

numReturn

sReturn

dtReturn

windowReturn

inhibitErrors

context

Returns: SalNumber.

Returns: SalString.

Returns an instance of SalStringContext wrapping the current context reference.

ParameterTypeDescription

context

Returns: SalStringContext.

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

ParameterTypeDescription

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.

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

ParameterTypeDescription

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.

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

ParameterTypeDescription

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.

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

ParameterTypeDescription

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.

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

ParameterTypeDescription

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.

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

ParameterTypeDescription

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.

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

ParameterTypeDescription

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.

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

ParameterTypeDescription

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.

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

ParameterTypeDescription

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.

Clears a window's cursor.

ParameterTypeDescription

ctrl

Target control on which to execute the call.

type

Returns: SalBoolean.

Sets a window's cursor.

ParameterTypeDescription

ctrl

Target control on which to execute the call.

resource

type

Returns: SalBoolean.

Sets a window's cursor.

ParameterTypeDescription

ctrl

Target control on which to execute the call.

resourceId

type

Returns: SalBoolean.

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

ParameterTypeDescription

ctrl

Target control on which to execute the call.

fileName

type

Returns: SalBoolean.

Sets a window's cursor from a string variable.

ParameterTypeDescription

ctrl

Target control on which to execute the call.

blob

type

Returns: SalBoolean.

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

ParameterTypeDescription

year

month

day

hour

minute

second

Returns: SalDateTime.

Returns the PC's current date/time.

Returns: SalDateTime.

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

ParameterTypeDescription

dateTime

Returns: SalNumber.

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

ParameterTypeDescription

dateTime

Returns: SalNumber.

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

ParameterTypeDescription

dateTime

Returns: SalNumber.

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

ParameterTypeDescription

dateTime

Returns: SalNumber.

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

ParameterTypeDescription

dateTime

Returns: SalDateTime.

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

ParameterTypeDescription

dateTime

Returns: SalNumber.

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

ParameterTypeDescription

dateTime

Returns: SalDateTime.

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

ParameterTypeDescription

dateTime

Returns: SalNumber.

ParameterTypeDescription

date

target

Returns: SalNumber.

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

ParameterTypeDescription

dateTime

Returns: SalDateTime.

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

ParameterTypeDescription

dateTime

Returns: SalNumber.

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

ParameterTypeDescription

dateTime

Returns: SalNumber.

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

ParameterTypeDescription

dateTime

Returns: SalDateTime.

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

ParameterTypeDescription

ctrl

Target control on which to execute the call.

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

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

ParameterTypeDescription

ctrl

Target control on which to execute the call.

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

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

ParameterTypeDescription

ctrl

Target control on which to execute the call.

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

ParameterTypeDescription

ctrl

colorValue

Returns: SalBoolean.

ParameterTypeDescription

ctrl

name

size

enhancements

color

Returns: SalBoolean.

ParameterTypeDescription

windowDlg

orientation

Returns: SalBoolean.

ParameterTypeDescription

ctrl

dialogTitle

filters

filtersCount

filterIndex

fileName

filePath

Returns: SalBoolean.

ParameterTypeDescription

ctrl

dialogTitle

filters

filtersCount

filterIndex

fileNames

filePaths

fileCount

Returns: SalBoolean.

ParameterTypeDescription

ctrl

dialogTitle

filters

filtersCount

filterIndex

fileName

filePath

Returns: SalBoolean.

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

ParameterTypeDescription

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.

Disables dropping while in drag mode.

Returns: SalBoolean.

Enables dropping while in drag mode.

Returns: SalBoolean.

ParameterTypeDescription

window

x

y

Returns: SalBoolean.

ParameterTypeDescription

windowTarget

x

y

Returns: SalBoolean.

Initiates drag mode.

ParameterTypeDescription

ctrl

Target control on which to execute the call.

Returns: SalBoolean.

Ends drag mode.

Returns: SalBoolean.

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

ParameterTypeDescription

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.

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

ParameterTypeDescription

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.

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

ParameterTypeDescription

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.

ParameterTypeDescription

ctrl

x

y

Returns: SalBoolean.

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

Returns: SalBoolean. bOk

Returns: SalBoolean.

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.

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.

Returns: SalBoolean.

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.

Deletes selected data from the currently selected control

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

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.

Copies a string to the Clipboard as text.

ParameterTypeDescription

str

The string to copy to the Clipboard.

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

Returns: SalBoolean.

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.

Pastes data from the Clipboard into the currently selected control

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

Returns: SalBoolean.

ParameterTypeDescription

str

Returns: SalBoolean.

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.

Enables keyboard and mouse input to a window.

ParameterTypeDescription

ctrl

Target control on which to execute the call.

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

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

ParameterTypeDescription

ctrl

Target control on which to execute the call.

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

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

ParameterTypeDescription

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.

Stops tracing.

Returns: SalBoolean.

ParameterTypeDescription

file

Returns: SalBoolean.

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

ParameterTypeDescription

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.

Creates a directory.

ParameterTypeDescription

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.

ParameterTypeDescription

file

charValue

Returns: SalBoolean.

Returns the next character in an open file.

ParameterTypeDescription

file

The handle of the open file.

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

ParameterTypeDescription

path

Returns: SalBoolean.

ParameterTypeDescription

fileName

dateTime

Returns: SalBoolean.

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

ParameterTypeDescription

file

buffer

bufferSize

Returns: SalBoolean.

ParameterTypeDescription

file

fileName

style

Returns: SalBoolean.

ParameterTypeDescription

file

fileName

style

encoding

Returns: SalBoolean.

ParameterTypeDescription

file

fileName

style

reopen

Returns: SalBoolean.

Writes a character to an open file.

ParameterTypeDescription

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.

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

ParameterTypeDescription

file

The handle of the open file.

str

The string to write.

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

ParameterTypeDescription

file

buffer

bufferLength

Returns: SalNumber.

ParameterTypeDescription

file

buffer

bufferLength

Returns: SalNumber.

Deletes a directory.

ParameterTypeDescription

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.

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

ParameterTypeDescription

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.

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

ParameterTypeDescription

path

The path name of the new current working directory.

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

Sets the modification date and time of the specified file.

ParameterTypeDescription

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.

Sets the current disk drive to the specified drive letter.

ParameterTypeDescription

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.

Returns the current position in an open file.

ParameterTypeDescription

file

The handle of an open file.

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

Writes a string to an open file.

ParameterTypeDescription

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.

Writes a binary buffer to an open file.

ParameterTypeDescription

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.

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

ParameterTypeDescription

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.

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

ParameterTypeDescription

ctrl

Target control on which to execute the call.

message

wParam

lParam

Returns: SalNumber.

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

ParameterTypeDescription

ctrl

Target control on which to execute the call.

message

wParam

lParam

Returns: SalBoolean.

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

ParameterTypeDescription

ctrl

Target control on which to execute the call.

nProfile

Returns: SalBoolean.

ParameterTypeDescription

ctrl

text

format

Returns: SalBoolean.

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

ParameterTypeDescription

dateTime

The date/time value to format.

sPicture

The date/time picture format.

Returns: SalString. the formatted date/time string.

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

ParameterTypeDescription

num

The number value to format.

sPicture

The number picture format.

Returns: SalString. a formatted number string.

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

ParameterTypeDescription

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.

ParameterTypeDescription

ctrl

mask

Returns: SalBoolean.

ParameterTypeDescription

ctrl

nParm

nValue

Returns: SalBoolean.

ParameterTypeDescription

ctrl

nParm

value

Returns: SalBoolean.

ParameterTypeDescription

ctrl

format

Returns: SalBoolean.

Returns the culture profile for the specified field.

ParameterTypeDescription

ctrl

Target control on which to execute the call.

Returns: SalNumber.

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

ParameterTypeDescription

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.

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

ParameterTypeDescription

mask

An input mask.

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

Validates a numeric or date/time picture format.

ParameterTypeDescription

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

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

ParameterTypeDescription

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.

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

ParameterTypeDescription

ctrl

Target control on which to execute the call.

format

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.

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

ParameterTypeDescription

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.

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

ParameterTypeDescription

ctrl

Target control on which to execute the call.

nParm

nValue

Returns: SalBoolean.

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

ParameterTypeDescription

ctrl

Target control on which to execute the call.

nParm

value

Returns: SalBoolean.

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

ParameterTypeDescription

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.

Changes the culture profile for the specified field.

ParameterTypeDescription

ctrl

Target control on which to execute the call.

nProfile

Returns: SalBoolean.

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

ParameterTypeDescription

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.

ParameterTypeDescription

ctrl

text

Returns: SalBoolean.

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

ParameterTypeDescription

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.

ParameterTypeDescription

ctrl

name

size

enhancement

Returns: SalBoolean.

Gets the names of the fonts.

ParameterTypeDescription

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.

ParameterTypeDescription

get

fontName

fontSizes

Returns: SalNumber.

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

ParameterTypeDescription

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

ParameterTypeDescription

ctrl

paramType

value

Returns: SalBoolean.

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

ParameterTypeDescription

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.