Sal
PPJ.Runtime.Sal
Namespace: PPJ.Runtime
Assembly: PPJ.Runtime.49 (4.9.0.0)
Contains all Sal.* static functions.
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.
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.
Turns on/off automatic COM error handling.
Parameter | Type | Description |
---|---|---|
on |
Returns: SalBoolean.
Perform one of the object's enumerated actions.
Parameter | Type | Description |
---|---|---|
ctrl | Target control on which to execute the call. | |
verb | ||
size |
Returns: SalBoolean.
Returns the COM object for the specified AX control.
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.
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.
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.
Parameter | Type | Description |
---|---|---|
array | ||
dim |
Returns: SalBoolean.
Parameter | Type | Description |
---|---|---|
array | ||
dim | ||
bound |
Returns: SalBoolean.
Parameter | Type | Description |
---|---|---|
array | ||
dim | ||
bound |
Returns: SalBoolean.
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.
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.
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.
Parameter | Type | Description |
---|---|---|
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().
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
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.
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.
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.
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.
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.
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.
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.
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
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.
Parameter | Type | Description |
---|---|---|
colorValue | ||
red | ||
green | ||
blue |
Returns: SalBoolean.
Parameter | Type | Description |
---|---|---|
color | ||
red | ||
green | ||
blue |
Returns: SalBoolean.
Parameter | Type | Description |
---|---|---|
expression | ||
error | ||
errorPos | ||
numReturn | ||
sReturn | ||
dtReturn | ||
windowReturn | ||
inhibitErrors | ||
context |
Returns: SalNumber.
Returns: SalString.
Returns an instance of SalStringContext wrapping the current context reference.
Parameter | Type | Description |
---|---|---|
context |
Returns: SalStringContext.
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.
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.
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.
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.
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.
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.
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.
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.
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.
Clears a window's cursor.
Returns: SalBoolean.
Sets a window's cursor.
Parameter | Type | Description |
---|---|---|
ctrl | Target control on which to execute the call. | |
resource | ||
type |
Returns: SalBoolean.
Sets a window's cursor.
Parameter | Type | Description |
---|---|---|
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.
Parameter | Type | Description |
---|---|---|
ctrl | Target control on which to execute the call. | |
fileName | ||
type |
Returns: SalBoolean.
Sets a window's cursor from a string variable.
Parameter | Type | Description |
---|---|---|
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.
Parameter | Type | Description |
---|---|---|
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.
Parameter | Type | Description |
---|---|---|
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.
Parameter | Type | Description |
---|---|---|
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.
Parameter | Type | Description |
---|---|---|
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.
Parameter | Type | Description |
---|---|---|
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.
Parameter | Type | Description |
---|---|---|
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.
Parameter | Type | Description |
---|---|---|
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.
Parameter | Type | Description |
---|---|---|
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.
Parameter | Type | Description |
---|---|---|
dateTime |
Returns: SalNumber.
Parameter | Type | Description |
---|---|---|
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.
Parameter | Type | Description |
---|---|---|
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.
Parameter | Type | Description |
---|---|---|
dateTime |
Returns: SalNumber.
Returns the year portion of a date or returns -1 if you specify DATETIME_Null as a parameter.
Parameter | Type | Description |
---|---|---|
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.
Parameter | Type | Description |
---|---|---|
dateTime |
Returns: SalDateTime.
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.
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.
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.
Parameter | Type | Description |
---|---|---|
ctrl | ||
colorValue |
Returns: SalBoolean.
Parameter | Type | Description |
---|---|---|
ctrl | ||
name | ||
size | ||
enhancements | ||
color |
Returns: SalBoolean.
Parameter | Type | Description |
---|---|---|
windowDlg | ||
orientation |
Returns: SalBoolean.
Parameter | Type | Description |
---|---|---|
ctrl | ||
dialogTitle | ||
filters | ||
filtersCount | ||
filterIndex | ||
fileName | ||
filePath |
Returns: SalBoolean.
Parameter | Type | Description |
---|---|---|
ctrl | ||
dialogTitle | ||
filters | ||
filtersCount | ||
filterIndex | ||
fileNames | ||
filePaths | ||
fileCount |
Returns: SalBoolean.
Parameter | Type | Description |
---|---|---|
ctrl | ||
dialogTitle | ||
filters | ||
filtersCount | ||
filterIndex | ||
fileName | ||
filePath |
Returns: SalBoolean.
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.
Disables dropping while in drag mode.
Returns: SalBoolean.
Enables dropping while in drag mode.
Returns: SalBoolean.
Parameter | Type | Description |
---|---|---|
window | ||
x | ||
y |
Returns: SalBoolean.
Parameter | Type | Description |
---|---|---|
windowTarget | ||
x | ||
y |
Returns: SalBoolean.
Initiates drag mode.
Parameter | Type | Description |
---|---|---|
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.
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.
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.
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.
Parameter | Type | Description |
---|---|---|
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.
Parameter | Type | Description |
---|---|---|
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.
Parameter | Type | Description |
---|---|---|
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.
Parameter | Type | Description |
---|---|---|
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.
Parameter | Type | Description |
---|---|---|
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.
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.
Stops tracing.
Returns: SalBoolean.
Parameter | Type | Description |
---|---|---|
file |
Returns: SalBoolean.
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.
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.
Parameter | Type | Description |
---|---|---|
file | ||
charValue |
Returns: SalBoolean.
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.
Parameter | Type | Description |
---|---|---|
path |
Returns: SalBoolean.
Parameter | Type | Description |
---|---|---|
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(:).
Parameter | Type | Description |
---|---|---|
file | ||
buffer | ||
bufferSize |
Returns: SalBoolean.
Parameter | Type | Description |
---|---|---|
file | ||
fileName | ||
style |
Returns: SalBoolean.
Parameter | Type | Description |
---|---|---|
file | ||
fileName | ||
style | ||
encoding |
Returns: SalBoolean.
Parameter | Type | Description |
---|---|---|
file | ||
fileName | ||
style | ||
reopen |
Returns: SalBoolean.
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.
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.
Parameter | Type | Description |
---|---|---|
file | ||
buffer | ||
bufferLength |
Returns: SalNumber.
Parameter | Type | Description |
---|---|---|
file | ||
buffer | ||
bufferLength |
Returns: SalNumber.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
Copies the specified profile to the custom profile for the specified field. The control must use the customized profile set using FMT_Profile_Program.
Returns: SalBoolean.
Parameter | Type | Description |
---|---|---|
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
Parameter | Type | Description |
---|---|---|
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
Parameter | Type | Description |
---|---|---|
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.
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.
Parameter | Type | Description |
---|---|---|
ctrl | ||
mask |
Returns: SalBoolean.
Parameter | Type | Description |
---|---|---|
ctrl | ||
nParm | ||
nValue |
Returns: SalBoolean.
Parameter | Type | Description |
---|---|---|
ctrl | ||
nParm | ||
value |
Returns: SalBoolean.
Parameter | Type | Description |
---|---|---|
ctrl | ||
format |
Returns: SalBoolean.
Returns the culture profile for the specified field.
Parameter | Type | Description |
---|---|---|
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.
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.
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.
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 |
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.
Sets a data field's or table window column's format.
Parameter | Type | Description |
---|---|---|
ctrl | Target control on which to execute the call. | |
format | The format for ctrl. Potential formats include: FMT_Format_Currency, FMT_Format_Date, FMT_Format_DateTime, FMT_Format_Decimal, FMT_Format_Invisible, FMT_Format_LowerCase, FMT_Format_Percentage, FMT_Format_PictureFMT_Format_Time, FMT_Format_Unformatted, and FMT_Format_UpperCase. |
Returns: SalBoolean. the format for ctrl.
A field's country profile determines a format's characteristics. A field's format must agree with the field's data type, so for example, number fields can only be formatted as decimal, percentage, or currency values.
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.
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. | |
nParm | ||
nValue |
Returns: SalBoolean.
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. | |
nParm | ||
value |
Returns: SalBoolean.
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.
Changes the culture profile for the specified field.
Returns: SalBoolean.
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.
Parameter | Type | Description |
---|---|---|
ctrl | ||
text |
Returns: SalBoolean.
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.
Parameter | Type | Description |
---|---|---|
ctrl | ||
name | ||
size | ||
enhancement |
Returns: SalBoolean.
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.
Parameter | Type | Description |
---|---|---|
get | ||
fontName | ||
fontSizes |
Returns: SalNumber.
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
Parameter | Type | Description |
---|---|---|
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.
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.
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.
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.
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.
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.
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.
Returns the handle of the window with the focus.
Returns: SalWindowHandle. windowFocus which identifies the window that can currently receive input from the keyboard.
Parameter | Type | Description |
---|---|---|
ctrl | ||
name |
Returns: SalBoolean.
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.
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.
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.
Parameter | Type | Description |
---|---|---|
section | ||
entry | ||
defaultValue | ||
value | ||
fileName |
Returns: SalNumber.
Returns the instance of ISalReport that is identified by the handle.
Parameter | Type | Description |
---|---|---|
handle |
Returns: ISalReport.
Returns the version of the library.
Returns: SalNumber. The version number.
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.
Parameter | Type | Description |
---|---|---|
ctrl | ||
text | ||
maxLength |
Returns: SalNumber.
Parameter | Type | Description |
---|---|---|
ctrl | ||
x | ||
y |
Returns: SalBoolean.
Parameter | Type | Description |
---|---|---|
ctrl | ||
width | ||
height |
Returns: SalBoolean.
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).
Parameter | Type | Description |
---|---|---|
ctrl | ||
text | ||
maxLen |
Returns: SalNumber.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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
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.
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.
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.
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.
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.
Parameter | Type | Description |
---|---|---|
ctrl | ||
ctrlPath | ||
pathName | ||
attributes |
Returns: SalBoolean.
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.
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.
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.
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.
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.
Parameter | Type | Description |
---|---|---|
ctrl | ||
fileName |
Returns: SalBoolean.
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.
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.
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.
Parameter | Type | Description |
---|---|---|
ctrl | ||
index | ||
text |
Returns: SalNumber.
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.
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.
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.
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.
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.
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.
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.
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.
Parameter | Type | Description |
---|---|---|
name | ||
mode | ||
retCode |
Returns: SalBoolean.
Parameter | Type | Description |
---|---|---|
name | ||
mode | ||
retCode |
Returns: SalBoolean.
Appends the string to the file.
Returns: SalBoolean.
Appends the string and a new line to the file.
Returns: SalBoolean.
Parameter | Type | Description |
---|---|---|
fileName |
Returns: SalBoolean.
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.
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.
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.
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.
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
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
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
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.
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.
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.
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.
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.
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.
Parameter | Type | Description |
---|---|---|
obj |
Returns: SalBoolean.
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.
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.
Parameter | Type | Description |
---|---|---|
obj | ||
context |
Returns: SalBoolean.
Parameter | Type | Description |
---|---|---|
role | ||
inRole |
Returns: SalBoolean.
Parameter | Type | Description |
---|---|---|
isInTransaction |
Returns: SalBoolean.
Parameter | Type | Description |
---|---|---|
isSecurityEnabled |
Returns: SalBoolean.
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.
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 | ||
binary | ||
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 | ||
title |
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 |
---|---|---|
control | ||
xml |
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).
Computes a number's absolute value.
Parameter | Type | Description |
---|---|---|
num | The number whose absolute value you want. |
Returns: SalNumber. the absolute value of 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.
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.
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.
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.
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).
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).
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.
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
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).
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.
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.
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 .
Returns the greater of two numbers.
Returns: SalNumber. the greater of num1 and num2 .
Returns the lesser of two numbers.
Returns: SalNumber. the lesser of num1 and num2 .
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 .
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.
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:
If num is not 0 and exponent is 0, returns 1.
If num is 0 and exponent is negative, returns to zero(0).
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.
In instances where an overflow or an underflow occurs, returns zero(0).
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).
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
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.
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).
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).
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.
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).
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).
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
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.
Parameter | Type | Description |
---|---|---|
num | ||
decimalPlaces | ||
str |
Returns: SalNumber.
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
Converts a number to a window handle.
Parameter | Type | Description |
---|---|---|
num | The number to convert. |
Returns: SalWindowHandle. the window handle converted from num
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
Creates an instance of the class.
Parameter | Type | Description |
---|---|---|
className | Class name |
Returns: SalFunctionalClass. Reference to the object created.
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.
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.
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.
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.
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 |
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.
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.
Parameter | Type | Description |
---|---|---|
ctrl | ||
description | ||
maxLen |
Returns: SalNumber.
Parameter | Type | Description |
---|---|---|
ctrl | ||
buffer | ||
type |
Returns: SalNumber.
Parameter | Type | Description |
---|---|---|
ctrl | ||
buffer | ||
type |
Returns: SalNumber.
Parameter | Type | Description |
---|---|---|
ctrl | ||
format | ||
buffer |
Returns: SalNumber.
Parameter | Type | Description |
---|---|---|
ctrl | ||
format | ||
buffer |
Returns: SalNumber.
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.
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)
Sets the fit for a picture.
Parameter | Type | Description |
---|---|---|
ctrl | Target control (picture) on which to execute the call. | |
fit | The type of fit: PIC_FitBestFitPIC_FitScalePIC_FitSizeToFit | |
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.
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.
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. | |
type | Receives the format of the picture contents: PIC_ImageTypeNonePIC_ImageTypeBMPPIC_ImageTypeICONPIC_ImageTypeWMFPIC_ImageTypeTIFFPIC_ImageTypePCXPIC_ImageTypeGIFPIC_ImageTypeJPEGPIC_ImageTypeNuVEQ |
Returns: SalBoolean. true if the function succeeds and false if it fails.
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.
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.
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.
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.
Parameter | Type | Description |
---|---|---|
lParam | ||
left | ||
top | ||
right | ||
bottom |
Returns: SalBoolean.
Parameter | Type | Description |
---|---|---|
device | ||
driver | ||
port |
Returns: SalBoolean.
Parameter | Type | Description |
---|---|---|
parm | ||
value |
Returns: SalBoolean.
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
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.
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.
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
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
Parameter | Type | Description |
---|---|---|
device | ||
driver | ||
port | ||
activeOnly |
Returns: SalBoolean.
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.
Exits an application.
Returns: SalBoolean. true if the function succeeds. False if the function fails.
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.
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
Parameter | Type | Description |
---|---|---|
fileName | ||
variableNames | ||
inputs | ||
defaultReport | ||
error |
Returns: SalBoolean.
Parameter | Type | Description |
---|---|---|
fileName | ||
variableNames | ||
inputs | ||
defaultReport | ||
error | ||
template |
Returns: SalBoolean.
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.
Parameter | Type | Description |
---|---|---|
windowReport | ||
variableName | ||
value |
Returns: SalBoolean.
Parameter | Type | Description |
---|---|---|
windowReport | ||
variableName | ||
value |
Returns: SalBoolean.
Parameter | Type | Description |
---|---|---|
windowReport | ||
variableName | ||
value |
Returns: SalBoolean.
Parameter | Type | Description |
---|---|---|
windowReport | ||
printerName | ||
orientation | ||
paperType | ||
width | ||
height |
Returns: SalBoolean.
Parameter | Type | Description |
---|---|---|
windowReport | ||
variableName | ||
value |
Returns: SalBoolean.
Parameter | Type | Description |
---|---|---|
owner | ||
template | ||
variableNames | ||
inputs | ||
copies | ||
options | ||
firstPage | ||
lastPage | ||
error |
Returns: SalWindowHandle.
Parameter | Type | Description |
---|---|---|
owner | ||
template | ||
destFile | ||
variableNames | ||
inputs | ||
copies | ||
options | ||
firstPage | ||
lastPage | ||
rtfFormat | ||
error |
Returns: SalWindowHandle.
Parameter | Type | Description |
---|---|---|
owner | ||
template | ||
destFile | ||
variableNames | ||
inputs | ||
options | ||
firstPage | ||
lastPage | ||
error |
Returns: SalWindowHandle.
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.
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.
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.
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.
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
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.
Parameter | Type | Description |
---|---|---|
fileName | ||
table | ||
error |
Returns: SalBoolean.
Parameter | Type | Description |
---|---|---|
fileName | ||
table | ||
error | ||
template |
Returns: SalBoolean.
Parameter | Type | Description |
---|---|---|
table | ||
template | ||
paramArray | ||
error |
Returns: SalWindowHandle.
Parameter | Type | Description |
---|---|---|
table | ||
parent | ||
template | ||
error |
Returns: SalWindowHandle.
Parameter | Type | Description |
---|---|---|
owner | ||
parent | ||
template | ||
variableNames | ||
inputs | ||
flags |
Returns: SalWindowHandle.
Finds the type in any loaded assembly. The first specified assembly argument has the precedence.
Returns: Type.
Parameter | Type | Description |
---|---|---|
ctrl | ||
pos |
Returns: SalBoolean.
Parameter | Type | Description |
---|---|---|
ctrl | ||
min | ||
max | ||
line | ||
page |
Returns: SalBoolean.
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.
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.
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.
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.
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).
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.
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.
Parameter | Type | Description |
---|---|---|
buffer | ||
length |
Returns: SalBoolean.
Parameter | Type | Description |
---|---|---|
str | ||
length |
Returns: SalBoolean.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
Begins tracing.
Parameter | Type | Description |
---|---|---|
outputType | ||
traceFile | ||
clearExisting |
Returns: SalBoolean.
Returns a "handle" to the first static on a window
Parameter | Type | Description |
---|---|---|
form |
Returns: SalNumber.
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.
Parameter | Type | Description |
---|---|---|
form | ||
handle | ||
x | ||
y |
Returns: SalBoolean.
Parameter | Type | Description |
---|---|---|
form | ||
handle | ||
width | ||
height |
Returns: SalBoolean.
Hides a static
Returns: SalBoolean.
Determines whether a static is visible.
Returns: SalBoolean.
Returns a "handle" to the last static on a window
Returns: SalNumber.
Sets the location coordinates of a static
Returns: SalBoolean.
Sets the size of a static
Returns: SalBoolean.
Shows a static
Returns: SalBoolean.
Parameter | Type | Description |
---|---|---|
ctrl | ||
text | ||
maxLen |
Returns: SalNumber.
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.
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.
Parameter | Type | Description |
---|---|---|
str |
Returns: SalBoolean.
Parameter | Type | Description |
---|---|---|
str | ||
charCode |
Returns: SalBoolean.
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.
Verifies that a string represents a valid currency value.
Returns: SalBoolean.
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.
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.
Returns TRUE if the string is a valid identifier.
Parameter | Type | Description |
---|---|---|
str |
Returns: SalBoolean.
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.
Parameter | Type | Description |
---|---|---|
source | ||
length | ||
target |
Returns: SalNumber.
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.
Returns a string's length.
Parameter | Type | Description |
---|---|---|
str | The string whose length you want. |
Returns: SalNumber. the length of str
Parameter | Type | Description |
---|---|---|
str |
Returns: SalNumber.
Parameter | Type | Description |
---|---|---|
source | ||
target |
Returns: SalNumber.
Converts a string to lowercase.
Parameter | Type | Description |
---|---|---|
source | The string to convert. |
Returns: SalString. the lowercase string.
Parameter | Type | Description |
---|---|---|
source | ||
startPos | ||
length | ||
target |
Returns: SalNumber.
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.
Parameter | Type | Description |
---|---|---|
source | ||
target |
Returns: SalNumber.
Converts a string to a proper name.
Parameter | Type | Description |
---|---|---|
source | The string to convert. |
Returns: SalString. the converted string.
Parameter | Type | Description |
---|---|---|
source | ||
times | ||
target |
Returns: SalNumber.
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.
Parameter | Type | Description |
---|---|---|
source | ||
startPos | ||
length | ||
replace | ||
target |
Returns: SalNumber.
Returns: SalString.
Parameter | Type | Description |
---|---|---|
source | ||
length | ||
target |
Returns: SalNumber.
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.
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.
Parameter | Type | Description |
---|---|---|
str | ||
length |
Returns: SalBoolean.
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
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.
Converts a string to a number.
Parameter | Type | Description |
---|---|---|
str | The string to convert. |
Returns: SalNumber. the number resulting from the conversion.
Parameter | Type | Description |
---|---|---|
source | ||
target |
Returns: SalNumber.
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.
Parameter | Type | Description |
---|---|---|
str |
Returns: SalBoolean.
Parameter | Type | Description |
---|---|---|
source | ||
target |
Returns: SalNumber.
Converts a string to uppercase.
Parameter | Type | Description |
---|---|---|
source | The string to convert. |
Returns: SalString. the uppercase string.
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.
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.
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.
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:
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
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
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
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.
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.
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.
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.
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.
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.
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.
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.
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.
Parameter | Type | Description |
---|---|---|
control | ||
pageIndex | ||
tooltip | ||
maxLength |
Returns: SalNumber.
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.
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.
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.
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.
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.
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.
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.
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
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.
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.
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.
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.
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
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.
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.
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.
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
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.
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 | One of the datatype constants: DT_Boolean, DT_DateTimeDT_LongStringDT_NumberDT_String |
Returns: SalNumber. the Column Identifier of the new column. Returns negative one (-1) if an error occurs
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.
Define a column as a check box.
Returns: SalBoolean.
Define a column as a drop down list.
Returns: SalBoolean.
Define a column as a popup edit window.
Returns: SalBoolean.
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.
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.
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.
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.
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.
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).
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.
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.
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.
Applies a SQL INSERT statement to all the rows in a table window that have the ROW New flag.
Parameter | Type | Description |
---|---|---|
table | ||
sql | ||
clearFlags | ||
errorHandler |
Returns: SalBoolean.
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. | |
sql | ||
clearFlags |
Returns: SalBoolean.
Applies a SQL UPDATE statement to all table window rows with the Row Edited flag.
Parameter | Type | Description |
---|---|---|
table | ||
sql | ||
clearFlags | ||
errorHandler |
Returns: SalBoolean.
Sends a SAM_FetchRow message to a table window if the row you specify is not currently in the table window cache.
Returns: SalNumber.
Parameter | Type | Description |
---|---|---|
table | ||
row | ||
flagsOn | ||
flagsOff |
Returns: SalBoolean.
Parameter | Type | Description |
---|---|---|
table | ||
row | ||
flagsOn | ||
flagsOff |
Returns: SalBoolean.
Parameter | Type | Description |
---|---|---|
table | ||
columnId | ||
text |
Returns: SalBoolean.
Parameter | Type | Description |
---|---|---|
column | ||
text | ||
maxLen |
Returns: SalNumber.
Gets the handle of a table window column.
Returns: SalWindowHandle.
Inserts a new blank row into a table window.
Returns: SalNumber.
Takes a row out of edit mode and selects the row. This causes the row to receive both SAM_Validate and SAM_KillFocus messages.
Parameter | Type | Description |
---|---|---|
table |
Returns: SalBoolean.
Turns off the table window's focus frame.
Parameter | Type | Description |
---|---|---|
table |
Returns: SalBoolean.
Parameter | Type | Description |
---|---|---|
table | ||
x | ||
y | ||
row | ||
column | ||
flags |
Returns: SalBoolean.
Pastes the contents of the Clipboard to the specified table window. Assumes the Clipboard data is in text format with cells delimited by tab characters and rows delimited by end-of-line characters. Inserts the new rows into the table window without overwriting existing rows, and converts the data to the data types of the corresponding table window columns.
Parameter | Type | Description |
---|---|---|
table |
Returns: SalBoolean.
Compiles, binds, and executes a SQL SELECT statement, then fetches the rows of the result set and populates a table window with them.
Parameter | Type | Description |
---|---|---|
table | ||
sql | ||
select | ||
method |
Returns: SalBoolean.
Compiles, binds, and executes a SQL SELECT statement, then fetches the rows of the result set and populates a table window with them.
Parameter | Type | Description |
---|---|---|
table | ||
sql | ||
select | ||
method | ||
errorHandler |
Returns: SalBoolean.
Clears a table window or grid and then fills new rows with data from an XML document. Optionally uses an XML schema to set attributes in the table.
Parameter | Type | Description |
---|---|---|
table | Table window to populate. | |
file | The name of the XML document file containing data to be used to populate the table. | |
rootNode | The name of the XML root node of the table, or the name of the XML node pertaining to a table row. See tableNode . | |
tableNode | If true, it means that the name specified in rootNode is the actual root node of the table, and this function should use the default name "row" as the name of the node for each table row. If false, it means that the name in rootNode is actually the name of a row node, and each node found with that name should be processed as a table window or grid row. | |
useSchema | Indicates whether to retrieve and use an XML schema for determining data types and attributes. If true, the schema is retrieved. If false, data is written into table window cells with the presumption that the table structure is already correct. Currently, useSchema cannot be specified true when tableNode is false. |
Returns: SalBoolean. True if the function succeeds and FALSE if fails. Some failure conditions, such as an invalid file name or invalid root node name, may cause error message dialogs to be displayed.
After each row of data is populated, this function sends message SAM_XMLRowDone to the table window. If an error occurs during the read, then the data in the table may be incomplete and should not be relied upon. When useSchema is set to true, and if the table window's columns were created at design time, the length of each column's value will be the length assigned at design time. If the table window or grid has no design-time columns and they are being automatically created during the call to this function, then the length of each column's value will be the length that is specified in the XML schema. This raises the possibility of truncation, if the value of an element contains more characters than are specified by the design-time length or the XML schema length.
Parameter | Type | Description |
---|---|---|
column | ||
flags | ||
checkedValue | ||
uncheckedValue |
Returns: SalBoolean.
Parameter | Type | Description |
---|---|---|
column | ||
type |
Returns: SalBoolean.
Tests the state of a table window column's flags.
Returns: SalBoolean.
Gets a table window column's identifier.
Parameter | Type | Description |
---|---|---|
column |
Returns: SalNumber.
Gets a table window column's relative position.
Parameter | Type | Description |
---|---|---|
column |
Returns: SalNumber.
Parameter | Type | Description |
---|---|---|
column | ||
width |
Returns: SalBoolean.
Returns a table window's current context row. Before sending a SAM_FetchRow message, automatically sets the context row so that assignments made while processing the message reference the correct row.
Parameter | Type | Description |
---|---|---|
table |
Returns: SalNumber.
Parameter | Type | Description |
---|---|---|
column | ||
flags | ||
lines |
Returns: SalBoolean.
Parameter | Type | Description |
---|---|---|
table | ||
row | ||
column |
Returns: SalBoolean.
Parameter | Type | Description |
---|---|---|
table | ||
nLines |
Returns: SalBoolean.
Retrieves the number of locked table window columns.
Parameter | Type | Description |
---|---|---|
table |
Returns: SalNumber.
Parameter | Type | Description |
---|---|---|
column | ||
flags | ||
lines |
Returns: SalBoolean.
Queries a row's flags.
Returns: SalBoolean.
Parameter | Type | Description |
---|---|---|
table | ||
title | ||
maxTitle | ||
width | ||
flags | ||
windowCol |
Returns: SalBoolean.
Parameter | Type | Description |
---|---|---|
table | ||
position | ||
minRange | ||
maxRange |
Returns: SalBoolean.
Parameter | Type | Description |
---|---|---|
table | ||
rowsLowerHalf | ||
dragAdjust |
Returns: SalBoolean.
Tests the state of a table window's flags.
Returns: SalBoolean.
Parameter | Type | Description |
---|---|---|
table | ||
minRange | ||
maxRange |
Returns: SalBoolean.
Clears a table window by discarding all rows from the table window cache and setting the table range to 0, -1.
Parameter | Type | Description |
---|---|---|
table |
Returns: SalBoolean.
Scrolls a table window to the specified row and column.
Returns: SalBoolean.
Scrolls a table window to the specified row and column.
Returns: SalBoolean.
Changes a table window cell's text color.
Parameter | Type | Description |
---|---|---|
column | ||
colorValue | ||
discardable |
Returns: SalBoolean.
Changes a table window cell's text color.
Returns: SalBoolean.
Sets or clears a table window column's flags.
Parameter | Type | Description |
---|---|---|
column | ||
flags | ||
set |
Returns: SalBoolean.
Moves a table window column to a new position.
Returns: SalBoolean.
Assigns data to a column of a table window's context row.
Returns: SalBoolean.
Sets the title of a table window column.
Returns: SalBoolean.
Sets a table window column's display width.
Returns: SalBoolean.
Sets a table window's context row. Setting the context row does not send a SAM_FetchRow message. If the row is not currently in memory, creates a new row in memory and sets its cell values to null.
Returns: SalBoolean.
Sets or clears row flags.
Parameter | Type | Description |
---|---|---|
table | ||
flags | ||
set | ||
flagsOn | ||
flagsOff |
Returns: SalBoolean.
Sets the focus to the specified table window cell (row and column). Puts the table window into edit mode and lets the user select a portion of the data in the cell.
Returns: SalBoolean.
Sets a table window's focus frame row.
Returns: SalBoolean.
Sets the height of a row in lines.
Returns: SalBoolean.
Sets the number of locked table window columns.
Returns: SalBoolean.
Defines the minimum and maximum rows (range) of a table.
Returns: SalBoolean.
Sets the focus to the first, last, next, or previous row in a table window.
Returns: SalNumber.
Sets or clears a table window row's flags.
Parameter | Type | Description |
---|---|---|
table | ||
row | ||
flags | ||
set |
Returns: SalBoolean.
Sets or clears a table window's flags.
Parameter | Type | Description |
---|---|---|
table | ||
flags | ||
set |
Returns: SalBoolean.
Sorts the rows of a table window based on the values in one of the table window's columns.
Returns: SalBoolean.
Writes the contents and properties of a table window to an XML file and/or a schema file.
Parameter | Type | Description |
---|---|---|
table | Table Window. | |
path | The path and name of the output file. Note that the schema file will have the same name, plus the suffix "_schema". | |
writeTypes | One of the XML constants(XML_DocAndSchema, XML_Document ,XML_Schema), determining whether to write XML, schema, or both. |
Returns: SalBoolean. True if the function succeeds.
If the table window contains a Date/Time column, and a cell in that column is empty, then no content will be written for that particular XML document node.
Writes the contents and properties of a table window to an XML file and/or a schema file.
Parameter | Type | Description |
---|---|---|
table | Table Window. | |
path | The path and name of the output file. Note that the schema file will have the same name, plus the suffix "_schema". | |
writeTypes | One of the XML constants(XML_DocAndSchema, XML_Document ,XML_Schema), determining whether to write XML, schema, or both. | |
flagsOn | A combination of one or more of the row flags. Rows must have these flags on in order to be part of the output to XML. | |
flagsOff | A combination of one or more of the row flags. Rows must have these flags off in order to be part of the output to XML. |
Returns: SalBoolean. True if the function succeeds.
If the table window contains a Date/Time column, and a cell in that column is empty, then no content will be written for that particular XML document node.
Destroys an object's system timer. Removes any pending SAM_Timer messages from the message queue of ctrl.
Parameter | Type | Description |
---|---|---|
ctrl | Target control on which to execute the call. | |
eventId | The timer ID to kill. |
Returns: SalBoolean. true if the event is successfully killed and false if the specified timer cannot be found.
Set a system timer with the TimerSet function. Note: Timers are a limited global resource. Your application must check the value returned by TimerSet to verify that the timer was created.
Creates a system timer for a given object. When a timer event occurs, sends SAM_Timer messages to the object in specified intervals. Timers are a limited global resource. Your application must check the value returned by SalTimerSet to verify that the timer was created.
Parameter | Type | Description |
---|---|---|
ctrl | Target control on which to execute the call. | |
eventId | The timer ID number. | |
milliseconds | The elapsed time between each SAM_Timer message, in milliseconds. |
Returns: SalBoolean. true if the function succeeds and false if it fails.
Outputs a string to the trace output target.
Returns: SalBoolean.
Creates pop-up menus at runtime.
Parameter | Type | Description |
---|---|---|
owner | The top-level window that processes messages generated by the pop-up menu. | |
menuName | The name of a pop-up menu accessible to owner. For example, a menu defined by owner or its MDI window parent, or a global menu. | |
flags | Specifies how the pop-up menu displays. You can combine flag values using the OR (|) operator. | |
x | The position of the pop-up menu on the X axis. The value of this parameter is ignored if you set the TPM_CursorX flag in flags. | |
y | The position of the pop-up menu on the Y axis. The value of this parameter is ignored if you set the TPM_CursorX in flags. The x and y Parameters together represent a point (the top left, top middle, or top right) of the pop-up menu, depending on the flags value. |
Returns: SalBoolean. true if the function succeeds and false if it fails.
Possible flag values: TPM_CenterAlignTPM_ContextMenuTPM_CursorXTPM_CursorYTPM_LeftAlignTPM_LeftButtonTPM_RightAlignTPM_RightButton
Creates pop-up menus at runtime.
Parameter | Type | Description |
---|---|---|
owner | The top-level window that processes messages generated by the pop-up menu. | |
menuType | The type of a pop-up menu accessible to owner. | |
flags | Specifies how the pop-up menu displays. You can combine flag values using the OR (|) operator. | |
x | The position of the pop-up menu on the X axis. The value of this parameter is ignored if you set the TPM_CursorX flag in flags. | |
y | The position of the pop-up menu on the Y axis. The value of this parameter is ignored if you set the TPM_CursorX in flags. The x and y Parameters together represent a point (the top left, top middle, or top right) of the pop-up menu, depending on the flags value. |
Returns: SalBoolean. true if the function succeeds and false if it fails.
Possible flag values: TPM_CenterAlignTPM_ContextMenuTPM_CursorXTPM_CursorYTPM_LeftAlignTPM_LeftButtonTPM_RightAlignTPM_RightButton
Collapse a tree item. If the tree item handle is 0, then the top level tree items of the tree control are collapsed.
Returns: SalBoolean. TRUE if the function succeeds and FALSE if it fails.
Removes a tree item from a tree control. All child items of the tree item are also removed.
Returns: SalBoolean. TRUE if the item was deleted successfully.
Moves a tree item so it becomes the child of its previous sibling. This function will fail if the tree item has no previous sibling.
Returns: SalBoolean. TRUE if the function succeeds and FALSE if it fails.
Allows the user to edit the value of the tree item's label. SAM_Validate is sent to the tree control when the edit control loses focus with wParam indicating the handle to the tree item.
Returns: SalBoolean. TRUE if edit has been activated.
Enables the tree item when bEnable is true, disables the tree item when bEnable is false.
Parameter | Type | Description |
---|---|---|
ctrl | Tree control. | |
hItem | Handle to the tree item. | |
bEnable | Set to TRUE to enable the item. Set to FALSE to disable the item. |
Returns: SalBoolean. previous state of the item before this function was called. TRUE if it was enabled, FALSE if it was disabled.
Expand a tree item. If the tree item handle is 0, then the top level tree items of the tree control are expanded.
Returns: SalBoolean. TRUE if the function succeeds and FALSE if it fails.
Finds a tree item by its Object Data. Returns 0 if not found. Searches the child items of the tree item handle argument(hItem). If the handle is 0, searches the top level tree items.
Parameter | Type | Description |
---|---|---|
ctrl | Tree control. | |
hItem | Handle to the tree item. | |
nData | Data of the item to find. |
Returns: SalNumber. Handle of the tree item whose Data matches the nData parameter.
Finds a tree item by its object title. Returns 0 if not found. Searches the child items of the tree item handle argument. If the handle is 0, searches the top level tree items.
Parameter | Type | Description |
---|---|---|
ctrl | Tree control. | |
hItem | Handle to the tree item. | |
sTitle | Title of the item to find. |
Returns: SalNumber. Handle of the item whose title matches the sTitle parameter.
Gets the first child tree item of the passed tree item handle. Returns 0 if not found. If the handle is 0, returns the first child of the tree control. If the ShowRootLines attribute is set to Yes, and 0 is passed in, returns the root node of the tree control.
Returns: SalNumber. Handle of the tree item.
Gets the number of child items. If the handle argument is 0, then number of first level child items is returned.
Returns: SalNumber. Number of items.
Returns the numeric value assigned to the tree item.
Returns: SalNumber. Numeric value assigned to the tree item.
Returns the handle of hItem's parent, or 0 if hItem is a top level child of the tree control.
Returns: SalNumber. Handle of hItem's parent.
Returns the string title of the item.
Returns: SalString. String title of the item.
Returns the current tooltip for the tree item.
Returns: SalString. Current tooltip for the tree item.
Gets the next sibling tree item of the passed tree item handle. Returns 0 if there are no more sibling tree items.
Returns: SalNumber. Handle of the next tree item.
Gets the previous sibling tree item of the passed tree item handle. Returns 0 if there are no more sibling items.
Returns: SalNumber. Handle of the previous tree item.
Returns the handle to the selected tree item, or 0 if no item is selected.
Parameter | Type | Description |
---|---|---|
ctrl | Tree control. |
Returns: SalNumber. Handle to the selected tree item, or 0 if no item is selected.
Inserts a tree item into the tree control. The new item will be a child of nItem.If nItem is 0, the tree item is added as a top level child of the tree control. If nIndex is greater than or equal to the number of child items, or if nIndex is less than zero, the new item is appended.
Parameter | Type | Description |
---|---|---|
ctrl | Tree control. | |
hItem | Handle of the tree item which will be the parent of the new item. | |
nIndex | Index to insert (starting at zero). | |
sTitle | Title of the new item. |
Returns: SalNumber. Handle of the newly created item.
Returns true if the tree item has a checkbox displayed.
Returns: SalBoolean. TRUE if the item has a checkbox displayed, FALSE if not.
Returns true if the item checkbox is checked. Returns false if the checkbox is not displayed.
Returns: SalBoolean. TRUE if the checkbox is checked. If the checkbox is not checked, or is not displayed, bIsChecked is FALSE.
Returns whether the item is expanded.
Returns: SalBoolean. TRUE if the item is expanded, FALSE if not.
Returns whether the item is selected.
Returns: SalBoolean. TRUE if the item is selected, FALSE if not.
Returns true if the tree shows checkboxes next to the items.
Parameter | Type | Description |
---|---|---|
ctrl | Tree control. |
Returns: SalBoolean. TRUE if the items have a checkbox displayed, FALSE if not.
Moves a tree item downward. This functions fails if the tree item is the last child of its parent.
Returns: SalBoolean. TRUE if the function succeeds and FALSE if it fails.
Moves a tree node and all its sub-nodes to a new location in the tree control.
Parameter | Type | Description |
---|---|---|
ctrl | Tree control. | |
hItem | Handle to the tree item. | |
hParentItem | Handle to the new parent tree item. | |
nPosition | Position in the new parents list of children to place the new child (0-n). |
Returns: SalBoolean. TRUE if the function succeeds and FALSE if it fails.
Moves a tree item upward . This functions fails if the tree item is the first child of its parent.
Returns: SalBoolean. TRUE if the function succeeds and FALSE if it fails.
Moves a tree item so it becomes the sibling of its parent. This functions fails if the tree item has no grandparent.
Returns: SalBoolean. TRUE if the function succeeds and FALSE if it fails.
Clears a tree control with the option to retain or destroy design-time nodes.
Parameter | Type | Description |
---|---|---|
ctrl | Tree control. | |
bRemove | TRUE = Remove all nodes. FALSE = Remove nodes created dynamically; the tree goes back to the initial state. |
Returns: SalBoolean. TRUE if the function succeeds and FALSE if it does not succeed.
Sets or clears the checkbox. If the checkbox is not displayed, this function has no effect.
Parameter | Type | Description |
---|---|---|
ctrl | Tree control. | |
hItem | Handle to the tree item. | |
bChecked | TRUE to set the box as checked, FALSE to clear the checkbox. |
Returns: SalBoolean. TRUE if the function succeeds and FALSE if it fails.
Sets the numeric value of the tree item.
Parameter | Type | Description |
---|---|---|
ctrl | Tree control. | |
hItem | Handle to the tree item. | |
nValue | Value to set. |
Returns: SalNumber. Value that was previously assigned to the tree item.
Sets whether the tree item's label can be edited. If bEditable is true, the label can be edited.
Parameter | Type | Description |
---|---|---|
ctrl | Tree control. | |
hItem | Handle to the tree item. | |
bEditable | Whether to enable or disable editing. |
Returns: SalBoolean. TRUE if the function succeeds and FALSE if it fails.
Sets the font enhancement for a tree item.
Parameter | Type | Description |
---|---|---|
ctrl | Tree control. | |
hItem | Handle to the tree item. | |
nFontEnh |
Returns: SalBoolean. TRUE if the function succeeds and FALSE if it fails.
Sets the image of a tree item. If the bSelected parameter is true, the selected image is set; otherwise the non-selected image is set.
Parameter | Type | Description |
---|---|---|
ctrl | Tree control. | |
hItem | Handle to the tree item. | |
bSelected | If TRUE, use selected image. If FALSE, use non-selected image. | |
sImageFile | Filename of the image. |
Returns: SalBoolean. TRUE if the function succeeds and FALSE if it fails.
Sets the image of a tree item. If the bSelected parameter is true, the selected image is set; otherwise the non-selected image is set.
Parameter | Type | Description |
---|---|---|
ctrl | Tree control. | |
hItem | Handle to the tree item. | |
bSelected | If TRUE, use selected image. If FALSE, use non-selected image. | |
nFormat | The format of the picture contents: PIC_FormatBitmap, PIC_FormatIcon, PIC_FormatObject | |
bPicture | The image data to be assigned to the tree node. |
Returns: SalBoolean. TRUE if the function succeeds and FALSE if it fails.
Sets the image of a tree item. If the bSelected parameter is true, the selected image is set; otherwise the non-selected image is set.
Parameter | Type | Description |
---|---|---|
ctrl | Tree control. | |
hItem | Handle to the tree item. | |
bSelected | If TRUE, use selected image. If FALSE, use non-selected image. | |
tResource | Resource object. |
Returns: SalBoolean. TRUE if the function succeeds and FALSE if it fails.
Sets the title of the item.
Parameter | Type | Description |
---|---|---|
ctrl | Tree control. | |
hItem | Handle to the tree item. | |
sText | Text to set as the title for this tree item. |
Returns: SalBoolean. TRUE if the function succeeds and FALSE if it fails.
Sets the text color of the tree item.
Parameter | Type | Description |
---|---|---|
ctrl | Tree control. | |
hItem | Handle to the tree item. | |
nColor | Color to set. |
Returns: SalBoolean. TRUE if the function succeeds and FALSE if it fails.
Sets the tooltip for the tree item.
Parameter | Type | Description |
---|---|---|
ctrl | Tree control. | |
hItem | Handle to the tree item. | |
sTooltip | Tooltip text. |
Returns: SalBoolean. TRUE if the function succeeds and FALSE if it fails.
Selects a tree item.
Returns: SalBoolean. TRUE if the function succeeds and FALSE if it fails.
Shows or hides the checkbox for a tree item.
Parameter | Type | Description |
---|---|---|
ctrl | Tree control. | |
hItem | Handle to the tree item. | |
bShow | TRUE to show the checkbox, FALSE to hide it. |
Returns: SalBoolean. TRUE if the function succeeds and FALSE if it fails.
Shows or hides the checkboxes for a tree control.
Parameter | Type | Description |
---|---|---|
ctrl | Tree control. | |
bShow | TRUE to show the checkboxes, FALSE to hide them. |
Returns: SalBoolean. TRUE if the function succeeds and FALSE if it fails.
Forces the update of a window.
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 window.
Painting is a low priority. Paint messages are sent to the end of an object's message queue and are processed after all other messages in the queue. If, during the development phase of your application, you find that painting is being delayed, you can force a window to update.
Enables logging of unhandled exceptions in the event log.
Parameter | Type | Description |
---|---|---|
useLog | ||
resume |
Returns: SalBoolean.
Redirects all SalProfile* functions to use the Registry.
Parameter | Type | Description |
---|---|---|
useRegistry | true if registry is to be used, false if INI files are to be used. | |
companyName | Name of company to be used under the registry. |
Returns: SalBoolean. the current "use registry" state.
Parameter | Type | Description |
---|---|---|
window | ||
state | ||
lParam |
Returns: SalBoolean.
Displays or removes the hourglass cursor.
Parameter | Type | Description |
---|---|---|
on | Whether to turn the hourglass on (true) or off (false). |
Returns: SalBoolean. true if the function succeeds and false if it fails.
The hourglass is a visual indicator that the application is busy. You must always call this function twice; once to turn the cursor into an hourglass and again to restore it to its original form.
Return the name of a window's class as a string.
Parameter | Type | Description |
---|---|---|
ctrl | Target control on which to execute the call. |
Returns: SalString. the name of a window's class as a string. Returns an empty string if the window is not a class object.
Parameter | Type | Description |
---|---|---|
window | ||
orientation |
Returns: SalBoolean.
Parameter | Type | Description |
---|---|---|
ctrl | ||
name | ||
value |
Returns: SalBoolean.
Converts a SalWindowHandle to a number.
Parameter | Type | Description |
---|---|---|
window | The handle to convert. |
Returns: SalNumber. the number converted from window.
Converts a SalFileHandle to a number.
Parameter | Type | Description |
---|---|---|
file | The handle to convert. |
Returns: SalNumber. the number converted from file.
Converts a SalSqlHandle to a number.
Parameter | Type | Description |
---|---|---|
sql | The handle to convert. |
Returns: SalNumber. the number converted from sql.
Converts a SalSqlSessionHandle to a number.
Parameter | Type | Description |
---|---|---|
session | The handle to convert |
Returns: SalNumber. the number converted from session.
Determines whether a window is an instance of the specified class.
Parameter | Type | Description |
---|---|---|
ctrl | Target control on which to execute the call. | |
type | The class type. Not a string. Type the class name without single quotes. |
Returns: SalBoolean. true if the window is an instance of the named class or an instance of a class that is derived from the named class.
Tells you if a window is an instance of the class that you specify or an instance of a class that is derived from the class that you specify. Call this function to determine if you can make a late-bound call to a function defined in the named class using the window handle that you specify. If you make a late-bound function call with a handle that is not for a window derived from the named class and the function returns a value, you get an error at runtime and the application ends.
Sets the value of a named property.
Parameter | Type | Description |
---|---|---|
ctrl | Target control on which to execute the call. | |
name | ||
value | ||
length |
Returns: SalBoolean.
Starts the Windows help system. Sends a SAM_Help message to the top-level object when the user presses the F1 key. Process this message by calling WinHelp.
Parameter | Type | Description |
---|---|---|
ctrl | Target control on which to execute the call. | |
file | The file name of the help system file. | |
command | The type of help requested; any HELP_* value. | |
index | Specify zero (0) unless: command is HELP_SetIndex and index specifies the current help index. | |
key | The context or keyword string of the requested help topic. This parameter is null unless command is equal to HELP_Key. |
Returns: SalBoolean. true if the function succeeds and false if it fails.
HELP Constants HELP_FinderHELP_HelpOnHelpHELP_IndexHELP_KeyHELP_QuitHELP_SetIndex
Returns: SalBoolean.
Deserializes an object from a XML string.
Parameter | Type | Description |
---|---|---|
T | ||
xml | XML to deserialize. |
Returns: T. An instance of the deserialized XML.
Parameter | Type | Description |
---|---|---|
errorCode | ||
errorMessage |
Returns: SalBoolean.
Serializes the object to a XML file.
Parameter | Type | Description |
---|---|---|
T | ||
obj | The object to serialize. | |
filePath | The file path of the target XML file. |
Returns: SalBoolean.
Serializes the object to a XML string.
Parameter | Type | Description |
---|---|---|
T | ||
obj | Object to serialize. |
Returns: SalString. Serialized XMl string.
Processes messages in the message loop. This function replaces all SalYield* functions. It must be placed in the loop that block execution.
Parameter | Type | Description |
---|---|---|
ctrl | Target control on which to execute the call. |
Parameter | Type | Description |
---|---|---|
set |
Returns: SalBoolean.
Returns: SalBoolean.
Parameter | Type | Description |
---|---|---|
window |
Returns: SalBoolean.
Returns: SalBoolean.
Last updated