Centura Builder Function Reference

Descargar como pdf o txt
Descargar como pdf o txt
Está en la página 1de 422

Centura Generador de

Referencia de funciones
20-6202-0000
Marcas comerciales
Centura, centura Builder, centura Ranger, Centura Team Developer, el logotipo de Centura, Gupta, el logotipo de
Gupta, Gupta Powered, el logotipo de Gupta Powered, Fast Facts, Quest, QuickObjects, SQL / API, SQLBase,
SQLBase Ranger, SQLConsole, SQLGateway, sqlhost, SQLNetwork, SQLRouter, SQLTalk, y Administrador de
objetos del equipo son marcas registradas de Gupta Corporation y pueden estar registradas en los Estados
Unidos de América y / u otros países. SQLWindows es una marca registrada y TeamWindows, ReportWindows y
EditWindows son marcas comerciales de uso exclusivo y con licencia de Centura Software Corporation.

Microsoft, Windows 32, Windows, Windows NT y Visual Basic son marcas comerciales registradas o marcas
comerciales de Microsoft Corporation en los Estados Unidos de América y / u otros países.

SApplication Builder es una marca comercial de Rosbach equipo de consultoría. Java es una marca

comercial de Sun Microsystems Inc.

Todos los demás productos o servicios aquí mencionados son marcas registradas de sus respectivos
dueños.

Derechos de autor
Derechos de autor • 1996 por Centura Software Corporation. Todos los derechos reservados.
Centura Buildern Referencia de funciones
20-6202-0000
de febrero de de 1996
Centura Generador de Referencia de funciones

Contenido

Prefacio. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxv

1 Centura Generador de Tablas de funciones . . . . . . 1-1


Funciones Centura. . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2

Funciones Centura obsoleto. . . . . . . . . . . . . . . 1-16 Centura

Categorías de funciones. . . . . . . . . . . . . . . . . . 1-17

Funciones de matrices. . . . . . . . . . . . . . . . . . . . . . . . . . 1-17 Color y Font Funciones. . . .

. . . . . . . . . . . . . . 1-18 Funciones Tipo de datos de conversión. . . . . . . . . . . . 1-19

Funciones de fecha. . . . . . . . . . . . . . . . . . . . . . . . . . 1-20 Funciones DDE. . . . . . . . . . . .

. . . . . . . . . . . . . . 1-21 Funciones de depuración. . . . . . . . . . . . . . . . . . . . . 1-22

Funciones cuadro de diálogo. . . . . . . . . . . . . . . . . . . . . 1-23 Funciones de

administración de DOS. . . . . . . . . . . . . . . 1-23 Funciones de arrastrar y soltar. . . . . . . . .

. . . . . . . . . . . . . 1-25 funciones de edición. . . . . . . . . . . . . . . . . . . . . . . . . . . 1-26

Funciones de gestión de archivos. . . . . . . . . . . . . . . . 1-27 Formato y validación

Funciones. . . . . . . . . . . . 1-29 de lista y Combo Box Funciones. . . . . . . . . . . . . .

Antecedentes 1-31 Funciones de texto manipulando. . . . . . 1-33 Funciones de MDI. . . .

. . . . . . . . . . . . . . . . . . . . . . . 1-36 funciones de aviso. . . . . . . . . . . . . . . . . . . . . . . 1-36

Funciones auxiliares. . . . . . . . . . . . . . . . . . 1-37 Funciones de números. . . . . . . . . . . . . .

. . . . . . . . . 1-40 Funciones de imagen. . . . . . . . . . . . . . . . . . . . . . . . 1-42 Funciones de

impresión. . . . . . . . . . . . . . . . . . . . . . . . . . 1-43 funciones de informe. . . . . . . . . . . . . . . .

. . . . . . . . 1-43 Funciones de la barra de desplazamiento. . . . . . . . . . . . . . . . . . . . . .

1-44 Funciones SQL. . . . . . . . . . . . . . . . . . . . . . . . . . 1-44 Funciones de conversión de

cadena. . . . . . . . . . . . . . . . 1-47 . . . . . . . . 1-36 funciones de aviso. . . . . . . . . . . . . . . . . .

. . . . . 1-36 Funciones auxiliares. . . . . . . . . . . . . . . . . . 1-37 Funciones de números. . . . .

. . . . . . . . . . . . . . . . . . 1-40 Funciones de imagen. . . . . . . . . . . . . . . . . . . . . . . . 1-42

Funciones de impresión. . . . . . . . . . . . . . . . . . . . . . . . . . 1-43 funciones de informe. . . . .

. . . . . . . . . . . . . . . . . . . 1-43 Funciones de la barra de desplazamiento. . . . . . . . . . . . . .

. . . . . . . . 1-44 Funciones SQL. . . . . . . . . . . . . . . . . . . . . . . . . . 1-44 Funciones de

conversión de cadena. . . . . . . . . . . . . . . . 1-47 . . . . . . . . 1-36 funciones de aviso. . . . . .

. . . . . . . . . . . . . . . . . 1-36 Funciones auxiliares. . . . . . . . . . . . . . . . . . 1-37 Funciones de números. . . . . . . . . . . . . . . . . . . . . . . 1-40 Funciones de imagen. . . . . . . .

Centura Generador de Referencia de funciones iii


Contenido

Funciones de la ventana Tabla. . . . . . . . . . . . . . . . . . 1-48 Funciones

de gestión de ventanas. . . . . . . . . . . . 1-51

2 Funciones Centura Builder . . . . . . . . . . . . . 2-1


SalAbort. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2 SalAppDisable. . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . 2-2 SalAppEnable. . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . 2-3 SalAppFind. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-3

SalArrayAvg. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-4 SalArrayDimCount. . .

. . . . . . . . . . . . . . . . . . . . . . . . 2-4 SalArrayGetLowerBound. . . . . . . . . . . . . . . .

. . . . . . 2-5 SalArrayGetUpperBound. . . . . . . . . . . . . . . . . . . . . . 2-5

SalArrayIsEmpty. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-6 SalArrayMax. . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . 2-7 SalArrayMin. . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . 2-7 SalArraySetUpperBound. . . . . . . . . . . . . . . . . . . . . . . 2-8

SalArraySum. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-8

SalBringWindowToTop. . . . . . . . . . . . . . . . . . . . . . . . 2-9 SalCenterWindow. . . .

. . . . . . . . . . . . . . . . . . . . . . . . 2-9 SalClearField. . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . 2-10 SalColorFromRGB. . . . . . . . . . . . . . . . . . . . . . . . . . 2-10

SalColorGet. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-11

SalColorGetSysColor. . . . . . . . . . . . . . . . . . . . . . . . 2-11 SalColorSet. . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . 2-12 SalColorToRGB. . . . . . . . . . . . . . . . . . . . . . . .

. . . . 2-13 SalCompileAndEvaluate. . . . . . . . . . . . . . . . . . . . . 2-13

SalContextBreak. . . . . . . . . . . . . . . . . . . . . . . . . . . 2-14 SalContextCurrent. . . .

. . . . . . . . . . . . . . . . . . . . . . 2-15 SalCreateWindow. . . . . . . . . . . . . . . . . . . . . . .

. . . 2-15 SalCreateWindowExWithParms. . . . . . . . . . . . . . . . 2-16

SalCursorClear. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-18 SalCursorSet. . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . 2-18 SalCursorSetFile. . . . . . . . . . . . . . . . . . . . . . .

. . . . 2-19 . . . . . . . . . . . . . . . . . . . . . . . . . . 2-18 SalCursorSetFile. . . . . . . . . . . .

. . . . . . . . . . . . . . . 2-19 . . . . . . . . . . . . . . . . . . . . . . . . . . 2-18 SalCursorSetFile.

. . . . . . . . . . . . . . . . . . . . . . . . . . 2-19

iv Centura Generador de Referencia de funciones


SalCursorSetString. . . . . . . . . . . . . . . . . . . . . . . . . . 2-19 SalDateConstruct. . . . . . . . . . . . . . . .

. . . . . . . . . . . 2-20 SalDateCurrent. . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-21 SalDateDay. . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . 2-21 SalDateHour. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-21

SalDateMinute. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-22 SalDateMonth. . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . 2-22 SalDateMonthBegin. . . . . . . . . . . . . . . . . . . . . . . . . 2-22 SalDateQuarter. . . .

. . . . . . . . . . . . . . . . . . . . . . . . 2-23 SalDateQuarterBegin. . . . . . . . . . . . . . . . . . . . . . . . 2-23

SalDateSecond. . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-23 SalDateToStr. . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . 2-24 SalDateWeekBegin. . . . . . . . . . . . . . . . . . . . . . . . . . 2-24 SalDateWeekday. . .

. . . . . . . . . . . . . . . . . . . . . . . . 2-25 SalDateYear. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-25

SalDateYearBegin. . . . . . . . . . . . . . . . . . . . . . . . . . 2-25 SalDDEAddAtom. . . . . . . . . . . . . . . . .

. . . . . . . . . . 2-26 SalDDEAlloc. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-26 SalDDEDeleteAtom.

. . . . . . . . . . . . . . . . . . . . . . . . 2-27 SalDDEExtract. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-27

SalDDEExtractCmd. . . . . . . . . . . . . . . . . . . . . . . . . 2-27 SalDDEExtractDataText. . . . . . . . . . . .

. . . . . . . . . . 2-28 SalDDEExtractOptions. . . . . . . . . . . . . . . . . . . . . . . 2-28 SalDDEFindAtom. . .

. . . . . . . . . . . . . . . . . . . . . . . . 2-29 SalDDEFree. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-29

SalDDEGetAtomName. . . . . . . . . . . . . . . . . . . . . . . 2-30 SalDDEGetExecuteString. . . . . . . . . .

. . . . . . . . . . 2-30 SalDDEPost. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-30 SalDDERequest. . . .

. . . . . . . . . . . . . . . . . . . . . . . . 2-31 SalDDESend. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-32

SalDDESendAll. . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-32 SalDDESendExecute. . . . . . . . . . . . . .

. . . . . . . . . . 2-33 2-29 SalDDEGetAtomName. . . . . . . . . . . . . . . . . . . . . . . 2-30

SalDDEGetExecuteString. . . . . . . . . . . . . . . . . . . . 2-30 SalDDEPost. . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . 2-30 SalDDERequest. . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-31 SalDDESend. . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . 2-32 SalDDESendAll. . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-32

SalDDESendExecute. . . . . . . . . . . . . . . . . . . . . . . . 2-33 2-29 SalDDEGetAtomName. . . . . . . .

. . . . . . . . . . . . . . . 2-30 SalDDEGetExecuteString. . . . . . . . . . . . . . . . . . . . 2-30 SalDDEPost. .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-30 SalDDERequest. . . . . . . . . . . . . . . . . . . . . . . . . . . .

2-31 SalDDESend. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-32 SalDDESendAll. . . . . . . . . . . . . .

. . . . . . . . . . . . . . 2-32 SalDDESendExecute. . . . . . . . . . . . . . . . . . . . . . . . 2-33 . . . . . . . . . . . . .

. . 2-32 SalDDESendAll. . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-32 SalDDESendExecute. . . . . . . .

. . . . . . . . . . . . . . . . 2-33 . . . . . . . . . . . . . . . 2-32 SalDDESendAll. . . . . . . . . . . . . . . . . . . . . . . .

. . . . 2-32 SalDDESendExecute. . . . . . . . . . . . . . . . . . . . . . . . 2-33

Centura Generador de Referencia de funciones v


Contenido

SalDDESendToClient. . . . . . . . . . . . . . . . . . . . . . . . 2-34 SalDDESetCmd. . . . . . . . . . . . . . . . . .

. . . . . . . . . . 2-34 SalDDESetDataText. . . . . . . . . . . . . . . . . . . . . . . . 2-35 SalDDESetOptions. .

. . . . . . . . . . . . . . . . . . . . . . . . 2-35 SalDDEStartServer. . . . . . . . . . . . . . . . . . . . . . . . . 2-36

SalDDEStartSession. . . . . . . . . . . . . . . . . . . . . . . . 2-36 SalDDEStopServer. . . . . . . . . . . . . . . .

. . . . . . . . . 2-37 SalDDEStopSession. . . . . . . . . . . . . . . . . . . . . . . . 2-37 SalDestroyWindow. . .

. . . . . . . . . . . . . . . . . . . . . . . 2-37 SalDisableWindow. . . . . . . . . . . . . . . . . . . . . . . . . . 2-38

SalDisableWindowAndLabel. . . . . . . . . . . . . . . . . . 2-38 SalDlgChooseColor. . . . . . . . . . . . . . .

. . . . . . . . . . 2-39 SalDlgChooseFont. . . . . . . . . . . . . . . . . . . . . . . . . . 2-39 SalDlgOpenFile. . . .

. . . . . . . . . . . . . . . . . . . . . . . . 2-40 SalDlgSaveFile. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-42

SalDragDropDisableDrop. . . . . . . . . . . . . . . . . . . . . 2-43 SalDragDropEnableDrop. . . . . . . . . . .

. . . . . . . . . . 2-44 SalDragDropGetSource. . . . . . . . . . . . . . . . . . . . . . 2-44

SalDragDropGetTarget. . . . . . . . . . . . . . . . . . . . . . 2-45 SalDragDropStart. . . . . . . . . . . . . . . . .

. . . . . . . . . . 2-45 SalDragDropStop. . . . . . . . . . . . . . . . . . . . . . . . . . . 2-45 SalDrawMenuBar. .

. . . . . . . . . . . . . . . . . . . . . . . . . 2-46 SalDropFilesAcceptFiles. . . . . . . . . . . . . . . . . . . . . 2-46

SalDropFilesQueryFiles. . . . . . . . . . . . . . . . . . . . . . 2-47 SalDropFilesQueryPoint. . . . . . . . . . .

. . . . . . . . . . . 2-48 SalEditCanCopyTo. . . . . . . . . . . . . . . . . . . . . . . . . . 2-48 SalEditCanCut. . . .

. . . . . . . . . . . . . . . . . . . . . . . . . 2-49 SalEditCanPaste. . . . . . . . . . . . . . . . . . . . . . . . . . . 2-49

SalEditCanPasteFrom. . . . . . . . . . . . . . . . . . . . . . . . 2-49 SalEditCanUndo. . . . . . . . . . . . . . . . .

. . . . . . . . . . . 2-50 SalEditClear. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-50 SalEditCopy. . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . 2-50 . . . . . . . . . . . . . . 2-49 SalEditCanPaste. . . . . . . . . . . . . . .

. . . . . . . . . . . . 2-49 SalEditCanPasteFrom. . . . . . . . . . . . . . . . . . . . . . . . 2-49 SalEditCanUndo.

. . . . . . . . . . . . . . . . . . . . . . . . . . . 2-50 SalEditClear. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-50

SalEditCopy. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-50 . . . . . . . . . . . . . . 2-49

SalEditCanPaste. . . . . . . . . . . . . . . . . . . . . . . . . . . 2-49 SalEditCanPasteFrom. . . . . . . . . . . . .

. . . . . . . . . . . 2-49 SalEditCanUndo. . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-50 SalEditClear. . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . 2-50 SalEditCopy. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-50

vi Centura Generador de Referencia de funciones


SalEditCopyString. . . . . . . . . . . . . . . . . . . . . . . . . . 2-51 SalEditCopyTo. . . . . . . . . . . . . . . . . . .

. . . . . . . . . . 2-51 SalEditCut. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-51 SalEditPaste. . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . 2-52 SalEditPasteFrom. . . . . . . . . . . . . . . . . . . . . . . . . . . 2-52

SalEditPasteString. . . . . . . . . . . . . . . . . . . . . . . . . . 2-53 SalEditUndo. . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . 2-53 SalEnableWindow. . . . . . . . . . . . . . . . . . . . . . . . . . 2-54

SalEnableWindowAndLabel. . . . . . . . . . . . . . . . . . . 2-54 SalEndDialog. . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . 2-54 SalFileClose. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-55 SalFileCopy. . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . 2-55 SalFileCreateDirectory. . . . . . . . . . . . . . . . . . . . . . . 2-56

SalFileGetC. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-56 SalFileGetChar. . . . . . . . . . . . . . . . . . .

. . . . . . . . . . 2-57 SalFileGetCurrentDirectory. . . . . . . . . . . . . . . . . . . 2-57 SalFileGetDateTime.

. . . . . . . . . . . . . . . . . . . . . . . . 2-57 SalFileGetDrive. . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-58

SalFileGetStr. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-58 SalFileOpen. . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . 2-59 SalFileOpenExt. . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-59 SalFilePutC. . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . 2-60 SalFilePutChar. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-60

SalFilePutStr. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-61 SalFileRead. . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . 2-61 SalFileRemoveDirectory. . . . . . . . . . . . . . . . . . . . . 2-62 SalFileSeek. . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . 2-62 SalFileSetCurrentDirectory. . . . . . . . . . . . . . . . . . . . 2-63

SalFileSetDateTime. . . . . . . . . . . . . . . . . . . . . . . . . 2-63 SalFileSetDrive. . . . . . . . . . . . . . . . . . .

. . . . . . . . . 2-63 SalFileTell. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-64 SalFileWrite. . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . 2-64 . . . . . . . . . . 2-61 SalFileRead. . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . 2-61 SalFileRemoveDirectory. . . . . . . . . . . . . . . . . . . . . 2-62 SalFileSeek. . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . 2-62 SalFileSetCurrentDirectory. . . . . . . . . . . . . . . . . . . . 2-63

SalFileSetDateTime. . . . . . . . . . . . . . . . . . . . . . . . . 2-63 SalFileSetDrive. . . . . . . . . . . . . . . . . . .

. . . . . . . . . 2-63 SalFileTell. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-64 SalFileWrite. . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . 2-64 . . . . . . . . . . 2-61 SalFileRead. . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . 2-61 SalFileRemoveDirectory. . . . . . . . . . . . . . . . . . . . . 2-62 SalFileSeek. . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . 2-62 SalFileSetCurrentDirectory. . . . . . . . . . . . . . . . . . . . 2-63

SalFileSetDateTime. . . . . . . . . . . . . . . . . . . . . . . . . 2-63 SalFileSetDrive. . . . . . . . . . . . . . . . . . .

. . . . . . . . . 2-63 SalFileTell. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-64 SalFileWrite. . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . 2-64 . . . . . . . . . . . . . . . . . 2-62 SalFileSetCurrentDirectory. . . . . .

. . . . . . . . . . . . . . 2-63 SalFileSetDateTime. . . . . . . . . . . . . . . . . . . . . . . . . 2-63

SalFileSetDrive. . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-63 SalFileTell. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-64 SalFileWrite. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-64 .

Centura Generador de Referencia de funciones vii


Contenido

SalFmtFieldToStr. . . . . . . . . . . . . . . . . . . . . . . . . . . 2-64 SalFmtFormatDateTime. . . . . . . . . . . .

. . . . . . . . . . 2-65 SalFmtFormatNumber. . . . . . . . . . . . . . . . . . . . . . . 2-66 SalFmtGetFormat. . .

. . . . . . . . . . . . . . . . . . . . . . . . 2-66 SalFmtGetInputMask. . . . . . . . . . . . . . . . . . . . . . . . 2-67

SalFmtGetPicture. . . . . . . . . . . . . . . . . . . . . . . . . . . 2-68 SalFmtIsValidField. . . . . . . . . . . . . . . .

. . . . . . . . . . 2-68 SalFmtIsValidInputMask. . . . . . . . . . . . . . . . . . . . . . 2-69

SalFmtIsValidPicture. . . . . . . . . . . . . . . . . . . . . . . . 2-69 SalFmtKeepMask. . . . . . . . . . . . . . . . .

. . . . . . . . . . 2-70 SalFmtSetFormat. . . . . . . . . . . . . . . . . . . . . . . . . . . 2-71

SalFmtSetInputMask. . . . . . . . . . . . . . . . . . . . . . . . . 2-72 SalFmtSetPicture. . . . . . . . . . . . . . . .

. . . . . . . . . . . 2-72 SalFmtStrToField. . . . . . . . . . . . . . . . . . . . . . . . . . . 2-73

SalFmtUnmaskInput. . . . . . . . . . . . . . . . . . . . . . . . . 2-73 SalFmtValidateField. . . . . . . . . . . . . . .

. . . . . . . . . . 2-74 SalFontGet. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-74 SalFontGetNames. .

. . . . . . . . . . . . . . . . . . . . . . . . . 2-75 SalFontGetSizes. . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-75

SalFontSet. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-76 SalFormGetParmNum. . . . . . . . . . . . .

. . . . . . . . . . 2-76 SalFormUnitsToPixels. . . . . . . . . . . . . . . . . . . . . . . . 2-77 SalGetDataType. . .

. . . . . . . . . . . . . . . . . . . . . . . . . 2-77 SalGetDefButton. . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-78

SalGetFirstChild. . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-78 SalGetFocus. . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . 2-79 SalGetItemName. . . . . . . . . . . . . . . . . . . . . . . . . . . 2-79

SalGetMaxDataLength. . . . . . . . . . . . . . . . . . . . . . . 2-79 SalGetNextChild. . . . . . . . . . . . . . . . .

. . . . . . . . . . . 2-80 SalGetProfileInt. . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-80 SalGetProfileString.

. . . . . . . . . . . . . . . . . . . . . . . . . 2-81 SalGetType. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-82

2-78 SalGetFocus. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-79 SalGetItemName. . . . . . . . . . . . . .

. . . . . . . . . . . . . 2-79 SalGetMaxDataLength. . . . . . . . . . . . . . . . . . . . . . . 2-79

SalGetNextChild. . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-80 SalGetProfileInt. . . . . . . . . . . . . . . . . .

. . . . . . . . . . 2-80 SalGetProfileString. . . . . . . . . . . . . . . . . . . . . . . . . . 2-81 SalGetType. . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . 2-82 2-78 SalGetFocus. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

2-79 SalGetItemName. . . . . . . . . . . . . . . . . . . . . . . . . . . 2-79 SalGetMaxDataLength. . . . . . . . .

. . . . . . . . . . . . . . 2-79 SalGetNextChild. . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-80

SalGetProfileInt. . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-80 SalGetProfileString. . . . . . . . . . . . . . . .

. . . . . . . . . . 2-81 SalGetType. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-82 . . . . . . . . . . . . . . . . .

. . . . 2-80 SalGetProfileString. . . . . . . . . . . . . . . . . . . . . . . . . . 2-81 SalGetType. . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . 2-82 . . . . . . . . . . . . . . . . . . . . . 2-80 SalGetProfileString. . . . . . . . . . . . . .

. . . . . . . . . . . . 2-81 SalGetType. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-82

viii Centura Generador de Referencia de funciones


SalGetVersion. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-82 SalGetWindowLabelText. . . . . . . . . . . .

. . . . . . . . . 2-83 SalGetWindowLoc. . . . . . . . . . . . . . . . . . . . . . . . . . 2-83 SalGetWindowSize. . .

. . . . . . . . . . . . . . . . . . . . . . 2-84 SalGetWindowState. . . . . . . . . . . . . . . . . . . . . . . . . 2-84

SalGetWindowText. . . . . . . . . . . . . . . . . . . . . . . . . 2-84 SalHideWindow. . . . . . . . . . . . . . . . . . .

. . . . . . . . . 2-85 SalHideWindowAndLabel. . . . . . . . . . . . . . . . . . . . . 2-85

SalHStringToNumber. . . . . . . . . . . . . . . . . . . . . . . . 2-86 SalInvalidateWindow. . . . . . . . . . . . . .

. . . . . . . . . . 2-86 SalIsButtonChecked. . . . . . . . . . . . . . . . . . . . . . . . . 2-86 SalIsNull. . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . 2-87 SalIsValidDateTime. . . . . . . . . . . . . . . . . . . . . . . . . 2-87

SalIsValidDecimal. . . . . . . . . . . . . . . . . . . . . . . . . . 2-87 SalIsValidInteger. . . . . . . . . . . . . . . . . .

. . . . . . . . . 2-88 SalIsValidNumber. . . . . . . . . . . . . . . . . . . . . . . . . . 2-89 SalIsWindowEnabled.

. . . . . . . . . . . . . . . . . . . . . . . 2-89 SalIsWindowVisible. . . . . . . . . . . . . . . . . . . . . . . . . 2-89

SalListAdd. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-90 SalListClear. . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . 2-90 SalListDelete. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-91 SalListFiles. . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . 2-91 SalListGetMultiSelect. . . . . . . . . . . . . . . . . . . . . . . . 2-92

SalListInsert. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-92 SalListPopulate. . . . . . . . . . . . . . . . . . .

. . . . . . . . . 2-92 SalListQueryCount. . . . . . . . . . . . . . . . . . . . . . . . . . 2-93 SalListQueryFile. . . . .

. . . . . . . . . . . . . . . . . . . . . . . 2-94 SalListQueryMultiCount. . . . . . . . . . . . . . . . . . . . . . 2-94

SalListQuerySelection. . . . . . . . . . . . . . . . . . . . . . . . 2-94 SalListQueryState. . . . . . . . . . . . . . . .

. . . . . . . . . . 2-95 SalListQueryText o SalListQueryTextX. . . . . . . . . 2-95

SalListQueryTextLength. . . . . . . . . . . . . . . . . . . . . . 2-96 . . 2-92 SalListQueryCount. . . . . . . . .

. . . . . . . . . . . . . . . . . 2-93 SalListQueryFile. . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-94

SalListQueryMultiCount. . . . . . . . . . . . . . . . . . . . . . 2-94 SalListQuerySelection. . . . . . . . . . . . .

. . . . . . . . . . . 2-94 SalListQueryState. . . . . . . . . . . . . . . . . . . . . . . . . . 2-95 SalListQueryText o

SalListQueryTextX. . . . . . . . . 2-95 SalListQueryTextLength. . . . . . . . . . . . . . . . . . . . . . 2-96 . .

2-92 SalListQueryCount. . . . . . . . . . . . . . . . . . . . . . . . . . 2-93 SalListQueryFile. . . . . . . . . . . . . .

. . . . . . . . . . . . . . 2-94 SalListQueryMultiCount. . . . . . . . . . . . . . . . . . . . . . 2-94

SalListQuerySelection. . . . . . . . . . . . . . . . . . . . . . . . 2-94 SalListQueryState. . . . . . . . . . . . . . . .

. . . . . . . . . . 2-95 SalListQueryText o SalListQueryTextX. . . . . . . . . 2-95

SalListQueryTextLength. . . . . . . . . . . . . . . . . . . . . . 2-96 . . . . . . . . . . . . . . . . . . 2-95

SalListQueryText o SalListQueryTextX. . . . . . . . . 2-95 SalListQueryTextLength. . . . . . . . . . . . .

. . . . . . . . . 2-96 . . . . . . . . . . . . . . . . . . 2-95 SalListQueryText o SalListQueryTextX. . . . . . . . .

2-95 SalListQueryTextLength. . . . . . . . . . . . . . . . . . . . . . 2-96

Centura Generador de Referencia de funciones ix


Contenido

SalListQueryTextX. . . . . . . . . . . . . . . . . . . . . . . . . . 2-96 SalListRedraw. . . . . . . . . . . . . . . . . . .

. . . . . . . . . . 2-96 SalListSelectString. . . . . . . . . . . . . . . . . . . . . . . . . . 2-97

SalListSetMultiSelect. . . . . . . . . . . . . . . . . . . . . . . . 2-97 SalListSetSelect. . . . . . . . . . . . . . . . . .

. . . . . . . . . . 2-98 SalListSetTabs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-98 SalLoadApp. . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . 2-99 SalLoadAppAndWait. . . . . . . . . . . . . . . . . . . . . . . . 2-99

SalMapEnterToTab. . . . . . . . . . . . . . . . . . . . . . . . 2-101 SalMDIArrangeIcons. . . . . . . . . . . . . . .

. . . . . . . . 2-101 SalMDICascade. . . . . . . . . . . . . . . . . . . . . . . . . . . 2-101 SalMDITile. . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . 2-102 SalMessageBeep. . . . . . . . . . . . . . . . . . . . . . . . . . 2-102

SalMessageBox. . . . . . . . . . . . . . . . . . . . . . . . . . . 2-103 SalModalDialog. . . . . . . . . . . . . . . . . .

. . . . . . . . . . 2-105 SalModalDialogFromStr. . . . . . . . . . . . . . . . . . . . . 2-106 SalMoveWindow. .

. . . . . . . . . . . . . . . . . . . . . . . . 2-106 SalNumberAbs. . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-107

SalNumberArcCos. . . . . . . . . . . . . . . . . . . . . . . . . 2-107 SalNumberArcSin. . . . . . . . . . . . . . . . .

. . . . . . . . . 2-107 SalNumberArcTan. . . . . . . . . . . . . . . . . . . . . . . . . . 2-108

SalNumberArcTan2. . . . . . . . . . . . . . . . . . . . . . . . 2-108 SalNumberCos. . . . . . . . . . . . . . . . . . .

. . . . . . . . . 2-108 SalNumberCosH. . . . . . . . . . . . . . . . . . . . . . . . . . 2-109 SalNumberExponent.

. . . . . . . . . . . . . . . . . . . . . . 2-109 SalNumberHigh. . . . . . . . . . . . . . . . . . . . . . . . . . . 2-109

SalNumberHypot. . . . . . . . . . . . . . . . . . . . . . . . . . 2-110 SalNumberLog. . . . . . . . . . . . . . . . . . .

. . . . . . . . . 2-110 SalNumberLogBase10. . . . . . . . . . . . . . . . . . . . . . 2-110 SalNumberLow. . . .

. . . . . . . . . . . . . . . . . . . . . . . . 2-111 SalNumberMax. . . . . . . . . . . . . . . . . . . . . . . . . . . 2-111

SalNumberMin. . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-111 . . . . . . . . . 2-109 SalNumberHypot. . .

. . . . . . . . . . . . . . . . . . . . . . . 2-110 SalNumberLog. . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-110

SalNumberLogBase10. . . . . . . . . . . . . . . . . . . . . . 2-110 SalNumberLow. . . . . . . . . . . . . . . . . . .

. . . . . . . . . 2-111 SalNumberMax. . . . . . . . . . . . . . . . . . . . . . . . . . . 2-111 SalNumberMin. . . . . .

. . . . . . . . . . . . . . . . . . . . . . 2-111 . . . . . . . . . 2-109 SalNumberHypot. . . . . . . . . . . . . . . . . . . . .

. . . . . 2-110 SalNumberLog. . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-110 SalNumberLogBase10. . .

. . . . . . . . . . . . . . . . . . . 2-110 SalNumberLow. . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-111

SalNumberMax. . . . . . . . . . . . . . . . . . . . . . . . . . . 2-111 SalNumberMin. . . . . . . . . . . . . . . . . . . .

. . . . . . . . 2-111 2-111 SalNumberMin. . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-111 2-111

SalNumberMin. . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-111

X Centura Generador de Referencia de funciones


SalNumberMod. . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-112 SalNumberPi. . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . 2-112 SalNumberPower. . . . . . . . . . . . . . . . . . . . . . . . . . 2-112

SalNumberRandInit. . . . . . . . . . . . . . . . . . . . . . . . 2-113 SalNumberRandom. . . . . . . . . . . . . . .

. . . . . . . . . . 2-113 SalNumberRound. . . . . . . . . . . . . . . . . . . . . . . . . . 2-114 SalNumberSin. . . .

. . . . . . . . . . . . . . . . . . . . . . . . 2-114 SalNumberSinH. . . . . . . . . . . . . . . . . . . . . . . . . . . 2-114

SalNumberSqrt. . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-115 SalNumberTan. . . . . . . . . . . . . . . . . . .

. . . . . . . . . 2-115 SalNumberTanH. . . . . . . . . . . . . . . . . . . . . . . . . . 2-115 SalNumberToChar. .

. . . . . . . . . . . . . . . . . . . . . . . 2-116 SalNumberToHString. . . . . . . . . . . . . . . . . . . . . . . 2-116

SalNumberToStr. . . . . . . . . . . . . . . . . . . . . . . . . . 2-116 SalNumberToStrX. . . . . . . . . . . . . . . . .

. . . . . . . . 2-117 SalNumberToWindowHandle. . . . . . . . . . . . . . . . . 2-117 SalNumberTruncate. .

. . . . . . . . . . . . . . . . . . . . . . 2-118 SalParentWindow. . . . . . . . . . . . . . . . . . . . . . . . . . 2-118

SalPicClear. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-119 SalPicGetDescription. . . . . . . . . . . . . . .

. . . . . . . . 2-119 SalPicGetString. . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-120 SalPicSet. . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . 2-120 SalPicSetFile. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-121

SalPicSetFit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-121 SalPicSetString. . . . . . . . . . . . . . . . . . .

. . . . . . . . . 2-122 SalPixelsToFormUnits. . . . . . . . . . . . . . . . . . . . . . . 2-123 SalPostMsg. . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . 2-123 SalPrtExtractRect. . . . . . . . . . . . . . . . . . . . . . . . . . 2-124

SalPrtGetDefault. . . . . . . . . . . . . . . . . . . . . . . . . . 2-124 SalPrtGetParmNum. . . . . . . . . . . . . . . .

. . . . . . . . 2-125 SalPrtPrintForm. . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-125 SalPrtSetDefault. . . .

. . . . . . . . . . . . . . . . . . . . . . . 2-126 . . . . . . . . . . . . . . . . . . . . . 2-123 SalPostMsg. . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . 2-123 SalPrtExtractRect. . . . . . . . . . . . . . . . . . . . . . . . . . 2-124

SalPrtGetDefault. . . . . . . . . . . . . . . . . . . . . . . . . . 2-124 SalPrtGetParmNum. . . . . . . . . . . . . . . .

. . . . . . . . 2-125 SalPrtPrintForm. . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-125 SalPrtSetDefault. . . .

. . . . . . . . . . . . . . . . . . . . . . . 2-126 . . . . . . . . . . . . . . . . . . . . . 2-123 SalPostMsg. . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . 2-123 SalPrtExtractRect. . . . . . . . . . . . . . . . . . . . . . . . . . 2-124

SalPrtGetDefault. . . . . . . . . . . . . . . . . . . . . . . . . . 2-124 SalPrtGetParmNum. . . . . . . . . . . . . . . .

. . . . . . . . 2-125 SalPrtPrintForm. . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-125 SalPrtSetDefault. . . .

. . . . . . . . . . . . . . . . . . . . . . . 2-126 2-125 SalPrtPrintForm. . . . . . . . . . . . . . . . . . . . . . . . . . . .

2-125 SalPrtSetDefault. . . . . . . . . . . . . . . . . . . . . . . . . . . 2-126 2-125 SalPrtPrintForm. . . . . . . .

. . . . . . . . . . . . . . . . . . . . 2-125 SalPrtSetDefault. . . . . . . . . . . . . . . . . . . . . . . . . . . 2-126

Centura Generador de Referencia de funciones xi


SalPrtSetParmDefaults. . . . . . . . . . . . . . . . . . . . . 2-126 SalPrtSetParmNum. . . . . . . . . . . . . . .

. . . . . . . . . . 2-127 SalPrtSetup. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-127 SalQueryFieldEdit.

. . . . . . . . . . . . . . . . . . . . . . . . 2-128 SalQuit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-128

SalReportClose. . . . . . . . . . . . . . . . . . . . . . . . . . . 2-129 SalReportCmd. . . . . . . . . . . . . . . . . . .

. . . . . . . . . 2-129 SalReportCreate. . . . . . . . . . . . . . . . . . . . . . . . . . 2-129

SalReportDlgOptions. . . . . . . . . . . . . . . . . . . . . . . 2-130 SalReportGetDateTimeVar. . . . . . . . .

. . . . . . . . . 2-131 SalReportGetNumberVar. . . . . . . . . . . . . . . . . . . . 2-131

SalReportGetObjectVar. . . . . . . . . . . . . . . . . . . . . 2-132 SalReportGetStringVar. . . . . . . . . . . .

. . . . . . . . . 2-132 SalReportPrint. . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-133

SalReportPrintToFile. . . . . . . . . . . . . . . . . . . . . . . 2-134 SalReportReset. . . . . . . . . . . . . . . . . .

. . . . . . . . . 2-136 SalReportSetDateTimeVar. . . . . . . . . . . . . . . . . . . 2-136

SalReportSetNumberVar. . . . . . . . . . . . . . . . . . . . 2-137 SalReportSetObjectVar. . . . . . . . . . .

. . . . . . . . . . 2-137 SalReportSetStringVar. . . . . . . . . . . . . . . . . . . . . . 2-138

SalReportTableCreate. . . . . . . . . . . . . . . . . . . . . . 2-138 SalReportTablePrint. . . . . . . . . . . . . .

. . . . . . . . . . 2-139 SalReportTableView. . . . . . . . . . . . . . . . . . . . . . . . 2-140 SalReportView. . .

. . . . . . . . . . . . . . . . . . . . . . . . . 2-140 SalScrollGetPos. . . . . . . . . . . . . . . . . . . . . . . . . . . 2-142

SalScrollGetRange. . . . . . . . . . . . . . . . . . . . . . . . . 2-142 SalScrollSetPos. . . . . . . . . . . . . . . . .

. . . . . . . . . . 2-143 SalScrollSetRange. . . . . . . . . . . . . . . . . . . . . . . . . 2-143

SalSendClassMessage. . . . . . . . . . . . . . . . . . . . . 2-144 SalSendClassMessageNamed. . . . . .

. . . . . . . . . . 2-144 SalSendMsg. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-145

SalSendMsgToChildren. . . . . . . . . . . . . . . . . . . . . 2-145 . . . 2-143 SalScrollSetRange. . . . . . .

. . . . . . . . . . . . . . . . . . 2-143 SalSendClassMessage. . . . . . . . . . . . . . . . . . . . . 2-144

SalSendClassMessageNamed. . . . . . . . . . . . . . . . 2-144 SalSendMsg. . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . 2-145 SalSendMsgToChildren. . . . . . . . . . . . . . . . . . . . . 2-145 . . . 2-143

SalScrollSetRange. . . . . . . . . . . . . . . . . . . . . . . . . 2-143 SalSendClassMessage. . . . . . . . . . .

. . . . . . . . . . 2-144 SalSendClassMessageNamed. . . . . . . . . . . . . . . . 2-144 SalSendMsg. . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . 2-145 SalSendMsgToChildren. . . . . . . . . . . . . . . . . . . . .

2-145
SalSendValidateMsg. . . . . . . . . . . . . . . . . . . . . . . . 2-146 SalSetDefButton. . . . . . . . . . . . . . . . .

. . . . . . . . . . 2-146 SalSetFieldEdit. . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-147 SalSetFocus. . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . 2-147 SalSetMaxDataLength. . . . . . . . . . . . . . . . . . . . . . 2-148

SalSetProfileString. . . . . . . . . . . . . . . . . . . . . . . . . 2-148 SalSetWindowLabelText. . . . . . . . . . .

. . . . . . . . . 2-149 SalSetWindowLoc. . . . . . . . . . . . . . . . . . . . . . . . . 2-149 SalSetWindowSize. .

. . . . . . . . . . . . . . . . . . . . . . . 2-149 SalSetWindowText. . . . . . . . . . . . . . . . . . . . . . . . . 2-150

SalShowWindow. . . . . . . . . . . . . . . . . . . . . . . . . . . 2-150 SalShowWindowAndLabel. . . . . . . . .

. . . . . . . . . . 2-151 SalStatusGetText. . . . . . . . . . . . . . . . . . . . . . . . . . 2-151 SalStatusSetText. .

. . . . . . . . . . . . . . . . . . . . . . . . 2-152 SalStatusSetVisible. . . . . . . . . . . . . . . . . . . . . . . . 2-152

SalStrCompress. . . . . . . . . . . . . . . . . . . . . . . . . . . 2-152 SalStrFirstC. . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . 2-153 SalStrGetBufferLength. . . . . . . . . . . . . . . . . . . . . . 2-153

SalStrIsValidCurrency. . . . . . . . . . . . . . . . . . . . . . . 2-154 SalStrIsValidDateTime. . . . . . . . . . . .

. . . . . . . . . . 2-154 SalStrIsValidNumber. . . . . . . . . . . . . . . . . . . . . . . 2-155 SalStrLeft. . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . 2-155 SalStrLeftX. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-156

SalStrLength. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-156 SalStrLop. . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . 2-157 SalStrLower. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-157 SalStrMid. . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . 2-158 SalStrProper. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-158

SalStrRepeat y SalStrRepeatX. . . . . . . . . . . . . 2-159 SalStrReplace y SalStrReplaceX. . . . . . .

. . . . . 2-159 SalStrRight y SalStrRightX. . . . . . . . . . . . . . . . 2-160 SalStrScan. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . 2-161 . . . . . . . . . . . . . . . . . . . . 2-157 SalStrMid. . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . 2-158 SalStrProper. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-158 SalStrRepeat y

SalStrRepeatX. . . . . . . . . . . . . 2-159 SalStrReplace y SalStrReplaceX. . . . . . . . . . . . 2-159

SalStrRight y SalStrRightX. . . . . . . . . . . . . . . . 2-160 SalStrScan. . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . 2-161 . . . . . . . . . . . . . . . . . . . . 2-157 SalStrMid. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

2-158 SalStrProper. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-158 SalStrRepeat y SalStrRepeatX.

. . . . . . . . . . . . 2-159 SalStrReplace y SalStrReplaceX. . . . . . . . . . . . 2-159 SalStrRight y

SalStrRightX. . . . . . . . . . . . . . . . 2-160 SalStrScan. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-161

. . . . . . . . 2-160 SalStrScan. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-161 . . . . . . . . 2-160

SalStrScan. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-161

Centura Generador de Referencia de funciones xiii


Contenido

SalStrSetBufferLength. . . . . . . . . . . . . . . . . . . . . . 2-162 SalStrToDate. . . . . . . . . . . . . . . . . . . .

. . . . . . . . . 2-162 SalStrTokenize. . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-163 SalStrToNumber. . .

. . . . . . . . . . . . . . . . . . . . . . . 2-163 SalStrTrim. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-164

SalStrTrimX. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-164 SalStrUncompress. . . . . . . . . . . . . . . .

. . . . . . . . . 2-165 SalStrUpper. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-165 SalStrUpperX. . . . . .

. . . . . . . . . . . . . . . . . . . . . . . 2-165 SalTBarSetVisible. . . . . . . . . . . . . . . . . . . . . . . . . 2-166

SalTblAnyRows. . . . . . . . . . . . . . . . . . . . . . . . . . . 2-166 SalTblClearSelection. . . . . . . . . . . . . .

. . . . . . . . . 2-167 SalTblColumnAverage. . . . . . . . . . . . . . . . . . . . . . 2-167 SalTblColumnSum. .

. . . . . . . . . . . . . . . . . . . . . . . 2-167 SalTblCopyRows. . . . . . . . . . . . . . . . . . . . . . . . . . 2-168

SalTblCreateColumn. . . . . . . . . . . . . . . . . . . . . . . 2-169 SalTblDefineCheckBoxColumn. . . . . . .

. . . . . . . . 2-169 SalTblDefineDropDownListColumn. . . . . . . . . . . . 2-170

SalTblDefinePopupEditColumn. . . . . . . . . . . . . . . . 2-170 SalTblDefineRowHeader. . . . . . . . . .

. . . . . . . . . . 2-171 SalTblDefineSplitWindow. . . . . . . . . . . . . . . . . . . . 2-171 SalTblDeleteRow. .

. . . . . . . . . . . . . . . . . . . . . . . . 2-172 SalTblDeleteSelected. . . . . . . . . . . . . . . . . . . . . . . 2-172

SalTblDestroyColumns. . . . . . . . . . . . . . . . . . . . . 2-173 SalTblDoDeletes. . . . . . . . . . . . . . . . . .

. . . . . . . . 2-173 SalTblDoInserts. . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-174 SalTblDoUpdates. . .

. . . . . . . . . . . . . . . . . . . . . . . 2-175 SalTblFetchRow. . . . . . . . . . . . . . . . . . . . . . . . . . . 2-175

SalTblFindNextRow. . . . . . . . . . . . . . . . . . . . . . . . 2-176 SalTblFindPrevRow. . . . . . . . . . . . . . .

. . . . . . . . . 2-177 SalTblGetColumnText. . . . . . . . . . . . . . . . . . . . . . 2-178

SalTblGetColumnTitle. . . . . . . . . . . . . . . . . . . . . . 2-178 . . . 2-174 SalTblDoUpdates. . . . . . . . .

. . . . . . . . . . . . . . . . . 2-175 SalTblFetchRow. . . . . . . . . . . . . . . . . . . . . . . . . . . 2-175

SalTblFindNextRow. . . . . . . . . . . . . . . . . . . . . . . . 2-176 SalTblFindPrevRow. . . . . . . . . . . . . . .

. . . . . . . . . 2-177 SalTblGetColumnText. . . . . . . . . . . . . . . . . . . . . . 2-178

SalTblGetColumnTitle. . . . . . . . . . . . . . . . . . . . . . 2-178 . . . 2-174 SalTblDoUpdates. . . . . . . . .

. . . . . . . . . . . . . . . . . 2-175 SalTblFetchRow. . . . . . . . . . . . . . . . . . . . . . . . . . . 2-175

SalTblFindNextRow. . . . . . . . . . . . . . . . . . . . . . . . 2-176 SalTblFindPrevRow. . . . . . . . . . . . . . .

. . . . . . . . . 2-177 SalTblGetColumnText. . . . . . . . . . . . . . . . . . . . . . 2-178

SalTblGetColumnTitle. . . . . . . . . . . . . . . . . . . . . . 2-178 . . . . . . . . . . . . . . . 2-178 . . . . . . . . . . .

. . . . 2-178

xiv Centura Generador de Referencia de funciones


SalTblGetColumnWindow. . . . . . . . . . . . . . . . . . . 2-178 SalTblInsertRow. . . . . . . . . . . . . . . . . .

. . . . . . . . . 2-179 SalTblKillEdit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-179 SalTblKillFocus. . . . .

. . . . . . . . . . . . . . . . . . . . . . 2-180 SalTblPasteRows. . . . . . . . . . . . . . . . . . . . . . . . . . 2-180

SalTblPopulate. . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-180 SalTblQueryCheckBoxColumn. . . . . .

. . . . . . . . . 2-182 SalTblQueryColumnCellType. . . . . . . . . . . . . . . . . 2-182

SalTblQueryColumnFlags. . . . . . . . . . . . . . . . . . . . 2-183 SalTblQueryColumnID. . . . . . . . . . . .

. . . . . . . . . . 2-183 SalTblQueryColumnPos. . . . . . . . . . . . . . . . . . . . . 2-183

SalTblQueryColumnWidth. . . . . . . . . . . . . . . . . . . 2-184 SalTblQueryContext. . . . . . . . . . . . . . .

. . . . . . . . . 2-184 SalTblQueryDropDownListColumn. . . . . . . . . . . . 2-184 SalTblQueryFocus. .

. . . . . . . . . . . . . . . . . . . . . . . 2-185 SalTblQueryLinesPerRow. . . . . . . . . . . . . . . . . . . . 2-185

SalTblQueryLockedColumns. . . . . . . . . . . . . . . . . 2-186 SalTblQueryPopupEditColumn. . . . . . .

. . . . . . . . . 2-186 SalTblQueryRowFlags. . . . . . . . . . . . . . . . . . . . . . 2-187

SalTblQueryRowHeader. . . . . . . . . . . . . . . . . . . . 2-187 SalTblQueryScroll 2-185

SalTblQueryLockedColumns. . . . . . . . . . . . . . . . . 2-186 SalTblQueryPopupEditColumn. . . . . . .

. . . . . . . . . 2-186 SalTblQueryRowFlags. . . . . . . . . . . . . . . . . . . . . . 2-187

SalTblQueryRowHeader. . . . . . . . . . . . . . . . . . . . 2-187 SalTblQueryScroll 2-185

SalTblQueryLockedColumns. . . . . . . . . . . . . . . . . 2-186 SalTblQueryPopupEditColumn. . . . . . .

. . . . . . . . . 2-186 SalTblQueryRowFlags. . . . . . . . . . . . . . . . . . . . . . 2-187

SalTblQueryRowHeader. . . . . . . . . . . . . . . . . . . . 2-187 SalTblQueryScroll

. . . . . . . . . . . . . . . . . . . . . . . . . 2-188

SalTblQuerySplitWindow. . . . . . . . . . . . . . . . . . . . 2-188

SalTblQueryTableFlags. . . . . . . . . . . . . . . . . . . . . 2-189

SalTblQueryVisibleRange. . . . . . . . . . . . . . . . . . . 2-189 SalTblReset. . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . 2-189 SalTblScroll. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . 2-190 SalTblSetCellTextColor. . . . . . . . . . . . . . . . . .

. . . 2-190 SalTblSetColumnFlags. . . . . . . . . . . . . . . . . . . . . 2-191

SalTblSetColumnPos. . . . . . . . . . . . . . . . . . . . . . . 2-191

SalTblSetColumnText. . . . . . . . . . . . . . . . . . . . . . 2-192

SalTblSetColumnTitle. . . . . . . . . . . . . . . . . . . . . . 2-192

SalTblSetColumnWidth. . . . . . . . . . . . . . . . . . . . . 2-192

Centura Generador de Referencia de funciones xv


Contenido

SalTblSetContext. . . . . . . . . . . . . . . . . . . . . . . . . . 2-193 SalTblSetFlagsAnyRows. . . . . . . . . . .

. . . . . . . . . 2-193 SalTblSetFocusCell. . . . . . . . . . . . . . . . . . . . . . . . 2-194 SalTblSetFocusRow.

. . . . . . . . . . . . . . . . . . . . . . . 2-195 SalTblSetLinesPerRow. . . . . . . . . . . . . . . . . . . . . 2-195

SalTblSetLockedColumns. . . . . . . . . . . . . . . . . . . 2-195 SalTblSetRange. . . . . . . . . . . . . . . . . .

. . . . . . . . . 2-196 SalTblSetRow. . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-196 SalTblSetRowFlags. .

. . . . . . . . . . . . . . . . . . . . . . 2-197 SalTblSetTableFlags. . . . . . . . . . . . . . . . . . . . . . . 2-197

SalTblSortRows. . . . . . . . . . . . . . . . . . . . . . . . . . . 2-198 SalTimerKill. . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . 2-198 SalTimerSet. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-199

SalTrackPopupMenu. . . . . . . . . . . . . . . . . . . . . . . . 2-199 SalUpdateWindow. . . . . . . . . . . . . . .

. . . . . . . . . . . 2-200 SalUseRegistry. . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-201 SalValidateSet. . .

. . . . . . . . . . . . . . . . . . . . . . . . . 2-201 SalWaitCursor. . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-202

SalWindowClassName. . . . . . . . . . . . . . . . . . . . . . 2-202 SalWindowGetProperty. . . . . . . . . . . .

. . . . . . . . . . 2-203 SalWindowHandleToNumber. . . . . . . . . . . . . . . . . 2-203

SalWindowIsDerivedFromClass. . . . . . . . . . . . . . . 2-203 SalWinHelp. . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . 2-204 SalYieldEnable. . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-205

SalYieldQueryState. . . . . . . . . . . . . . . . . . . . . . . . 2-205 SalYieldStartMessages. . . . . . . . . . . . .

. . . . . . . . 2-205 SalYieldStopMessages. . . . . . . . . . . . . . . . . . . . . . 2-206 SqlClearImmediate. .

. . . . . . . . . . . . . . . . . . . . . . . 2-206 SQLClose. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-206

SQLCommit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-207 SQLCONNECT. . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . 2-207 SqlContextClear. . . . . . . . . . . . . . . . . . . . . . . . . . . 2-208 . . . . . . . . . . . . .

. . 2-206 SqlClearImmediate. . . . . . . . . . . . . . . . . . . . . . . . . 2-206 SQLClose. . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . 2-206 SQLCommit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-207

SQLCONNECT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-207 SqlContextClear. . . . . . . . . . . . . .

. . . . . . . . . . . . . 2-208 . . . . . . . . . . . . . . . 2-206 SqlClearImmediate. . . . . . . . . . . . . . . . . . . . . . .

. . 2-206 SQLClose. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-206 SQLCommit. . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . 2-207 SQLCONNECT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-207

SqlContextClear. . . . . . . . . . . . . . . . . . . . . . . . . . . 2-208

xvi Centura Generador de Referencia de funciones


SqlContextSet. . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-208 SqlContextSetToForm. . . . . . . . . . . . . .

. . . . . . . . 2-209 SqlDirectoryByName. . . . . . . . . . . . . . . . . . . . . . . 2-209 SQLDISCONNECT. . .

. . . . . . . . . . . . . . . . . . . . . . . . . 2-209 SqlDropStoredCmd. . . . . . . . . . . . . . . . . . . . . . . . . 2-210

SqlError. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-210 SqlErrorText. . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . 2-210 SQLExecute. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-211 SqlExecutionPlan. .

. . . . . . . . . . . . . . . . . . . . . . . . 2-212 SqlExists. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-212

SqlExtractArgs. . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-212 SqlFetchNext. . . . . . . . . . . . . . . . . . . .

. . . . . . . . . 2-213 SqlFetchPrevious. . . . . . . . . . . . . . . . . . . . . . . . . . 2-214 SqlFetchRow. . . . . .

. . . . . . . . . . . . . . . . . . . . . . . 2-214 SqlGetError. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-214

SqlGetErrorPosition. . . . . . . . . . . . . . . . . . . . . . . . 2-215 SqlGetErrorText. . . . . . . . . . . . . . . . . .

. . . . . . . . . 2-215 SqlGetErrorTextX. . . . . . . . . . . . . . . . . . . . . . . . . . 2-216

SqlGetLastStatement. . . . . . . . . . . . . . . . . . . . . . . 2-216 SqlGetModifiedRows. . . . . . . . . . . . . .

. . . . . . . . . 2-217 SqlGetParameter. . . . . . . . . . . . . . . . . . . . . . . . . . 2-217 SqlGetParameterAll.

. . . . . . . . . . . . . . . . . . . . . . . 2-218 SqlGetResultSetCount. . . . . . . . . . . . . . . . . . . . . . 2-218

SqlGetRollbackFlag. . . . . . . . . . . . . . . . . . . . . . . . 2-219 SqlImmediate. . . . . . . . . . . . . . . . . . . .

. . . . . . . . . 2-219 SqlImmediateContext. . . . . . . . . . . . . . . . . . . . . . . 2-220 SQLOpen. . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . 2-221 SqlPLSQLCommand. . . . . . . . . . . . . . . . . . . . . . . . 2-221

SQLPREPARE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-223 SqlPrepareAndExecute. . . . . . . . .

. . . . . . . . . . . . 2-224 SQLRetrieve. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-225

SqlSetInMessage. . . . . . . . . . . . . . . . . . . . . . . . . . 2-225 2-219 SqlImmediateContext. . . . . . . . .

. . . . . . . . . . . . . . 2-220 SQLOpen. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-221

SqlPLSQLCommand. . . . . . . . . . . . . . . . . . . . . . . . 2-221 SQLPREPARE. . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . 2-223 SqlPrepareAndExecute. . . . . . . . . . . . . . . . . . . . . 2-224 SQLRetrieve. . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-225 SqlSetInMessage. . . . . . . . . . . . . . . . . . . . . . . . . .

2-225 2-219 SqlImmediateContext. . . . . . . . . . . . . . . . . . . . . . . 2-220 SQLOpen. . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . 2-221 SqlPLSQLCommand. . . . . . . . . . . . . . . . . . . . . . . . 2-221

SQLPREPARE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-223 SqlPrepareAndExecute. . . . . . . . .

. . . . . . . . . . . . 2-224 SQLRetrieve. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-225

SqlSetInMessage. . . . . . . . . . . . . . . . . . . . . . . . . . 2-225 . . . . . . . . . . . . . . . . . 2-224

SQLRetrieve. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-225 SqlSetInMessage. . . . . . . . . . . . . . . .

. . . . . . . . . . 2-225 . . . . . . . . . . . . . . . . . 2-224 SQLRetrieve. . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . 2-225 SqlSetInMessage. . . . . . . . . . . . . . . . . . . . . . . . . . 2-225

Centura Generador de Referencia de funciones xvii


Contenido

SqlSetIsolationLevel. . . . . . . . . . . . . . . . . . . . . . . . 2-226 SqlSetLockTimeout. . . . . . . . . . . . . . .

. . . . . . . . . 2-227 SqlSetLongBindDatatype. . . . . . . . . . . . . . . . . . . . 2-227 SqlSetOutMessage.

. . . . . . . . . . . . . . . . . . . . . . . 2-228 SqlSetParameter. . . . . . . . . . . . . . . . . . . . . . . . . . 2-228

SqlSetParameterAll. . . . . . . . . . . . . . . . . . . . . . . . 2-229 SqlSetResultSet. . . . . . . . . . . . . . . . . .

. . . . . . . . . 2-229 SqlStore. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-230 VisArrayAppend. . . .

. . . . . . . . . . . . . . . . . . . . . . . 2-231 VisArrayCopy. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-232

VisArrayDeleteItem. . . . . . . . . . . . . . . . . . . . . . . . . 2-233 VisArrayFillDateTime. . . . . . . . . . . . . .

. . . . . . . . . 2-233 VisArrayFillNumber. . . . . . . . . . . . . . . . . . . . . . . . 2-234 VisArrayFillString. . . .

. . . . . . . . . . . . . . . . . . . . . . . 2-234 VisArrayFindDateTime. . . . . . . . . . . . . . . . . . . . . . 2-235

VisArrayFindNumber. . . . . . . . . . . . . . . . . . . . . . . 2-235 VisArrayFindString. . . . . . . . . . . . . . . .

. . . . . . . . . 2-236 VisArrayInsertItem. . . . . . . . . . . . . . . . . . . . . . . . . 2-237 VisArraySort. . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . 2-237 VisDebugAssert. . . . . . . . . . . . . . . . . . . . . . . . . . . 2-238

VisDebugBeginTime. . . . . . . . . . . . . . . . . . . . . . . 2-239 VisDebugEndTime. . . . . . . . . . . . . . . . .

. . . . . . . . 2-239 VisDebugGetFlags. . . . . . . . . . . . . . . . . . . . . . . . . 2-240 VisDebugSetFlags. . .

. . . . . . . . . . . . . . . . . . . . . . 2-240 VisDebugSetLevel. . . . . . . . . . . . . . . . . . . . . . . . . 2-241

VisDebugSetTime. . . . . . . . . . . . . . . . . . . . . . . . . 2-241 VisDebugString. . . . . . . . . . . . . . . . . . .

. . . . . . . . . 2-242 VisDosBuildFullName. . . . . . . . . . . . . . . . . . . . . . 2-242 VisDosEnumDirInfo. .

. . . . . . . . . . . . . . . . . . . . . . 2-243 VisDosEnumDirs. . . . . . . . . . . . . . . . . . . . . . . . . . . 2-244

VisDosEnumDrives. . . . . . . . . . . . . . . . . . . . . . . . 2-244 VisDosEnumFileInfo. . . . . . . . . . . . . . .

. . . . . . . . . 2-245 . . . . . . 2-241 VisDebugString. . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-242

VisDosBuildFullName. . . . . . . . . . . . . . . . . . . . . . 2-242 VisDosEnumDirInfo. . . . . . . . . . . . . . . .

. . . . . . . . 2-243 VisDosEnumDirs. . . . . . . . . . . . . . . . . . . . . . . . . . . 2-244 VisDosEnumDrives. .

. . . . . . . . . . . . . . . . . . . . . . 2-244 VisDosEnumFileInfo. . . . . . . . . . . . . . . . . . . . . . . . 2-245 . . . .

. . 2-241 VisDebugString. . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-242 VisDosBuildFullName. . . . . .

. . . . . . . . . . . . . . . . 2-242 VisDosEnumDirInfo. . . . . . . . . . . . . . . . . . . . . . . . 2-243

VisDosEnumDirs. . . . . . . . . . . . . . . . . . . . . . . . . . . 2-244 VisDosEnumDrives. . . . . . . . . . . . . . .

. . . . . . . . . 2-244 VisDosEnumFileInfo. . . . . . . . . . . . . . . . . . . . . . . . 2-245 2-244

VisDosEnumFileInfo. . . . . . . . . . . . . . . . . . . . . . . . 2-245 2-244 VisDosEnumFileInfo. . . . . . . . .

. . . . . . . . . . . . . . . 2-245

xviii Centura Generador de Referencia de funciones


VisDosEnumFiles. . . . . . . . . . . . . . . . . . . . . . . . . . 2-246 VisDosEnumNetConnections. . . . . . . .

. . . . . . . . . 2-247 VisDosEnumPath. . . . . . . . . . . . . . . . . . . . . . . . . . 2-248

VisDosEnumsShortDirInfo. . . . . . . . . . . . . . . . . . . 2-249 VisDosEnumsShortDirs. . . . . . . . . . . .

. . . . . . . . . 2-249 VisDosEnumsShortFileInfo. . . . . . . . . . . . . . . . . . 2-250

VisDosEnumsShortFiles. . . . . . . . . . . . . . . . . . . . . 2-251 VisDosExist. . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . 2-251 VisDosGetCurDir. . . . . . . . . . . . . . . . . . . . . . . . . . 2-252 VisDosGetDriveSize.

. . . . . . . . . . . . . . . . . . . . . . . 2-252 VisDosGetDriveType. . . . . . . . . . . . . . . . . . . . . . . 2-253

VisDosGetEnvString. . . . . . . . . . . . . . . . . . . . . . . 2-254 VisDosGetFlags. . . . . . . . . . . . . . . . . . .

. . . . . . . . 2-254 VisDosGetNetName. . . . . . . . . . . . . . . . . . . . . . . . 2-255 VisDosGetVersion. . .

. . . . . . . . . . . . . . . . . . . . . . . 2-255 VisDosGetVolumeLabel. . . . . . . . . . . . . . . . . . . . . 2-256

VisDosIsParent. . . . . . . . . . . . . . . . . . . . . . . . . . . 2-256 VisDosMakeAllDir. . . . . . . . . . . . . . . . .

. . . . . . . . 2-257 VisDosMakePath. . . . . . . . . . . . . . . . . . . . . . . . . . . 2-257 VisDosNetConnect. .

. . . . . . . . . . . . . . . . . . . . . . . 2-258 VisDosNetDisconnect. . . . . . . . . . . . . . . . . . . . . . 2-258

VisDosSetFlags. . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-259 VisDosSetVolumeLabel. . . . . . . . . . .

. . . . . . . . . . 2-259 VisDosSplitPath. . . . . . . . . . . . . . . . . . . . . . . . . . . 2-260 VisErrorRecovery. .

. . . . . . . . . . . . . . . . . . . . . . . . 2-261 VisFileAppend. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-261

VisFileClose. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-262 VisFileCopy. . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . 2-262 VisFileCreateTemp. . . . . . . . . . . . . . . . . . . . . . . . 2-263 VisFileDelete. . . . . .

. . . . . . . . . . . . . . . . . . . . . . . 2-263 VisFileExpand. . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-263

VisFileFind. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-264 . . . . . . . . . . . . . . . . . 2-262

VisFileCopy. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-262 VisFileCreateTemp. . . . . . . . . . . . . . .

. . . . . . . . . 2-263 VisFileDelete. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-263 VisFileExpand. . . . . .

. . . . . . . . . . . . . . . . . . . . . . 2-263 VisFileFind. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-264 . . . .

. . . . . . . . . . . . . 2-262 VisFileCopy. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-262

VisFileCreateTemp. . . . . . . . . . . . . . . . . . . . . . . . 2-263 VisFileDelete. . . . . . . . . . . . . . . . . . . . .

. . . . . . . . 2-263 VisFileExpand. . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-263 VisFileFind. . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . 2-264

Centura Generador de Referencia de funciones xix


Contenido

VisFileGetAttribute. . . . . . . . . . . . . . . . . . . . . . . . . 2-264 VisFileGetSize. . . . . . . . . . . . . . . . . . .

. . . . . . . . . 2-265 VisFileGetType. . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-265 VisFileOpen. . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . 2-266 VisFileRead. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-267

VisFileReadString. . . . . . . . . . . . . . . . . . . . . . . . . . 2-268 VisFileRename. . . . . . . . . . . . . . . . . .

. . . . . . . . . . 2-268 VisFileSeek. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-269 VisFileSetAttribute.

. . . . . . . . . . . . . . . . . . . . . . . . 2-269 VisFileSetDateTime. . . . . . . . . . . . . . . . . . . . . . . . 2-270

VisFileTell. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-271 VisFileWrite. . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . 2-271 VisFileWriteString. . . . . . . . . . . . . . . . . . . . . . . . . . 2-272 VisFontEnum. . . . . .

. . . . . . . . . . . . . . . . . . . . . . . 2-272 VisFontFree. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-273

VisFontGet. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-273 VisFontLoad. . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . 2-274 VisGetCopyright. . . . . . . . . . . . . . . . . . . . . . . . . . . 2-275 VisGetKeyState. . . .

. . . . . . . . . . . . . . . . . . . . . . . 2-275 VisGetSystemMetrics. . . . . . . . . . . . . . . . . . . . . . . 2-275

VisGetVersion. . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-276 VisGetWinFlags. . . . . . . . . . . . . . . . . . .

. . . . . . . . 2-276 VisGetWinVersion. . . . . . . . . . . . . . . . . . . . . . . . . 2-277 VisListAddValue. . . . .

. . . . . . . . . . . . . . . . . . . . . . 2-277 VisListArrayPopulate. . . . . . . . . . . . . . . . . . . . . . . 2-278

VisListArrayPopulateValue. . . . . . . . . . . . . . . . . . . 2-278 VisListClearSelection. . . . . . . . . . . . . .

. . . . . . . . . 2-279 VisListDeleteSelected. . . . . . . . . . . . . . . . . . . . . . . 2-279 VisListFindString. . .

. . . . . . . . . . . . . . . . . . . . . . . 2-280 VisListFindValue. . . . . . . . . . . . . . . . . . . . . . . . . . 2-280

VisListGetDropdownState. . . . . . . . . . . . . . . . . . . 2-281 VisListGetFocusIndex. . . . . . . . . . . . . .

. . . . . . . . 2-281 . . . . . . . . . 2-277 VisListArrayPopulate. . . . . . . . . . . . . . . . . . . . . . . 2-278

VisListArrayPopulateValue. . . . . . . . . . . . . . . . . . . 2-278 VisListClearSelection. . . . . . . . . . . . . .

. . . . . . . . . 2-279 VisListDeleteSelected. . . . . . . . . . . . . . . . . . . . . . . 2-279 VisListFindString. . .

. . . . . . . . . . . . . . . . . . . . . . . 2-280 VisListFindValue. . . . . . . . . . . . . . . . . . . . . . . . . . 2-280

VisListGetDropdownState. . . . . . . . . . . . . . . . . . . 2-281 VisListGetFocusIndex. . . . . . . . . . . . . .

. . . . . . . . 2-281 . . . . . . . . . 2-277 VisListArrayPopulate. . . . . . . . . . . . . . . . . . . . . . . 2-278

VisListArrayPopulateValue. . . . . . . . . . . . . . . . . . . 2-278 VisListClearSelection. . . . . . . . . . . . . .

. . . . . . . . . 2-279 VisListDeleteSelected. . . . . . . . . . . . . . . . . . . . . . . 2-279 VisListFindString. . .

. . . . . . . . . . . . . . . . . . . . . . . 2-280 VisListFindValue. . . . . . . . . . . . . . . . . . . . . . . . . . 2-280

VisListGetDropdownState. . . . . . . . . . . . . . . . . . . 2-281 VisListGetFocusIndex. . . . . . . . . . . . . .

. . . . . . . . 2-281 2-279 VisListDeleteSelected. . . . . . . . . . . . . . . . . . . . . . . 2-279

VisListFindString. . . . . . . . . . . . . . . . . . . . . . . . . . 2-280 VisListFindValue. . . . . . . . . . . . . . . . . .

. . . . . . . . 2-280 VisListGetDropdownState. . . . . . . . . . . . . . . . . . . 2-281 VisListGetFocusIndex. . . . . . . . . . . . . . . . . . . . . . 2-281 2-279 VisListDeleteSelected. . . . . . . . . .

xx Centura Generador de Referencia de funciones


VisListGetVisibleRange. . . . . . . . . . . . . . . . . . . . . 2-282 VisListInsertValue. . . . . . . . . . . . . . .

. . . . . . . . . . 2-282 VisListIsMultiSelect. . . . . . . . . . . . . . . . . . . . . . . . 2-283

VisListLoadOutline. . . . . . . . . . . . . . . . . . . . . . . . . 2-283 VisListLoadOutlineFile. . . . . . . . . . . .

. . . . . . . . . . 2-284 VisListSaveOutline. . . . . . . . . . . . . . . . . . . . . . . . . 2-285 VisListScroll. . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . 2-285 VisListSetDropdownState. . . . . . . . . . . . . . . . . . . 2-286

VisListSetFocusIndex. . . . . . . . . . . . . . . . . . . . . . . 2-286 VisListSetScrollWidth. . . . . . . . . . . .

. . . . . . . . . . . 2-287 VisMenuGetPopupHandle. . . . . . . . . . . . . . . . . . . 2-287

VisMenuGetSystemHandle. . . . . . . . . . . . . . . . . . 2-288 VisMenuGetText. . . . . . . . . . . . . . . . .

. . . . . . . . . 2-288 VisMenuInsert. . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-289 VisMenuInsertFont.

. . . . . . . . . . . . . . . . . . . . . . . . 2-290 VisMenuInsertPicture. . . . . . . . . . . . . . . . . . . . . . . 2-291

VisMenuIsChecked. . . . . . . . . . . . . . . . . . . . . . . . 2-292 VisMenuIsEnabled. . . . . . . . . . . . . . .

. . . . . . . . . . 2-293 VisMenuSetFont. . . . . . . . . . . . . . . . . . . . . . . . . . . 2-294

VisMenuSetPicture. . . . . . . . . . . . . . . . . . . . . . . . . 2-295 VisMenuSetText. . . . . . . . . . . . . . . .

. . . . . . . . . . . 2-296 VisMenuUncheck. . . . . . . . . . . . . . . . . . . . . . . . . . 2-297 VisMessageBox.

. . . . . . . . . . . . . . . . . . . . . . . . . . 2-297 VisMessageFreeButton. . . . . . . . . . . . . . . . . . . . .

2-298 VisMessageLoadButton. . . . . . . . . . . . . . . . . . . . . 2-299 VisMessageSetBkgdColor. . . .

. . . . . . . . . . . . . . . 2-299 VisNumberBitClear. . . . . . . . . . . . . . . . . . . . . . . . . 2-299

VisNumberBitSet. . . . . . . . . . . . . . . . . . . . . . . . . . 2-300 VisNumberChoose. . . . . . . . . . . . . . .

. . . . . . . . . . 2-301 VisNumberHighByte. . . . . . . . . . . . . . . . . . . . . . . . 2-301

VisNumberLowByte. . . . . . . . . . . . . . . . . . . . . . . . 2-302 VisNumberMakeLong. . . . . . . . . . . . .

. . . . . . . . . . 2-302 2-299 VisNumberBitSet. . . . . . . . . . . . . . . . . . . . . . . . . . 2-300

VisNumberChoose. . . . . . . . . . . . . . . . . . . . . . . . . 2-301 VisNumberHighByte. . . . . . . . . . . . .

. . . . . . . . . . . 2-301 VisNumberLowByte. . . . . . . . . . . . . . . . . . . . . . . . 2-302

VisNumberMakeLong. . . . . . . . . . . . . . . . . . . . . . . 2-302 2-299 VisNumberBitSet. . . . . . . . . . .

. . . . . . . . . . . . . . . 2-300 VisNumberChoose. . . . . . . . . . . . . . . . . . . . . . . . . 2-301

VisNumberHighByte. . . . . . . . . . . . . . . . . . . . . . . . 2-301 VisNumberLowByte. . . . . . . . . . . . . .

. . . . . . . . . . 2-302 VisNumberMakeLong. . . . . . . . . . . . . . . . . . . . . . . 2-302

Centura Generador de Referencia de funciones xxi


Contenido

VisPicFree. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-302 VisPicLoad. . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . 2-303 VisSendMsgString. . . . . . . . . . . . . . . . . . . . . . . . . 2-304 VisStrChoose. . . . . .

. . . . . . . . . . . . . . . . . . . . . . . 2-305 VisStrExpand. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-305

VisStrFind. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-306 VisStrFreeTable. . . . . . . . . . . . . . . . . .

. . . . . . . . . 2-307 VisStrLeftTrim. . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-307 VisStrLoadTable. . . .

. . . . . . . . . . . . . . . . . . . . . . . 2-307 VisStrPad. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-308

VisStrProper. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-308 VisStrRightTrim. . . . . . . . . . . . . . . . . .

. . . . . . . . . 2-309 VisStrScanReverse. . . . . . . . . . . . . . . . . . . . . . . . 2-309 VisStrSubstitute. . . .

. . . . . . . . . . . . . . . . . . . . . . . 2-309 VisStrTrim. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-310

VisTblAllRows. . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-310 VisTblAutoSizeColumn. . . . . . . . . . . . .

. . . . . . . . 2-311 VisTblClearColumnSelection. . . . . . . . . . . . . . . . . 2-311 VisTblFindDateTime. .

. . . . . . . . . . . . . . . . . . . . . . 2-312 VisTblFindNumber. . . . . . . . . . . . . . . . . . . . . . . . . 2-312

VisTblFindString. . . . . . . . . . . . . . . . . . . . . . . . . . . 2-313 VisTblGetCell. . . . . . . . . . . . . . . . . . . .

. . . . . . . . . 2-314 VisTblGetColumnTitle. . . . . . . . . . . . . . . . . . . . . . 2-314 VisTblSetRowColor. .

. . . . . . . . . . . . . . . . . . . . . . 2-315 VisTblSetRowPicture. . . . . . . . . . . . . . . . . . . . . . . 2-315

VisWaitCursor. . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-316 VisWinClearAllEditFlags. . . . . . . . . . . .

. . . . . . . . 2-317 VisWinClearAllFields. . . . . . . . . . . . . . . . . . . . . . . 2-317 VisWinEnumProps. . .

. . . . . . . . . . . . . . . . . . . . . . 2-318 VisWinFreeAccelerator. . . . . . . . . . . . . . . . . . . . . 2-318

VisWinGetFlags. . . . . . . . . . . . . . . . . . . . . . . . . . . 2-319 VisWinGetHandle. . . . . . . . . . . . . . . . .

. . . . . . . . . 2-319 . . . . . . . . . . . 2-315 VisWaitCursor. . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-316

VisWinClearAllEditFlags. . . . . . . . . . . . . . . . . . . . 2-317 VisWinClearAllFields. . . . . . . . . . . . . . .

. . . . . . . . 2-317 VisWinEnumProps. . . . . . . . . . . . . . . . . . . . . . . . . 2-318

VisWinFreeAccelerator. . . . . . . . . . . . . . . . . . . . . 2-318 VisWinGetFlags. . . . . . . . . . . . . . . . . . .

. . . . . . . . 2-319 VisWinGetHandle. . . . . . . . . . . . . . . . . . . . . . . . . . 2-319 . . . . . . . . . . . 2-315

VisWaitCursor. . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-316 VisWinClearAllEditFlags. . . . . . . . . . . .

. . . . . . . . 2-317 VisWinClearAllFields. . . . . . . . . . . . . . . . . . . . . . . 2-317 VisWinEnumProps. . .

. . . . . . . . . . . . . . . . . . . . . . 2-318 VisWinFreeAccelerator. . . . . . . . . . . . . . . . . . . . . 2-318

VisWinGetFlags. . . . . . . . . . . . . . . . . . . . . . . . . . . 2-319 VisWinGetHandle. . . . . . . . . . . . . . . . .

. . . . . . . . . 2-319 2-318 VisWinFreeAccelerator. . . . . . . . . . . . . . . . . . . . . 2-318

VisWinGetFlags. . . . . . . . . . . . . . . . . . . . . . . . . . . 2-319 VisWinGetHandle. . . . . . . . . . . . . . . . .

. . . . . . . . . 2-319 2-318 VisWinFreeAccelerator. . . . . . . . . . . . . . . . . . . . . 2-318

VisWinGetFlags. . . . . . . . . . . . . . . . . . . . . . . . . . . 2-319 VisWinGetHandle. . . . . . . . . . . . . . . . . . . . . . . . . . 2-319

xxii Centura Generador de Referencia de funciones


VisWinGetProp. . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-320 VisWinGetStyle. . . . . . . .

. . . . . . . . . . . . . . . . . . . 2-320 VisWinGetText. . . . . . . . . . . . . . . . . . . . . . . . . . . .

2-321 VisWinIsChild. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-321

VisWinIsMaximized. . . . . . . . . . . . . . . . . . . . . . . . 2-322 VisWinIsMinimized. . . . . .

. . . . . . . . . . . . . . . . . . . 2-322 VisWinIsRequiredFieldNull. . . . . . . . . . . . . . . . . . .

2-323 VisWinIsRestored. . . . . . . . . . . . . . . . . . . . . . . . . . 2-323 VisWinIsWindow. .

. . . . . . . . . . . . . . . . . . . . . . . . 2-324 VisWinLoadAccelerator. . . . . . . . . . . . . . . . . .

. . . 2-324 VisWinMove. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-325

VisWinRemoveProp. . . . . . . . . . . . . . . . . . . . . . . . 2-326 VisWinSetFlags. . . . . . . .

. . . . . . . . . . . . . . . . . . . . 2-326 VisWinSetMeter. . . . . . . . . . . . . . . . . . . . . . . . . . .

2-327 VisWinSetProp. . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-327 VisWinSetStyle. . .

. . . . . . . . . . . . . . . . . . . . . . . . . 2-328 VisWinSetTabOrder. . . . . . . . . . . . . . . . . . .

. . . . . 2-329 VisWinShow. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-329 . . . . . . . . . .

. . 2-329 VisWinShow. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-329 . . . . . . . . . . . .

2-329 VisWinShow. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-329

Centura Generador de Referencia de funciones xxiii


Centura Generador de Referencia de funciones

Prefacio

Este prefacio contiene las siguientes secciones:

• Audiencia

• ¿Qué hay en este manual

• convenciones tipográficas

• Otros recursos útiles

• Envíe sus comentarios a ...

Centura Generador de Referencia de funciones xxv


Prefacio

Audiencia
Este manual es una guía avanzada para programadores que crean aplicaciones complejas y
sofisticadas utilizando el Generador de Centura.

¿Qué hay en este manual


Este manual se incluye en el conjunto de documentación de Centura constructor. Este manual contiene los
siguientes capítulos:

Capítulo 1: Centura Generador de Tablas de funciones


Este capítulo identifica categorías de función, proporciona una breve descripción de cada categoría, y
enumera las funciones en cada categoría.

Capítulo 2: Funciones Centura Builder


Este capítulo es una lista alfabética de las funciones Centura Builder acompañados de información detallada
acerca del propósito de cada función, sus parámetros y el valor de retorno, y un ejemplo.

convenciones tipográficas
Antes de empezar a usar el manual, es importante entender las convenciones tipográficas que utilizamos
en este manual:

Convención de formato Tipo de Información

negrita tipo Los elementos de menú, botones pulsadores, y nombres de campo. Cosas que se
seleccione. Las teclas del teclado que presione.

itálico tipo Los nombres de los libros y publicaciones. Los marcadores de posición para los

artículos que deberán entregar, tales como nombres de archivo. Por ejemplo, cuando

el manual dice que escribir discos compactos nombre del directorio escribe las letras

cd seguidas de un espacio y luego el nombre de un directorio.

tipo de mensajería Comandos o código que debe introducir a través del teclado exactamente
como se muestran.

❑ Este símbolo le avisa de que un procedimiento está a punto de comenzar.

Nota: Utilizamos esta Nota: convención para llamar su atención hacia información especial.

xxvi Centura Generador de Referencia de funciones


Otros recursos útiles
Centura Libros en pantalla. La suite documento Centura está disponible en línea. Esta colección de documentos le
permite realizar búsquedas de texto completo indexado a través de toda la suite de documentos, navegar la tabla de
contenido utilizando el navegador expansible / colapsable, o imprimir cualquier capítulo. Abra la colección seleccionando
el icono de Centura Libros en pantalla de la comienzo menú o haciendo doble clic en el icono de lanzador en el grupo de
programas.

Datos breves de Centura Software Corporation. Centura Corporación mantiene algunas de


la última información sobre temas tales como, ejemplos de programación, y los problemas que ocurren comúnmente en Fast
Facts. Llamar (415) 617-4600 para acceder a un catálogo de los documentos disponibles. Puede solicitar cualquier documento en
el catálogo para ser enviado por fax a usted.

CompuServe. Si usted es un suscriptor de CompuServe, puede unirse a foros de Centura a


aprender acerca de los productos Centura y comunicarse con otros usuarios de Centura. El nombre del foro es
Centura.

Ayuda en línea de Centura. Se trata de un amplio sistema de ayuda en línea sensible al contexto. La ayuda en línea ofrece una
forma rápida de encontrar información sobre temas que incluyen elementos de menú, funciones, mensajes y objetos.

Red mundial. En el sitio Web de Centura Software Corporation contiene una gran cantidad de información
sobre los socios, productos y usuarios de Centura Software Corporation. La dirección URL es
http://www.centurasoft.com.

Guía del usuario de Windows. Consulte este manual para obtener más información sobre el Microsoft
sistema operativo Windows.

Envíe sus comentarios a ...


Todo el que lea la Guía puede contribuir a ella. Si tiene algún comentario o sugerencia, por favor
enviarlos a: Publicaciones Técnicas Departamento de Centura Sociedad 1060 Marsh Rd. Menlo Park,
CA 94025 techpubs@centurasoft.com

Centura Generador de Referencia de funciones xxvii


Centura Generador de Referencia de funciones

Capítulo 1

Tablas de función
centura Builder

El capítulo contiene las funciones de tablas que se organizan por tipo.

Centura Generador de Referencia de funciones 1-1


Capítulo 1 Tablas de función centura Builder

Funciones Centura
SalAbort SalAppDisable
SalAppEnable SalAppFind
SalArrayAvg SalArrayDimCount
SalArrayGetLowerBound
SalArrayGetUpperBound
SalArrayIsEmpty SalArrayMax
SalArrayMin

SalArraySetUpperBound
SalArraySum
SalBringWindowToTop
SalCenterWindow SalClearField
SalColorFromRGB SalColorGet
SalColorGetSysColor
SalColorSet SalColorToRGB
SalCompileAndEvaluate
SalContextBreak
SalContextCurrent
SalCreateWindow
SalCursorClear SalCursorSet
SalCursorSetFile
SalCursorSetString
SalDateConstruct
SalDateCurrent SalDateDay
SalDateHour SalDateMinute
SalDateMonth
SalDateMonthBegin
SalDateQuarter
SalDateQuarterBegin
SalDateSecond SalDateToStr
SalDateWeekBegin

1-2 Centura Generador de Referencia de funciones


Funciones Centura

SalDateWeekday SalDateYear
SalDateYearBegin
SalDDEAddAtom SalDDEAlloc
SalDDEDeleteAtom
SalDDEExtract
SalDDEExtractCmd
SalDDEExtractDataText
SalDDEExtractOptions
SalDDEFindAtom SalDDEFree

SalDDEGetAtomName
SalDDEGetExecuteString
SalDDEPost SalDDERequest
SalDDESend SalDDESendAll
SalDDESendExecute
SalDDESendToClient
SalDDESetCmd
SalDDESetDataText
SalDDESetOptions
SalDDEStartServer
SalDDEStartSession
SalDDEStopServer
SalDDEStopSession
SalDestroyWindow
SalDisableWindow
SalDisableWindowAndLabel
SalDlgChooseColor
SalDlgChooseFont SalDlgOpenFile
SalDlgSaveFile

SalDragDropDisableDrop
SalDragDropEnableDrop
SalDragDropGetSource
SalDragDropGetTarget
SalDragDropStart
SalDragDropStop
SalDrawMenuBar
SalDropFilesAcceptFiles
SalDropFilesQueryFiles

Centura Generador de Referencia de funciones 1-3


Capítulo 1 Tablas de función centura Builder

SalDropFilesQueryPoint
SalEditCanCopyTo SalEditCanCut
SalEditCanPaste
SalEditCanPasteFrom
SalEditCanUndo SalEditClear
SalEditCopy SalEditCopyString
SalEditCopyTo SalEditCut
SalEditPaste SalEditPasteFrom
SalEditPasteString SalEditUndo
SalEnableWindow
SalEnableWindowAndLabel
SalEndDialog SalFileClose
SalFileCopy

SalFileCreateDirectory
SalFileGetC SalFileGetChar

SalFileGetCurrentDirectory
SalFileGetDateTime
SalFileGetDrive SalFileGetStr
SalFileOpen SalFileOpenExt
SalFilePutC SalFilePutChar
SalFilePutStr SalFileRead

SalFileRemoveDirectory
SalFileSeek
SalFileSetCurrentDirectory
SalFileSetDateTime
SalFileSetDrive SalFileTell
SalFileWrite SalFmtFieldToStr
SalFmtFormatDateTime
SalFmtFormatNumber

1-4 Centura Generador de Referencia de funciones


Funciones Centura

SalFmtGetFormat
SalFmtGetInputMask
SalFmtGetPicture
SalFmtIsValidField
SalFmtIsValidInputMask
SalFmtIsValidPicture
SalFmtKeepMask
SalFmtSetFormat
SalFmtSetInputMask
SalFmtSetPicture
SalFmtStrToField
SalFmtUnmaskInput
SalFmtValidateField
SalFontGet SalFontGetNames
SalFontGetSizes SalFontSet

SalFormGetParmNum
SalFormUnitsToPixels
SalGetDataType
SalGetDefButton
SalGetFirstChild SalGetFocus
SalGetItemName
SalGetMaxDataLength
SalGetNextChild
SalGetProfileInt
SalGetProfileString
SalGetType SalGetVersion

SalGetWindowLabelText
SalGetWindowLoc
SalGetWindowSize
SalGetWindowState
SalGetWindowText
SalHideWindow
SalHideWindowAndLabel
SalHStringToNumber
SalInvalidateWindow
SalIsButtonChecked SalIsNull

SalIsValidDateTime
SalIsValidDecimal

Centura Generador de Referencia de funciones 1-5


Capítulo 1 Tablas de función centura Builder

SalIsValidInteger
SalIsValidNumber
SalIsWindowEnabled
SalIsWindowVisible
SalListAdd SalListClear
SalListDelete SalListFiles

SalListGetMultiSelect
SalListInsert SalListPopulate
SalListQueryCount
SalListQueryFile
SalListQueryMultiCount
SalListQuerySelection
SalListQueryState
SalListQueryText
SalListQueryTextLength
SalListQueryTextX
SalListRedraw
SalListSelectString
SalListSetMultiSelect
SalListSetSelect
SalListSetTabs SalLoadApp
SalLoadAppAndWait
SalMapEnterToTab
SalMDIArrangeIcons
SalMDICascade SalMDITile
SalMessageBeep
SalMessageBox
SalModalDialog
SalModalDialogFromStr
SalMoveWindow
SalNumberAbs
SalNumberArcCos
SalNumberArcSin
SalNumberArcTan
SalNumberArcTan2
SalNumberCos
SalNumberCosH
SalNumberExponent

1-6 Centura Generador de Referencia de funciones


Funciones Centura

SalNumberHigh
SalNumberHypot
SalNumberLog
SalNumberLogBase10
SalNumberLow
SalNumberMax
SalNumberMin
SalNumberMod SalNumberPi
SalNumberPower
SalNumberRandInit
SalNumberRandom
SalNumberRound
SalNumberSin
SalNumberSinH
SalNumberSqrt
SalNumberTan
SalNumberTanH
SalNumberToChar
SalNumberToHString
SalNumberToStr
SalNumberToStrX

SalNumberToWindowHandle
SalNumberTruncate
SalParentWindow SalPicClear

SalPicGetDescription
SalPicGetString SalPicSet
SalPicSetFile SalPicSetFit
SalPicSetString
SalPixelsToFormUnits
SalPostMsg SalPrtExtractRect
SalPrtGetDefault
SalPrtGetParmNum
SalPrtPrintForm
SalPrtSetDefault
SalPrtSetParmDefaults
SalPrtSetParmNum
SalPrtSetup
SalQueryFieldEdit

Centura Generador de Referencia de funciones 1-7


Capítulo 1 Tablas de función centura Builder

SalQuit
SalReportClose SalReportCmd
SalReportCreate
SalReportDlgOptions
SalReportGetDateTimeVar
SalReportGetNumberVar
SalReportGetObjectVar
SalReportGetStringVar
SalReportPrint
SalReportPrintToFile
SalReportReset

SalReportSetDateTimeVar
SalReportSetNumberVar
SalReportSetObjectVar
SalReportSetStringVar
SalReportTableCreate
SalReportTablePrint
SalReportTableView SalReportView
SalScrollGetPos SalScrollGetRange
SalScrollSetPos SalScrollSetRange
SalSendClassMessage
SalSendClassMessageNamed
SalSendMsg

SalSendMsgToChildren
SalSendValidateMsg
SalSetDefButton
SalSetFieldEdit SalSetFocus

SalSetMaxDataLength
SalSetProfileString
SalSetWindowLabelText
SalSetWindowLoc
SalSetWindowSize
SalSetWindowText
SalShowWindow
SalShowWindowAndLabel
SalStatusGetText
SalStatusSetText
SalStatusSetVisible

1-8 Centura Generador de Referencia de funciones


Funciones Centura

SalStrCompress
SalStrFirstC
SalStrGetBufferLength
SalStrIsValidCurrency
SalStrIsValidDateTime
SalStrIsValidNumber
SalStrLeft SalStrLeftX
SalStrLength SalStrLop
SalStrLower SalStrLowerX
SalStrMid SalStrMidX
SalStrProper SalStrProperX
SalStrRepeat SalStrRepeatX
SalStrReplace
SalStrReplaceX SalStrRight
SalStrRightX SalStrScan

SalStrSetBufferLength
SalStrToDate SalStrTokenize
SalStrToNumber SalStrTrim
SalStrTrimX SalStrUncompress
SalStrUpper SalStrUpperX
SalTBarSetVisible
SalTblAnyRows
SalTblClearSelection
SalTblColumnAverage
SalTblColumnSum
SalTblCopyRows
SalTblCreateColumn
SalTblDefineRowHeader
SalTblDefineSplitWindow
SalTblDeleteRow
SalTblDeleteSelected

Centura Generador de Referencia de funciones 1-9


Capítulo 1 Tablas de función centura Builder

SalTblDestroyColumns
SalTblDoDeletes SalTblDoInserts
SalTblDoUpdates
SalTblFetchRow
SalTblFindNextRow
SalTblFindPrevRow
SalTblGetColumnText
SalTblGetColumnTitle
SalTblGetColumnWindow
SalTblInsertRow SalTblKillEdit
SalTblKillFocus
SalTblPasteRows SalTblPopulate

SalTblQueryColumnFlags
SalTblQueryColumnID
SalTblQueryColumnPos
SalTblQueryColumnWidth
SalTblQueryContext
SalTblQueryFocus
SalTblQueryLockedColumns
SalTblQueryRowFlags
SalTblQueryRowHeader
SalTblQueryScroll
SalTblQuerySplitWindow
SalTblQueryTableFlags
SalTblQueryVisibleRange
SalTblReset SalTblScroll

SalTblSetCellTextColor
SalTblSetColumnFlags
SalTblSetColumnPos
SalTblSetColumnText
SalTblSetColumnTitle
SalTblSetColumnWidth
SalTblSetContext
SalTblSetFlagsAnyRows
SalTblSetFocusCell
SalTblSetFocusRow
SalTblSetLockedColumns
SalTblSetRange SalTblSetRow

1-10 Centura Generador de Referencia de funciones


Funciones Centura

SalTblSetRowFlags SalTblSetTableFlags
SalTblSortRows SalTimerKill SalTimerSet
SalTrackPopupMenu SalUpdateWindow
SalValidateSet SalWaitCursor
SalWindowGetProperty
SalWindowHandleToNumber
SalWindowIsDerivedFromClass
SalWinHelp SalYieldEnable
SalYieldQueryState
SalYieldStartMessages
SalYieldStopMessages
SqlClearImmediate SQLClose
SQLCommit SQLCONNECT
SqlContextClear SqlContextSet
SqlContextSetToForm
SqlDirectoryByName SQLDisconnect
SqlDropStoredCmd SqlError SqlErrorText
SQLExecute SqlExecutionPlan SqlExists
SqlExtractArgs SqlFetchNext
SqlFetchPrevious SqlFetchRow
SqlGetError SqlGetErrorPosition
SqlGetErrorText SqlGetErrorTextX
SqlGetModifiedRows SqlGetParameter
SqlGetParameterAll

Centura Generador de Referencia de funciones 1-11


Capítulo 1 Tablas de función centura Builder

SqlGetResultSetCount
SqlGetRollbackFlag
SqlImmediate
SqlImmediateContext
SQLOpen
SqlPLSQLCommand
SQLPREPARE
SqlPrepareAndExecute
SQLRetrieve SqlSetInMessage
SqlSetIsolationLevel
SqlSetLockTimeout
SqlSetLongBindDatatype
SqlSetOutMessage
SqlSetParameter
SqlSetParameterAll
SqlSetResultSet SqlStore
SqlVarSetup VisArrayAppend
VisArrayCopy
VisArrayDeleteItem
VisArrayFillDateTime
VisArrayFillNumber
VisArrayFillString
VisArrayFindDateTime
VisArrayFindNumber
VisArrayFindString
VisArrayInsertItem VisArraySort
VisDebugAssert
VisDebugBeginTime
VisDebugEndTime
VisDebugGetFlags
VisDebugSetFlags
VisDebugSetLevel
VisDebugSetTime
VisDebugString
VisDosBuildFullName
VisDosEnumDirInfo
VisDosEnumDirs
VisDosEnumDrives
VisDosEnumFileInfo

1-12 Centura Generador de Referencia de funciones


Funciones Centura

VisDosEnumFiles
VisDosEnumNetConnections
VisDosEnumPath
VisDosEnumsShortDirInfo
VisDosEnumsShortDirs
VisDosEnumsShortFileInfo
VisDosEnumsShortFiles VisDosExist
VisDosGetCurDir
VisDosGetDriveSize
VisDosGetDriveType
VisDosGetEnvString VisDosGetFlags
VisDosGetNetName
VisDosGetVersion
VisDosGetVolumeLabel
VisDosIsParent VisDosMakeAllDir
VisDosMakePath VisDosNetConnect
VisDosNetDisconnect
VisDosSetFlags
VisDosSetVolumeLabel
VisDosSplitPath VisErrorRecovery
VisFileAppend VisFileClose
VisFileCopy VisFileCreateTemp
VisFileDelete VisFileExpand
VisFileFind VisFileGetAttribute
VisFileGetSize VisFileGetType
VisFileOpen VisFileRead
VisFileReadString VisFileRename
VisFileSeek VisFileSetAttribute
VisFileSetDateTime VisFileTell

Centura Generador de Referencia de funciones 1-13


Capítulo 1 Tablas de función centura Builder

VisFileWrite VisFileWriteString
VisFontEnum VisFontFree
VisFontGet VisFontLoad
VisGetCopyright VisGetKeyState
VisGetSystemMetrics
VisGetVersion VisGetWinFlags
VisGetWinVersion
VisListAddValue
VisListArrayPopulate
VisListArrayPopulateValue
VisListClearSelection
VisListDeleteSelected
VisListFindString VisListFindValue
VisListGetDropdownState
VisListGetFocusIndex
VisListGetVisibleRange
VisListInsertValue
VisListIsMultiSelect
VisListLoadOutline
VisListLoadOutlineFile
VisListSaveOutline VisListScroll

VisListSetDropdownState
VisListSetFocusIndex
VisListSetScrollWidth
VisMenuGetPopupHandle
VisMenuGetSystemHandle
VisMenuGetText VisMenuInsert
VisMenuInsertFont
VisMenuInsertPicture
VisMenuIsChecked
VisMenuIsEnabled
VisMenuSetFont
VisMenuSetPicture
VisMenuSetText VisMenuUncheck

1-14 Centura Generador de Referencia de funciones


Funciones Centura

VisMessageBox
VisMessageFreeButton
VisMessageLoadButton
VisMessageSetBkgdColor
VisNumberBitClear VisNumberBitSet
VisNumberChoose
VisNumberHighByte
VisNumberLowByte
VisNumberMakeLong VisPicFree
VisPicLoad VisProfileDelete
VisProfileEnumStrings
VisSendMsgString VisStrChoose
VisStrExpand VisStrFind
VisStrFreeTable VisStrLeftTrim
VisStrLoadTable VisStrPad
VisStrProper VisStrRightTrim
VisStrScanReverse VisStrSubstitute
VisStrTrim VisTblAllRows
VisTblAutoSizeColumn
VisTblClearColumnSelection
VisTblFindDateTime
VisTblFindNumber VisTblFindString
VisTblGetCell VisTblGetColumnTitle
VisTblSetRowColor
VisTblSetRowPicture VisWaitCursor

VisWinGetFlags
VisWinClearAllEditFlags
VisWinClearAllFields
VisWinEnumProps
VisWinFreeAccelerator

Centura Generador de Referencia de funciones 1-15


Capítulo 1 Tablas de función centura Builder

VisWinGetHandle VisWinGetProp
VisWinGetStyle VisWinGetText
VisWinIsChild VisWinIsMaximized
VisWinIsMinimized
VisWinIsRequiredFieldNull
VisWinIsRestored
VisWinIsWindow
VisWinLoadAccelerator
VisWinMove VisWinRemoveProp
VisWinSetFlags VisWinSetMeter
VisWinSetProp VisWinSetStyle
VisWinSetTabOrder VisWinShow

Funciones Centura obsoletos


SalCreateWindowFrmStr
SalFmtCopyProfile
SalFmtGetParmInt
SalFmtGetParmStr
SalFmtGetProfile
SalFmtSetParmInt
SalFmtSetParmStr
SalFmtSetProfile
SalQueryArrayBounds
SalSetArrayBounds

1-16 Centura Generador de Referencia de funciones


Centura Categorías de funciones

Centura Categorías de funciones


Centura funciones se dividen en categorías. Esta sección identifica y describe brevemente cada categoría además de
enumerar las funciones de cada uno. arreglo de funciones funciones de fuente color y el tipo de datos Fecha funciones
de conversión de funciones DDE funciones de depuración funciones Funciones de la caja de diálogo de las funciones
de gestión de DOS Arrastre funciones gota funciones de edición

De lista y cuadro combinado funciones de archivo de funciones de


gestión de formatos y funciones de validación de funciones de
manipulación de texto fondo MDI (Multiple Document Interface)
Funciones Las funciones de mensajes Funciones varias funciones
Número funciones funciones de Imagen Impr.informe funciones de
barra de desplazamiento funciones funciones SQL

Funciones de conversión de cadenas funciones de


gestión de la tabla funciones de la ventana de la
ventana

Funciones de matrices
Estas funciones administrar matrices y valores de cómputo.

Nombre de la función Descripción

SalArrayAvg Obtiene el promedio de los valores en una matriz de números

SalArrayDimCount Obtiene el número de dimensiones en nValue.

SalArrayGetLowerBound Obtiene el límite inferior de una matriz.

SalArrayGetUpperBound Obtiene el límite superior de una matriz.

Centura Generador de Referencia de funciones 1-17


Capítulo 1 Tablas de función centura Builder

Nombre de la función Descripción

SalArrayIsEmpty Determina si una matriz dinámica contiene ningún dato.

SalArrayMax Obtiene el valor máximo en una matriz de números.

SalArrayMin Obtiene el valor mínimo de una matriz de números.

SalArraySetUpperBound Establece el límite superior de una matriz.

SalArraySum Calcula la suma de los elementos de una matriz.

VisArrayAppend Anexa una matriz en el extremo de otra matriz.

VisArrayCopy Copias una matriz en otra.

VisArrayDeleteItem Elimina un elemento de una matriz.

VisArrayFillDateTime Rellena una matriz de fecha / hora con un valor de fecha / hora
especificada.

VisArrayFillNumber Rellena una matriz de número con un valor especificado.

VisArrayFillString Rellena una matriz de cadena con una cadena especificada.

VisArrayFindDateTime Localiza un valor de fecha / hora dentro de un arreglo.

VisArrayFindNumber Localiza un número dentro de una matriz.

VisArrayFindString Localiza una cadena dentro de una matriz.

VisArrayInsertItem Inserta un elemento en una matriz.

VisArraySort Ordena una matriz, ya sea en orden ascendente o


descendente.

Color y la fuente Funciones


Estas funciones cambian y colores de las ventanas y las fuentes, así como permiten escribir nuevos colores.

Nombre de la función Descripción

SalColorFromRGB Compone un color de valores de rojo, verde y azul.

SalColorGet Obtiene el color de una ventana.

1-18 Centura Generador de Referencia de funciones


Centura Categorías de funciones

Nombre de la función Descripción

Obtiene un color del sistema.

SalColorSet Establece el color de una ventana.

SalColorToRGB Se descompone por un color en valores de rojo, verde y azul.

SalFontGet Obtiene de una ventana de nombre de fuente, tamaño, y


mejoras.

SalFontGetNames Obtiene los nombres de las fuentes de pantalla disponibles.

SalFontGetSizes Obtiene las tallas disponibles para un particularfont.

SalFontSet Establece una ventana de nombre de fuente, tamaño, y


mejoras.

VisFontEnum Obtiene los nombres de las fuentes y tipos (impresora, cierto tipo, etc.).

VisFontFree Libera una fuente carga en la memoria con el


VisFontLoad función.

VisFontGet Obtiene especificaciones de una fuente.

VisFontLoad Carga una fuente en la memoria.

VisTblSetRowColor Establece el color del texto para toda una fila de una ventana de la tabla.

VisMenuInsertFont Inserta un elemento de menú en un menú y lo muestra en la fuente


especificada.

VisMenuSetFont Muestra un elemento de menú en la fuente especificada.


VisMenuSetFont opera en los menús o menús
Centura insertados con la Biblioteca Vis.

Funciones de conversión de tipos de datos


Estas funciones manipulan datos de cadena mediante la conversión hacia y desde otros tipos de datos. SalColorGetSys

Nombre de la función Descripción

SalFormUnitsToPixels Calcula el número de píxeles en el número de


unidades de forma de Centura.

SalGetDataType Devuelve el tipo de datos de un objeto.

Centura Generador de Referencia de funciones 1-19


Capítulo 1 Tablas de función centura Builder

Nombre de la función Descripción

SalGetItemName Obtiene el nombre de un campo de ventana de forma o de datos.

SalGetMaxDataLength Obtiene la longitud máxima de un campo de datos, el campo de


líneas múltiples, o columna ventana de la tabla.

SalHStringToNumber Convierte una cadena en un número.

SalPixelsToFormUnits Calcula el número de unidades de forma de Centura en el


número de píxeles.

SalSetMaxDataLength Establece la longitud máxima de un campo de datos.

Funciones de fecha
Estas funciones manipulan los valores de fecha / hora.

Nombre de la función Descripción

SalDateConstruct Construye una fecha.

SalDateCurrent Obtiene la fecha y hora actual del cliente.

SalDateDay Obtiene la parte correspondiente al día de la fecha.

SalDateHour Obtiene la parte de hora de una fecha.

SalDateMinute Obtiene la porción minutos de una fecha.

SalDateMonth Obtiene la parte correspondiente al mes de una fecha.

SalDateMonthBegin Obtiene la fecha del primer día de un mes.

SalDateQuarter Obtiene el trimestre del año de una fecha.

SalDateQuarterBegin Obtiene la fecha del primer día de la cuarta parte de una fecha
determinada.

SalDateSecond Obtiene la parte de los segundos de la fecha.

SalDateToStr Convierte un valor de fecha a un valor de cadena.

SalDateWeekBegin Obtiene la fecha de lunes anterior.

SalDateWeekday Obtiene el día de la semana como un número.

SalDateYea Obtiene la parte de año de una fecha.

SalDateYearBegin Obtiene la fecha del primer día del año de una fecha determinada.

1-20 Centura Generador de Referencia de funciones


Centura Categorías de funciones

Funciones DDE
Estas funciones soportan los protocolos de Microsoft para el intercambio dinámico de datos (DDE). DDE le permite
intercambiar datos con otras aplicaciones de Windows que también soportan los protocolos de Microsoft.

Nombre de la función Descripción

SalDDEAddAtom Agrega una cadena a la mesa átomo.

SalDDEAlloc Asigna un identificador de memoria.

SalDDEDeleteAtom Elimina un átomo.

SalDDEExtract DDE extrae información de los parámetros wParam y


lParam de un mensaje DDE.

SalDDEExtractCmd Extrae la cadena de comandos en un mensaje


WM_DDE_EXECUTE.

SalDDEExtractDataText Extrae los datos en un mensaje WM_DDE_Date


o WM_DDE_Poke.

SalDDEExtractOptions Extrae opciones en un mensaje WM_DDE_ADVISE.

SalDDEFindAtom Busca el átomo asociada con una cadena.

SalDDEFree Libera un identificador de memoria.

SalDDEGetAtomName Devuelve la cadena asociada con un número de átomos.

SalDDEGetExecuteString Devuelve la cadena de comando enviado por un cliente.

SalDDEPost Envía un mensaje DDE.

SalDDERequest Pregunta un servidor para enviar los datos especificados.

SalDDESend Envía un mensaje WM_DDE_ACK en respuesta a un


mensaje WM_DDE_INITIATE.

SalDDESendAll Difunde un mensaje WM_DDE_INITIATE.

SalDDESendExecute Envía un comando WM_DDE_EXECUTE al servidor


especificado.

SalDDESendToClient Envía datos a un cliente.

SalDDESetCmd Establece la cadena de comandos en un


mensaje WM_DDE_EXECUTE.

Centura Generador de Referencia de funciones 1-21


Capítulo 1 Tablas de función centura Builder

Nombre de la función Descripción

SalDDESetDataText Establece los datos en un mensaje WM_DDE_DATA


o WM_DDE_Poke.

SalDDESetOptions Establece las opciones en un mensaje WM_DDE_ADVISE.

SalDDEStartServer Señales de clientes que el servidor es capaz de aceptar


conexiones de clientes y participar en una conversación.

SalDDEStartSession Inicia una conversación enlace activo entre un cliente y


un servidor.

SalDDEStopServer Señales de clientes que el servidor quiere poner fin a las operaciones
del servidor DDE.

SalDDEStopSession Termina una conversación enlace activo entre un cliente y un


servidor.

Funciones de test
Estas funciones ayudan a depurar su aplicación.

Nombre de la función Descripción

SalCompileAndEvaluate Evalúa el tipo de datos de una expresión y devuelve su


valor.

SalContextBreak Recupera el contexto de la declaración de la rotura ejecutado


más recientemente.

SalContextCurrent Recupera el contexto de ejecución actual.

VisDebugAssert Afirma que una condición es verdadera.

VisDebugBeginTime Empieza de temporización de una operación.

VisDebugEndTime Detiene el registro del tiempo y muestra todos los tiempos


incrementales y el tiempo total.

VisDebugGetFlags Recupera los indicadores de depuración actuales.

VisDebugSetFlags Establece indicadores de depuración.

VisDebugSetLevel Establece el nivel de depuración actual.

VisDebugSetTime Registra el tiempo desde la última


VisDebugSetTime o VisDebugBeginTime
llamada.

1-22 Centura Generador de Referencia de funciones


Centura Categorías de funciones

Nombre de la función Descripción

VisDebugString Escribe una cadena a la ventana de la aplicación de depuración.

Funciones del cuadro de diálogo


Estas funciones proporcionan una interfaz para cuadros de diálogo estándar de Microsoft Windows.

Nombre de la función Descripción

SalDlgChooseColor Muestra el cuadro de diálogo Color.

SalDlgChooseFont Muestra el cuadro de diálogo Fuente.

SalDlgOpenFile Muestra el cuadro de diálogo Abrir archivo.

SalDlgSaveFile Muestra el cuadro de diálogo Guardar archivo.

Estas funciones permiten crear y destruir sus propios cuadros de diálogo.

Nombre de la función Descripción

SalEndDialog Destruye un cuadro de diálogo modal.

SalModalDialog Crea un cuadro de diálogo modal.

SalModalDialogFromStr Crea un cuadro de diálogo modal con el nombre


especificado.

Funciones de administración de DOS


Estas funciones administrar las características de DOS.

Nombre de la función Descripción

VisDosBuildFullName Construye un nombre de archivo con la unidad y el directorio completo


basado en la ubicación de un archivo ejecutable en ejecución.

VisDosEnumDirInfo Recupera todos los subdirectorios de un directorio dado en


una matriz de Centura.

VisDosEnumDirs Recupera todos los subdirectorios en un directorio dado en


una matriz de Centura.

VisDosEnumDrives Recupera todas las unidades disponibles en una matriz de Centura,


incluyendo unidades de disquetes, discos duros, CD-ROM, redes y
unidades RAM.

Centura Generador de Referencia de funciones 1-23


Capítulo 1 Tablas de función centura Builder

Nombre de la función Descripción

VisDosEnumFileInfo Recupera todos los archivos en un directorio dado en una matriz de


Centura, y devuelve el tamaño, la fecha / hora de cada archivo, y
atributos.

VisDosEnumFiles Recupera todos los nombres de los archivos de un directorio


dado en una matriz de Centura.

VisDosEnumNetConnections Recupera todas las conexiones de red actuales.

VisDosEnumPath Devuelve todos los directorios de la cadena de entorno


PATH de DOS.

VisDosEnumsShortDirInfo Recupera todos los nombres largos y cortos subdirectorio


para un directorio dado en una matriz de Centura
.

VisDosEnumsShortDirs Recupera todos los nombres largos y cortos subdirectorio


para un directorio dado en una matriz de Centura.

VisDosEnumsShortFileInfo Recupera todos los nombres largos y cortos de archivo para un


directorio dado en una matriz de Centura.

VisDosEnumsShortFiles Recupera todos los nombres largos y cortos de archivo para un directorio
dado en una matriz de Centura.

VisDosExist Las pruebas de la existencia de una unidad, un directorio o archivo.

VisDosGetCurDir Devuelve el directorio actual de una unidad especificada.

VisDosGetDriveSize Devuelve el espacio total y el espacio disponible en una unidad.

VisDosGetDriveType Obtiene el tipo de unidad especificada.

VisDosGetEnvString Devuelve una cadena de entorno basado en una palabra clave.

VisDosGetFlags Devuelve el estado de las banderas de DOS.

VisDosGetNetName Recupera el nombre de la red para el dispositivo especificado.

VisDosGetVersion Devuelve el número de versión de MS-DOS.

VisDosGetVolumeLabel Devuelve la etiqueta de volumen de una unidad especificada.

1-24 Centura Generador de Referencia de funciones


Centura Categorías de funciones

Nombre de la función Descripción

Volver indicador de si el directorio contiene


subdirectorios.

VisDosMakeAllDir Crea todos los directorios a lo largo de la ruta completa


especificada.

VisDosMakePath Construye una ruta completa de un nombre de la unidad, directorio o


archivo.

VisDosNetConnect Se conecta a un dispositivo de red.

VisDosNetDisconnect
tiempo Cancela
de ejecución, así como arrastrar y soltar entre los objetos de una VisDosIsParent
la aplicación. conexión de red.

VisDosSetFlags Conjuntos verifican, se rompen, o indicadores de modo de error.

VisDosSetVolumeLabel Establece la etiqueta de volumen en una unidad de disco.

VisDosSplitPath Divide una especificación de ruta completa en la unidad, directorio


y nombre del archivo.

Funciones arrastrar gota


Estas funciones permiten a los usuarios a soltar archivos desde el Administrador de archivos en una ventana de la aplicación Centura en

Nombre de la función Descripción

SalDragDropDisableDrop Desactiva cayendo mientras que en modo de arrastre.

SalDragDropEnableDrop Permite a caer mientras que en modo de arrastre.

SalDragDropGetSource Recupera el identificador de la ventana de origen y la


ubicación del ratón cuando se inicia el modo de arrastre.

SalDragDropGetTarget Recupera el identificador de la ventana de destino y la


ubicación del ratón.

SalDragDropStart Inicia el modo de arrastre.

SalDragDropStop Termina modo de arrastre.

SalDropFilesAcceptFiles Verifica si una ventana puede aceptar un archivo desde el Administrador


de archivos de Windows'.

SalDropFilesQueryFiles Recupera los nombres de los archivos cayeron en una ventana.

Centura Generador de Referencia de funciones 1-25


Capítulo 1 Tablas de función centura Builder

Nombre de la función Descripción

Encuentra la ubicación del ratón en una ventana en el momento


en que el usuario se redujo archivos en la ventana.

Funciones de edición
así, estas funciones permitirá a los elementos del menú Editar. SalDropFilesQueryPoint

La mayoría de estas funciones proporcionan capacidades de edición de texto. Utilizarlos para los campos que un usuario edita.
que se utiliza para cortar y pegar entre campos de texto. Otras funciones de identificar si un usuario ha seleccionado los datos y si es

Microsoft Windows mantiene tanto una memoria intermedia de anulación que almacena las ediciones anteriores y un buffer de pasta

Nombre de la función Descripción

SalEditCanCopyTo Devuelve si una imagen editable tiene el enfoque y


contiene un objeto.

SalEditCanCut Devuelve VERDADERO si se selecciona los datos de un campo de


datos, campo de varias líneas, columna de ventana de la tabla, o una
imagen editable.

SalEditCanPaste Devuelve TRUE si hay datos en el portapapeles para pegar en


el campo de datos, campo de varias líneas, columna de ventana
de la tabla, imagen con el enfoque.

SalEditCanPasteFrom Devuelve si una imagen editable tiene el foco.

SalEditCanUndo Devuelve TRUE si hay alguna edición de deshacer.

SalEditClear Elimina los datos seleccionados a partir del campo de datos, campo
de varias líneas, columna de ventana de la tabla, o imagen con el
enfoque.

SalEditCopy Copias seleccionadas datos de un campo de datos, columna de


ventana de la tabla de varias líneas, o la imagen y la coloca en el
sujetapapeles.

SalEditCopyString Copia una cadena en el portapapeles.

SalEditCopyTo Copia un objeto a un archivo si la imagen editable que


contiene el objeto tiene el foco.

1-26 Centura Generador de Referencia de funciones


Centura Categorías de funciones

Nombre de la función Descripción

Corta datos seleccionados de un campo de datos, campo de


varias líneas, columna de ventana de la tabla, o una imagen y la
coloca en el portapapeles.

SalEditPaste Pastas datos del portapapeles en el campo de datos, campo de


varias líneas, columna de ventana de la tabla, o imagen con el
enfoque.

SalEditPasteFrom Copia un archivo en el cuadro editable con el foco.

SalEditPasteString Pega el contenido del portapapeles en la cadena


especificada.

SalEditUndo Deshace la última edición en un campo de datos, campo de varias líneas,


columna de ventana de la tabla, o una imagen.

VisWinClearAllFields Borra todos los campos secundarios de un ventana padre.

Funciones de administración de archivos


Estas funciones gestionan las operaciones de archivos, directorios y de unidad. SalEditCut

Nombre de la función Descripción

SalFileClose Cierra un archivo.

SalFileCopy Copia el contenido de un archivo a otro.

SalFileCreateDirectory Crea un directorio.

SalFileGetC Obtiene el siguiente carácter de un archivo abierto que contiene


no ASCII (ANSI) o caracteres de 16 bits.

SalFileGetChar Obtiene el siguiente carácter de un archivo abierto.

SalFileGetCurrentDirectory Obtiene la ruta del directorio de trabajo actual.

SalFileGetDateTime Obtiene la fecha de modificación de un archivo y el tiempo.

SalFileGetDrive Obtiene la letra de la unidad de disco actual.

SalFileGetStr Obtiene la siguiente línea de un archivo abierto.

SalFileOpen Abre un archivo.

SalFileOpenExt Abre o re-abre un archivo.

Centura Generador de Referencia de funciones 1-27


Capítulo 1 Tablas de función centura Builder

Nombre de la función Descripción

SalFilePutC Escribe un carácter en un archivo abierto.

SalFilePutChar Escribe un carácter en un archivo abierto.

SalFilePutStr Escribe una cadena en un archivo abierto.

SalFileRead Lee de un archivo abierto.

SalFileRemoveDirectory Elimina un directorio.

SalFileSeek Establece la posición en un archivo abierto.

SalFileSetCurrentDirectory Cambia el directorio de trabajo actual de un coche.

SalFileSetDateTime Establece la fecha de modificación de un archivo y el tiempo.

SalFileSetDrive Establece la unidad de disco por defecto.

SalFileTell Obtiene la posición actual en un archivo abierto.

SalFileWrite Escribe en un archivo abierto.

VisFileAppend Anexa uno o más archivos a otro.

VisFileClose Cierra un archivo abierto con el VisFileOpen


llamada.

VisFileCopy Copia uno o más archivos.

VisFileCreateTemp Crea un archivo temporal.

VisFileDelete Elimina uno o más archivos.

VisFileExpand Copia un archivo de origen en un archivo de destino.

VisFileFind Busca un archivo en los siguientes lugares y devuelve la


ruta completa al archivo:

VisFileGetAttribute Obtiene los valores de bits de atributos para el archivo especificado.

VisFileGetSize Obtiene el tamaño del archivo en bytes.

VisFileGetType Obtiene el tipo de archivo. Un archivo puede ser un solo tipo.

VisFileOpen Crea o abre un archivo. Un archivo debe abrirse antes de


que pueda ser leído o escrito a.

VisFileRead Lee un bloque de datos de un archivo.

1-28 Centura Generador de Referencia de funciones


Centura Categorías de funciones

Nombre de la función Descripción

VisFileReadString Lee una línea de texto de un archivo de texto en una cadena.

VisFileRename Cambia el nombre de uno o más archivos.

VisFileSeek Trata de un desplazamiento especificado dentro de un archivo.

VisFileSetAttribute Establece los bits de permisos para uno o más archivos.

VisFileSetDateTime Establece la fecha y la hora para uno o más archivos.

VisFileTell Devuelve el archivo de desplazamiento actual.

VisFileWrite Escribe un bloque de datos en un archivo.

VisFileWriteString Escribe una cadena en un archivo.

Formato y validación Funciones


Estas funciones de formato y validar el valor de un objeto.

Nombre de la función Descripción

SalFmtFieldToStr Copia el contenido con o sin formato de un campo de


datos o columna ventana de la tabla en una cadena.

SalFmtFormatDateTime Da formato a un valor de fecha / hora.

SalFmtFormatNumber Formatea un valor numérico.

SalFmtGetFormat Devuelve el formato de una columna de campo de datos o la ventana


de la tabla.

SalFmtGetInputMask Obtiene la máscara de entrada de una columna de campo de datos o la


ventana de la tabla.

SalFmtGetPicture Devuelve el formato de la imagen de una columna de campo de datos o


la ventana de la tabla.

SalFmtIsValidField Valida el contenido de un campo de datos de la columna o ventana de


la tabla utilizando su perfil.

SalFmtIsValidInputMask Valida una máscara de entrada.

SalFmtIsValidPicture Valida un número o fecha / hora de formato de imagen.

SalFmtKeepMask Establece si usted guarda caracteres de máscara de entrada cuando se


copia el valor en un campo de datos, columna de ventana de la tabla, o un
cuadro combinado.

Centura Generador de Referencia de funciones 1-29


Capítulo 1 Tablas de función centura Builder

Nombre de la función Descripción

SalFmtSetFormat Establece el formato de una columna de campo de datos o la


ventana de la tabla.

SalFmtSetInputMask Establece la máscara de entrada de una columna de campo de datos o


la ventana de la tabla.

SalFmtSetPicture Establece el formato de imagen de un campo de datos o columna ventana


de la tabla en tiempo de ejecución.

SalFmtStrToField Copia el contenido con o sin formato de una cadena a


un objeto.

SalFmtUnmaskInput Desenmascara la entrada en una columna de campo de datos o ventana


de la tabla de máscaras.

SalFmtValidateField Valida y formatea el contenido de una columna de campo de datos


o ventana de la tabla.

SalIsNull Comprueba si un campo de datos, campo de varias líneas, o columna


ventana de la tabla está vacía.

SalIsValidDateTime Comprueba si un campo de datos, campo de varias líneas, o columna


ventana de la tabla contiene un valor válido de fecha / hora.

SalIsValidDecimal Verifica si la entrada a un campo de datos, campo de varias


líneas, o columna ventana de la tabla es de una precisión y escala
especificada.

SalIsValidInteger Verifica si el valor de un campo de datos, el campo de líneas


múltiples, o columna ventana de la tabla es un número entero válido.

SalIsValidNumber Verifica si el valor de un campo de datos, campo de varias


líneas, o columna ventana de la tabla es un número válido.

SalStrIsValidCurrency Verifica si toda la cadena es un valor de la moneda


válida.

SalStrIsValidDateTime Verifica si toda la cadena es un valor válido de fecha /


hora.

SalStrIsValidNumber Verifica si toda la cadena de valor es un número


válido.

SalValidateSet Centura dice que el foco está cambiando a un control personalizado


para que Centura puede realizar la validación, según sea necesario.

1-30 Centura Generador de Referencia de funciones


Centura Categorías de funciones

Lista de Funciones y Cuadro combinado


Estas funciones gestionan cuadros de lista y cuadros combinados. Puesto que los cuadros de lista pueden ser singleor selección múltiple, y
ordenados o no ordenados, no se puede utilizar todas las funciones de todos los cuadros de lista.

Nombre de la función Descripción

SalListAdd Añade una entrada a un cuadro de lista o un cuadro combinado.

SalListClear Borra un cuadro de lista o un cuadro combinado.

SalListDelete Elimina una entrada de un cuadro de lista o un cuadro combinado.

SalListFiles Rellena un cuadro de lista o un cuadro combinado con un listado de


directorios.

SalListGetMultiSelect Devuelve los números de índice de entradas del cuadro de lista de


seleccionados.

SalListInsert Inserta una entrada en un cuadro de lista o un cuadro combinado.

SalListPopulate Rellena un cuadro de lista o un cuadro combinado con el conjunto de


resultados de una consulta.

SalListQueryCount Devuelve el número de entradas en un cuadro de lista o un cuadro


combinado.

SalListQueryFile Obtiene el nombre del archivo seleccionado de un cuadro de lista o un


cuadro combinado.

SalListQueryMultiCount Devuelve el número de entradas del cuadro de lista de seleccionados en


ese momento.

SalListQuerySelection Devuelve el índice del cuadro de lista o un cuadro combinado de


entrada seleccionada actualmente.

SalListQueryState Indica si se selecciona el cuadro de lista o un cuadro combinado


entrada especificada.

SalListQueryText y SalListQueryTextX Obtiene un cuadro de lista o un cuadro combinado de entrada.

SalListQueryTextLength Devuelve la longitud de un cuadro de lista o un cuadro combinado de


entrada.

SalListRedraw Permite a los cambios en un cuadro de lista o un cuadro combinado a


volver a dibujar o evita los cambios de ser redibujado.

SalListSelectString Encuentra y selecciona un cuadro de lista o un cuadro combinado


entrada en particular.

Centura Generador de Referencia de funciones 1-31


Capítulo 1 Tablas de función centura Builder

Nombre de la función Descripción

SalListSetMultiSelect Selecciona o anula la selección de la entrada de cuadro de lista


especificada.

SalListSetSelect Selecciona el cuadro de lista o cuadro combinado índice de entrada


especificada.

SalListSetTabs pestaña conjuntos se detiene en un cuadro de lista.

VisListAddValue Añade un elemento a un cuadro de lista ordenada o un cuadro


combinado y asocia el valor especificado con el artículo.

VisListArrayPopulate Rellena un cuadro de lista a partir de una matriz de cadenas.

VisListArrayPopulateValue Rellena un cuadro de lista a partir de una matriz de cadenas y una


matriz de valores. Cada elemento de la cadena se inserta como un
elemento del cuadro de lista. El número de

VisListClearSelection Anula la selección de todos los elementos seleccionados en un cuadro


de lista o un cuadro combinado.

VisListDeleteSelected Elimina todos los elementos seleccionados de un cuadro de lista o un


cuadro combinado.

VisListFindString Busca el primer cadena que coincide con la cadena especificada en


un cuadro de lista o un cuadro combinado.

VisListFindValue Esta función será localizar un valor asociado a un


elemento basado en un índice.

VisListGetDropdownState Determina si la parte de cuadro de lista de un cuadro


combinado es visible.

VisListGetFocusIndex Obtiene el índice del elemento que tiene el rectángulo de selección o


el último elemento para recibir el cuadro de enfoque en un cuadro de
lista de selección múltiple.

VisListGetVisibleRange Recupera los índices de tanto el primer elemento visible y el último


elemento visible en un cuadro de lista.

VisListInsertValue Inserta un elemento en un cuadro de lista o un cuadro combinado


sin ordenar y asocia el valor especificado con el artículo.

VisListIsMultiSelect Prueba un cuadro de lista para determinar si la selección


múltiple está activado.

VisListScroll Desplaza un elemento a la vista.

1-32 Centura Generador de Referencia de funciones


Centura Categorías de funciones

Nombre de la función Descripción

VisListSetDropdownState Muestra u oculta la parte de cuadro de lista de un cuadro


combinado.

VisListSetFocusIndex Establece el rectángulo de selección hasta el elemento en el índice


especificado en un cuadro de lista de selección múltiple.

VisListSetScrollWidth Establece el ancho por el que un cuadro de lista se puede desplazar


horizontalmente.

La manipulación de fondo Funciones de texto


Estas funciones manipulan el texto de fondo.

Nombre de la función Descripción

SalAppDisable Desactiva la entrada de abrir las ventanas.

SalAppEnable Activa la entrada para abrir las ventanas.

SalAppFind Encuentra una ventana de nivel superior visible de la aplicación


que se especifica y devuelve su identificador de ventana.

SalBringWindowToTop Trae una ventana especificada a la parte superior de todas las


ventanas superpuestas.

SalCenterWindow Centra una ventana.

SalCreateWindow Crea una ventana.

SalDestroyWindow Destruye una ventana.

SalDisableWindow Desactiva la entrada de ratón y el teclado a una ventana.

SalDisableWindowAndLabel Desactiva la entrada de ratón y teclado para una ventana,


incluyendo la desactivación de fondo de texto.

SalEnableWindow Permite la entrada de teclado y ratón a una ventana.

SalEnableWindowAndLabel Permite la entrada del teclado y del ratón a una ventana,


incluyendo la habilitación de fondo de texto.

SalFormGetParmNum Obtiene información sobre una ventana de formulario.

SalGetDefButton Obtiene el mango del botón de comando predeterminado.

Centura Generador de Referencia de funciones 1-33


Capítulo 1 Tablas de función centura Builder

Nombre de la función Descripción

SalGetFirstChild Busca el primer hijo de una ventana.

SalGetFocus Obtiene el objeto con el foco.

SalGetNextChild Busca el siguiente hijo de una ventana.

SalGetType Devuelve el tipo de objeto especificado.

SalGetWindowLabelText Recupera el texto fondo de una ventana.

SalGetWindowLoc Obtiene la posición actual de una ventana en los ejes X e


Y.

SalGetWindowSize Obtiene el tamaño de la ventana actual.

SalGetWindowState Obtiene el estado actual de una ventana.

SalGetWindowText Recupera el texto de una ventana.

SalHideWindow Oculta una ventana.

SalHideWindowAndLabel Oculta una ventana y su etiqueta asociada.

SalInvalidateWindow Provoca una ventana para ser pintada.

SalIsButtonChecked Determina si un botón se activa o una casilla de verificación


está activada.

SalIsWindowEnabled Especifica si una ventana está habilitado para el


ratón y el teclado.

SalIsWindowVisible Especifica si una ventana es visible.

SalMoveWindow Mueve una ventana de un número dado de unidades de


forma en el eje X e Y con respecto a su posición actual.

SalParentWindow Devuelve el identificador de ventana de una ventana padre o


propietario.

SalQueryFieldEdit Devuelve el valor de la marca de campo de edición para un campo de


datos, campo de varias líneas, columna de ventana de la tabla, o una
imagen.

SalSetDefButton Define el botón de comando predeterminado para una ventana


de formulario o cuadro de diálogo.

SalSetFieldEdit Establece o borra la marca de campo de edición para un campo de


datos, campo de varias líneas, columna de ventana de la tabla, o una
imagen.

1-34 Centura Generador de Referencia de funciones


Centura Categorías de funciones

Nombre de la función Descripción

SalSetFocus Establece el foco en una ventana.

SalSetWindowLabelText Establece el texto fondo de una ventana.

SalSetWindowLoc Mueve una ventana a una posición en los ejes X e Y.

SalSetWindowSize Cambia el tamaño de una ventana.

SalSetWindowText Establece el texto de una ventana.

SalShowWindow Hace una ventana visible.

SalShowWindowAndLabel Oculta una ventana y su etiqueta asociada.

SalStatusGetText Obtiene el texto que se muestra en la barra de estado de una


ventana de nivel superior.

SalStatusSetText Muestra especifican texto en la barra de estado de una


ventana de nivel superior.

SalStatusSetVisible Muestra u oculta la barra de estado opcional de una ventana de nivel


superior.

SalTBarSetVisible Muestra u oculta la barra de herramientas de una ventana de nivel superior.

SalUpdateWindow Actualiza el área cliente de una ventana.

SalWindowGetProperty Obtiene el valor de una propiedad con nombre para una


instancia de un QuickObject. La propiedad debe haber sido
creado en tiempo de diseño con el editor QuickObject.

SalWindowHandleToNumber Convierte un identificador de ventana a un número.

SalWindowIsDerivedFromClass Convierte un identificador de ventana a un número.

VisMenuSetText Cambia el texto de un elemento de menú.

VisWinGetText Obtiene el texto de una ventana.

Estas funciones manipulan la etiqueta de texto de fondo de una ventana secundaria:

• SalDisableWindowAndLabel

• SalHideWindowAndLabel

• SalShowWindowAndLabel

Otras dos funciones que puede utilizar con el texto de fondo se explican a continuación.

nLongitud = SalGetWindowLabelText (HWnd, sText, nMaxLength)

Centura Generador de Referencia de funciones 1-35


Capítulo 1 Tablas de función centura Builder

R etrieves el texto fondo de una ventana:

hWnd identifica la ventana que tiene una etiqueta de devolverlo en el sText recibir cadena. Si esta función falla,
se devuelve 0. Los parámetros son similares a SalGetWindowText.

Bok = SalSetWindowLabelText (HWnd, sText)


Establece el texto fondo de una ventana:

hWnd identifica la ventana que tiene una etiqueta. Si esta función falla, se devuelve FALSO. Los parámetros son

los mismos que SalSetWindow texto.

Funciones MDI
Estas funciones soportan MDI (interfaz de múltiples documentos) las ventanas.

Nombre de la función Descripción

SalMDIArrangeIcons Organiza los iconos de ventana hija minimizado en una


ventana MDI.

SalMDICascade Cascadas ventanas secundarias de una ventana MDI.

SalMDITile Azulejos ventanas secundarias de una ventana MDI.

Funciones de mensajes
Utilizar estas funciones para publicar y enviar mensajes a los objetos.

Nombre de la función Descripción

SalPostMsg Se enviará un mensaje a una ventana.

SalSendClassMessage Invoca las acciones de los mensajes en la clase ancestro


más cercano que implementa el mensaje dado.

SalSendClassMessageNamed Invoca las acciones de los mensajes en la clase ancestro más


cercano que implementa el mensaje dado. Se utiliza con una clase
que es el resultado de la herencia múltiple.

sendmsg Envía un mensaje a una ventana.

SalSendMsgToChildren Envía un mensaje a todos los niños de una ventana de formulario.

SalSendValidateMsg Envía un mensaje SAM_Validate para el campo actual de


datos, campo de varias líneas, o columna ventana de la tabla
si se ha editado.

1-36 Centura Generador de Referencia de funciones


Centura Categorías de funciones

Nombre de la función Descripción

Muestra un cuadro de mensaje con botones definidos por el usuario y


un icono definido por el usuario.

VisMessageFreeButton Libera la memoria asignada con


VisMessageLoadButton.

VisMessageLoadButton Establece un botón para ser utilizados en los cuadros de


mensajes definidos por el usuario.

VisMessageBox
VisMessageSetBkgdColor Establece el color de fondo para una
VisMessageBox caja de diálogo.

VisSendMsgString Envía un mensaje y pasa una cadena en lParam.

Funciones varias
Estas funciones realizan tareas del sistema misceláneos desde una aplicación de Centura.

Nombre de la función Descripción

SalAbort Detiene la ejecución de las acciones actuales.

SalClearField Borra el valor de un campo.

SalCursorSet Establece el cursor de una ventana.

SalCursorSetFile Define un cursor definido por la aplicación de la ventana


especificada.

SalCursorSetString Establece el cursor de una ventana de una variable de


cadena.

SalDrawMenuBar Vuelve a dibujar una barra de menú.

SalGetProfileInt Recupera el valor entero de una entrada en la sección


especificada de un archivo de inicialización.

SalGetProfileString Recupera el valor de cadena de una entrada en la sección


especificada de un archivo de inicialización.

SalGetVersion Devuelve la versión Centura.

SalLoadApp Carga e inicia una aplicación.

SalLoadAppAndWait Carga e inicia una aplicación, entonces espera a que


salga antes de devolver el control a la aplicación original.

Centura Generador de Referencia de funciones 1-37


Capítulo 1 Tablas de función centura Builder

Nombre de la función Descripción

SalMapEnterToTab Establece la acción predeterminada de la tecla Enter (botón de


comando predeterminado ejecutar o cambiar el enfoque al siguiente
objeto).

SalMessageBeep Genera una señal acústica.

SalMessageBox Muestra un cuadro de mensaje.

SalQuit Sale de la aplicación de Centura.

SalSetProfileString Establece el valor de una entrada en la sección especificada de un


archivo de inicialización.

SalTimerKill Destruye un temporizador del sistema.

SalTimerSet Crea un temporizador del sistema.

SalTrackPopupMenu Crea un menú emergente en tiempo de ejecución.

SalWaitCursor Muestra o elimina el cursor de reloj de arena.

SalWinHelp Inicia el sistema de ayuda de Windows.

SalYieldEnable Activa o desactiva la aplicación rendimiento.

SalYieldQueryState Determina si la aplicación está activada o desactivada


la fluencia.

SalYieldStartMessages Permite rendimiento y el envío de mensajes a una


ventana.

SalYieldStopMessages Detiene rendimiento y el envío de mensajes a una


ventana.

VisErrorRecovery Muestra un mensaje de error y permite al usuario liberar


recursos y vuelva a intentar la operación.

VisGetCopyright Recupera una cadena de derechos de autor que se mostrará en


aplicaciones que utilizan la Biblioteca Vis.

VisGetKeyState Recupera el estado de una clave especificada.

VisGetSystemMetrics Recupera anchuras y alturas de los diversos elementos


mostrados por Windows.

VisGetVersion Obtiene el número de versión Vis Biblioteca.

VisGetWinFlags Recupera el sistema Windows y la configuración actual de


la memoria.

1-38 Centura Generador de Referencia de funciones


Centura Categorías de funciones

Nombre de la función Descripción

VisGetWinVersion Devuelve el número de versión de Windows.

VisListLoadOutline Carga un esquema de una burbuja (objeto binario grande) en la


memoria.

VisListLoadOutlineFile Carga un esquema de un archivo ASCII con sangría pestaña.

VisListSaveOutline Comprime y guarda un cuadro de lista o cuadro combinado


contorno en una masa (objeto binario grande) en la memoria.

VisMenuGetPopupHandle Recupera el identificador del menú de un menú emergente.

VisMenuGetSystemHandle Recupera el identificador del menú del sistema de una ventana.

VisMenuGetText Recupera el texto de un elemento de menú.

VisMenuInsert Inserta un elemento de menú en un menú.

VisMenuIsChecked Utiliza el estado de activación de Windows para comprobar si


se comprueba un elemento de menú.

VisMenuIsEnabled Emplea el reproductor Windows permiten estado para probar si


un elemento de menú está activado.

VisMenuUncheck Desactiva un elemento de menú.

VisNumberBitClear Borra los valores de bits de un número.

VisNumberBitSet Establece los valores de bit en un número.

VisNumberChoose evalúa bExpression .

VisStrChoose evalúa bExpression .

VisStrFind Localiza una cadena dentro de una tabla de cadenas.

VisStrFreeTable Libera toda la memoria asociada a una tabla de cadenas.

VisStrLeftTrim Recorta los principales espacios en blanco de una cadena.

VisStrLoadTable Carga una tabla de cadenas del disco a la memoria.

VisWaitCursor Resulta cursor de reloj de arena encendido o apagado.

Centura Generador de Referencia de funciones 1-39


Capítulo 1 Tablas de función centura Builder

Nombre de la función Descripción

VisWinClearAllEditFlags Borra las banderas campo de edición para cada campo de datos o el
campo de texto de varias líneas de una ventana padre.

VisWinEnumProps Enumera la lista de propiedades para una ventana especificada.

VisWinFreeAccelerator Borra un acelerador para una ventana, junto con toda


la memoria asociada con el acelerador.

VisWinGetFlags Recupera banderas de ventana para una ventana.

VisWinGetProp Recupera un valor de la lista propiedad de una ventana


especificada.

VisWinGetStyle Recupera los bits de estilo de Windows para una ventana


especificada.

VisWinIsRequiredFieldNull Los exámenes para determinar si se requiere cualquier campo es


nulo.

VisWinSetMeter Muestra un medidor de finalización dentro de un campo de


datos de Centura.

Funciones numéricas
Estas funciones realizan cálculos matemáticos.

Nombre de la función Descripción

SalNumberAbs Calcula el valor absoluto de un número.

SalNumberArcCos Calcula el arco coseno de un valor.

SalNumberArcSin Calcula el arcoseno de un valor.

SalNumberArcTan Calcula el arco tangente de un valor.

SalNumberArcTan2 Calcula la arcotangente de dos valores.

SalNumberCos Calcula el coseno de un ángulo.

SalNumberCosH Calcula el coseno hiperbólico de un ángulo.

SalNumberExponent Calcula la función exponencial de un valor.

SalNumberHigh Devuelve valor de la palabra de orden superior de un número (16 bits


más significativos).

1-40 Centura Generador de Referencia de funciones


Centura Categorías de funciones

Nombre de la función Descripción

SalNumberHypot Calcula la longitud de la hipotenusa de un triángulo


rectángulo.

SalNumberLog Calcula el logaritmo natural de un número.

SalNumberLogBase10 Calcula de un número logaritmo en base 10.

SalNumberLow Devuelve valor de la palabra de orden inferior de un número


significativo (16 bits menos).

SalNumberMax Devuelve el mayor de dos valores.

SalNumberMin Devuelve el menor de los dos valores.

SalNumberMod Devuelve módulo de un número.

SalNumberPi Multiplica un número de Pi.

SalNumberPower Calcula un número elevado a la potencia de otro


número.

SalNumberRandInit Define el punto de partida para la generación de una serie de


números pseudoaleatorios.

SalNumberRandom Genera un número entero pseudoaleatorio en el rango de posibles 0


a 32.767.

SalNumberRound Devuelve un número redondeado.

SalNumberSin Calcula seno de un ángulo.

SalNumberSinH Calcula el seno hiperbólico de un ángulo.

SalNumberSqrt Calcula la raíz cuadrada de un número.

SalNumberTan Calcula la tangente de un ángulo.

SalNumberTanH Calcula la tangente hiperbólica de un ángulo.

SalNumberToChar Convierte un valor numérico ASCII en un carácter.

SalNumberToHString Convierte un número a un identificador de cadena.

SalNumberToStr y SalNumberToStrX Convertir un número en una cadena.

SalNumberToWindowHandle Convierte un número en un identificador de ventana.

SalNumberTruncate Trunca un número.

Centura Generador de Referencia de funciones 1-41


Capítulo 1 Tablas de función centura Builder

Nombre de la función Descripción

VisNumberHighByte Convierte el número especificado a una palabra y


devuelve el alto orden de 8 bits de la palabra.

VisNumberLowByte Convierte el número especificado a una palabra y


devuelve el bajo orden de 8 bits de la palabra.

VisNumberMakeLong Crea un valor de palabra doble (DWORD) a partir de dos


valores de palabra.

Véase también: Funciones de matrices

Funciones de imagen
Estas funciones manipular el contenido de una imagen.

Nombre de la función Descripción

SalPicClear Borra el contenido de una imagen.

SalPicGetDescription Recupera una descripción del contenido de una imagen.

SalPicGetString Copia el contenido de una imagen en una cadena.

SalPicSet Inserta un recurso en una imagen.

SalPicSetFile Establece el contenido de una imagen desde un archivo.

SalPicSetFit Establece el ajuste para una foto.

SalPicSetString Establece el contenido de una imagen de una cadena.

VisMenuInsertPicture Inserta un elemento de menú en un menú y muestra la imagen


especificada con él.

VisMenuSetPicture Muestra una imagen en un elemento de menú.

VisPicFree Libera una imagen de la memoria. Una imagen es un mapa


de bits o un icono.

VisPicLoad Carga una imagen en la memoria.

VisTblSetRowPicture Establece la imagen de una bandera poco de una ventana de la


tabla.

1-42 Centura Generador de Referencia de funciones


Centura Categorías de funciones

Funciones de impresión
Estas funciones le permiten controlar la impresión.

Nombre de la función Descripción

SalPrtExtractRect Extrae el rectángulo se imprime desde argumento


lParam del mensaje SAM_Print.

SalPrtGetDefault Obtiene la impresora predeterminada.

SalPrtGetParmNum Obtiene el valor de un parámetro de impresión.

SalPrtPrintForm Imprime una ventana.

SalPrtSetDefault Establece la impresora predeterminada.

SalPrtSetParmDefaults Restablece los parámetros de impresión a los valores predeterminados.

SalPrtSetParmNum Establece el valor de un parámetro de impresión.

SalPrtSetup Muestra la configuración de la impresora cuadro de diálogo que permite


al usuario modificar la configuración de la impresora.

funciones de informe
Centura permite generar informes previamente diseñados con ReportWindows. Mediante el uso de las funciones enumeradas
ReportWindows en la siguiente sección, se puede crear, visualizar, formatear e imprimir un informe, así como obtener y variables
de informes establecidos.

Nombre de la función Descripción

SalReportClose Cierra una ventana ReportWindows.

SalReportCmd Envía un comando a una ventana del informe.

SalReportCreate Crea un informe.

SalReportDlgOptions Establece las opciones del informe cuadro de diálogo de impresión.

SalReportGetDateTimeVar Obtiene el valor de una variable de informe de fecha / hora.

SalReportGetNumberVar Obtiene el valor de una variable de informe numérico.

SalReportGetObjectVar Obtiene el valor de una variable de informe objeto.

SalReportGetStringVar Obtiene el valor de una variable de informe cadena.

SalReportPrint Se imprime un informe.

SalReportPrintToFile Se imprime un informe en un archivo.

Centura Generador de Referencia de funciones 1-43


Capítulo 1 Tablas de función centura Builder

Nombre de la función Descripción

Actualiza la vista previa del informe con los nuevos datos.

SalReportSetDateTimeVar Establece el valor de una variable de informe de fecha / hora.

SalReportSetNumberVar Establece el valor de una variable de informe de fecha / hora.

SalReportSetObjectVar Establece el valor de una variable de informe objeto.

SalReportSetStringVar Establece el valor de una variable de informe cadena.

SalReportTableCreate Crea un informe desde la ventana de la tabla especificada.

coherente. SalReportReset
SalReportTablePrint Se imprime un informe creado a partir de una ventana de la tabla.

SalReportTableView Muestra, en el modo de vista previa, un informe creado a partir de una


ventana de la tabla.

SalReportView Muestra un informe en modo de vista previa.

Funciones de barra de desplazamiento


Estas funciones gestionan barras de desplazamiento horizontal y vertical.

proporcionando conectividad
Nombre de laafunción
un número cada vez mayor de bases de datos, estas funciones proporcionan una interfaz
Descripción

SalScrollGetPos Obtiene la posición de la barra de desplazamiento.

SalScrollGetRange Obtiene los valores establecidos por SalScrollSetRange.

SalScrollSetPos Establece la posición de la barra de desplazamiento.

SalScrollSetRange Establece el rango de una barra de desplazamiento.

Funciones SQL
La mayoría de las funciones de base de datos SQL son independientes. Como Centura Software Corporation continúa

Nombre de la función Descripción

SqlClearImmediate Desconecta la manija SQL utilizada por


SqlImmediate.

SQLClose Cierra un cursor llamado.

SQLCommit Confirma la transacción SQL actual.

1-44 Centura Generador de Referencia de funciones


Centura Categorías de funciones

Nombre de la función Descripción

SQLCONNECT Se conecta un identificador SQL para una base de datos.

SqlContextClear Borra el contexto establecido por SqlContextSet.

SqlContextSet Establece el marco para la compilación más tarde y ir a buscar.

SqlContextSetToForm Establece contexto para formar nombre.

SqlDirectoryByName Obtiene los nombres de bases de datos en un servidor determinado.

SQLDISCONNECT Desconecta una manija SQL desde una base de datos.

SqlDropStoredCmd Elimina una orden almacenada.

SqlError Obtiene el código de error más reciente para la manija de SQL


especificada.

SqlErrorText Obtiene la razón y / o el remedio de un código de error.

SQLExecute Ejecuta una sentencia SQL.

SqlExecutionPlan Obtiene el plan de ejecución de una sentencia SQL compilado.

SqlExists Comprueba la existencia de una fila en particular.

SqlExtractArgs Extractos de información de error.

SqlFetchNext Obtiene la siguiente fila en un conjunto de resultados.

SqlFetchPrevious Obtiene la fila anterior en un conjunto de resultados.

SqlFetchRow Obtiene una fila específica a partir de un conjunto de resultados.

SqlGetError Apaga la correlación de errores de fondo y los informes de errores de


programa de fondo real.

SqlGetErrorPosition Obtiene el desplazamiento de un error dentro de una instrucción


SQL.

SqlGetErrorText y SqlGetErrorTextX Obtiene el texto del mensaje para una serie de errores de SQL.

SqlGetModifiedRows Devuelve el número de filas cambiado por un INSERT,


UPDATE o DELETE.

SqlGetParameter Devuelve un parámetro de base de datos.

Centura Generador de Referencia de funciones 1-45


Capítulo 1 Tablas de función centura Builder

Nombre de la función Descripción

SqlGetParameterAll Devuelve un parámetro de base de datos.

SqlGetResultSetCount Devuelve el número de filas de un conjunto de resultados.

SqlGetRollbackFlag Devuelve la bandera de reversión base de datos.

SqlImmediate Prepara y ejecuta una instrucción SQL.

SqlImmediateContext Prepara, ejecuta, y obtiene los resultados de una instrucción


SQL.

SQLOpen Nombres de un cursor y ejecuta una instrucción


SQL.

SqlPLSQLCommand Ejecuta procedimientos almacenados PL / SQL en Centura.


Llamarlo una vez para cada invocación de PL / SQL.

SQLPREPARE Prepara una sentencia SQL para su ejecución.

SqlPrepareAndExecute Prepara y ejecuta una sentencia de SQL.

SQLRetrieve Recupera una orden almacenada.

SqlSetInMessage Establece el tamaño de la memoria intermedia de mensaje de entrada para


un cursor especificado.

SqlSetIsolationLevel Establece el nivel de aislamiento.

SqlSetLockTimeout Establece el período de tiempo de espera en la espera de una cerradura.

SqlSetLongBindDatatype Establece el tipo de columna de unirse a.

SqlSetOutMessage Establece el tamaño del búfer de mensajes de salida para un cursor


especificado.

SqlSetParameter Establece un parámetro de base de datos.

SqlSetParameterAll Establece un parámetro de base de datos.

SqlSetResultSet Resulta un modo de conjunto de resultados de encendido y apagado.

SqlStore Recopila y almacena un comando.

SqlVarSetup Antes de Centura SQL realiza una operación de


recuperación o ejecutar, compila el bind y en variables que
se buscan los símbolos y generar el código que obtiene los
valores (para variables de enlace) o que recupera los
valores (por una en la variable).

1-46 Centura Generador de Referencia de funciones


Centura Categorías de funciones

Funciones de conversión de Cadena


Estas funciones manipulan datos de cadena, cambiando la forma de una cadena o en busca de subcadenas.

Nombre de la función Descripción

SalStrCompress Comprime una cadena.

SalStrFirstC Devuelve el primer carácter de una cadena.

SalStrGetBufferLength Devuelve la longitud de un búfer de cadena.

SalStrLeft y SalStrLeftX Devuelve una cadena de longitud especificada, empezando por el


primer carácter de la cadena.

SalStrLength Devuelve la longitud de una cadena.

SalStrLop Devuelve el valor numérico ANSI del primer carácter de


una cadena.

SalStrLowerand SalStrLowerX Convierte una cadena a minúsculas.

SalStrMid y SalStrMidX Devuelve una subcadena.

SalStrProper y SalStrProperX Convierte una cadena a un nombre propio.

SalStrRepeat y SalStrRepeatX Concatena una cadena con sí mismo un número determinado de


veces.

SalStrReplace y SalStrReplaceX Reemplaza caracteres en una cadena con


caracteres de otra cadena.

SalStrRight y SalStrRightX Devuelve una cadena de longitud especificada, empezando por el


último o más a la derecha carácter de la cadena.

SalStrScan Encuentra una cadena dentro de una cadena.

SalStrSetBufferLength Establece la longitud del búfer de cadena especificada.

SalStrToDate Convierte una cadena en un valor de fecha / hora.

SalStrTokenize Analiza una cadena en subcadenas.

SalStrToNumber Convierte una cadena en un número.

SalStrTrim y SalStrTrimX Elimina los espacios en blanco de una cadena.

SalStrUncompress Descomprime una cadena.

SalStrUpper y SalStrUpperX Convierte una cadena a mayúsculas.

Centura Generador de Referencia de funciones 1-47


Capítulo 1 Tablas de función centura Builder

Nombre de la función Descripción

VisStrExpand Se expande una cadena de plantilla mediante la inserción de uno o más


elementos de la matriz.

VisStrPad Rellena una cadena con espacios a la derecha y devuelve el resultado.

VisStrProper Convierte una cadena a mayúsculas y minúsculas.

VisStrRightTrim Ribetes blancos de cola de una cadena.

VisStrScanReverse Analiza una cadena para una subcadena especificada desde el último
carácter de la primera.

VisStrSubstitute Sustituye todas las apariciones de una cadena con otra


cadena.

VisStrTrim MIC blancos inicial y final de una cadena. No se ajusta


soportes incrustados.

Funciones de la ventana Tabla


Estas funciones gestionar ventanas de tabla.

Nombre de la función Descripción

SalTblAnyRows Determina si las filas han establecido ciertas banderas.

SalTblClearSelection Borra la selección de filas de una ventana de la tabla.

SalTblColumnAverage Calcula el promedio de los valores de una columna.

SalTblColumnSum Calcula la suma de los valores de una columna.

SalTblCopyRows Copia el contenido de filas especificadas en el portapapeles.

SalTblCreateColumn Crea columnas en tiempo de ejecución.

SalTblDefineRowHeader Define el aspecto y el comportamiento de un encabezado de


fila.

SalTblDefineSplitWindow Define cómo una ventana de la tabla se divide


horizontalmente.

SalTblDeleteRow Elimina una fila.

SalTblDeleteSelected Se aplica una instrucción DELETE para todas las filas seleccionadas.

1-48 Centura Generador de Referencia de funciones


Centura Categorías de funciones

Nombre de la función Descripción

SalTblDestroyColumns Destruye columnas automáticas creadas en tiempo de ejecución.

SalTblDoDeletes Se aplica una instrucción DELETE para todas las filas con ciertos
indicadores establecidos.

SalTblDoInserts Se aplica una instrucción INSERT a todas las nuevas filas.

SalTblDoUpdates Se aplica una instrucción UPDATE a todas las filas editados.

SalTblFetchRow Envía un mensaje SAM_FetchRow a la ventana de la tabla


si la fila especificada no está en la caché ventana de la tabla.

SalTblFindNextRow Exploraciones hacia adelante en busca de una fila que tiene ciertos
indicadores establecidos.

SalTblFindPrevRow Exploraciones hacia atrás en busca de una fila que tiene ciertos
indicadores establecidos.

SalTblGetColumnText Devuelve el valor de una columna especificada de la fila


contexto.

SalTblGetColumnTitle Devuelve el título de una columna.

SalTblGetColumnWindow Recupera identificador de ventana de una columna en función de su


posición en la ventana de tabla o su identificador de columna.

SalTblInsertRow Inserta una nueva fila.

SalTblKillEdit Activa el indicador ROW_Edited en una fila nueva o


modificada.

SalTblKillFocus Apaga el marco de enfoque.

SalTblPasteRows Pega el contenido del portapapeles en la ventana de la tabla


especificada.

SalTblPopulate Rellena una ventana de la tabla con un conjunto de resultados.

SalTblQueryColumnFlags Comprueba el estado de las banderas de una columna.

SalTblQueryColumnID Obtiene el identificador de una columna.

SalTblQueryColumnPos Obtiene la posición de una columna en la ventana de la tabla.

SalTblQueryColumnWidth Recupera ancho de una columna.

Centura Generador de Referencia de funciones 1-49


Capítulo 1 Tablas de función centura Builder

Nombre de la función Descripción

SalTblQueryContext Obtiene la fila actual contexto.

SalTblQueryFocus Identifica la celda con el foco.

SalTblQueryLockedColumns Devuelve el número de columnas cerradas.

SalTblQueryRowFlags Consultas de banderas de una fila.

SalTblQueryRowHeader Obtiene la definición de un encabezado de fila.

SalTblQueryScroll Obtiene la posición de desplazamiento actual y el rango.

SalTblQuerySplitWindow Especifica cómo la ventana de tabla se divide


horizontalmente.

SalTblQueryTableFlags Comprueba el estado de las banderas de un vector ventana.

SalTblQueryVisibleRange Obtiene el rango visible actual.

SalTblReset Borra una ventana de tablas.

SalTblScroll Se desplaza a una célula especificada.

SalTblSetCellTextColor Establece el color del texto de una celda.

SalTblSetColumnFlags Establece o borra las banderas de una columna.

SalTblSetColumnPos Mueve una columna.

SalTblSetColumnText Establece el valor de una columna especificada en la fila


contexto.

SalTblSetColumnTitle Establece el título de una columna.

SalTblSetColumnWidth Establece el ancho de una columna.

SalTblSetContext Establece la fila contexto.

SalTblSetFlagsAnyRows Establece o borra banderas fila.

SalTblSetFocusCell Establece el foco en una celda especificada.

SalTblSetFocusRow Establece la fila de enfoque.

SalTblSetLockedColumns Define el número de columnas que desea bloquear.

SalTblSetRange Define el número máximo de filas y mínimo.

SalTblSetRow Coloca el cursor en una fila.

SalTblSetRowFlags Establece o borra banderas fila.

1-50 Centura Generador de Referencia de funciones


Centura Categorías de funciones

Nombre de la función Descripción

SalTblSetTableFlags Establece o borra banderas ventana de la tabla.

SalTblSortRows Ordena el contenido de una ventana de tabla basada en los valores


de una columna especificada.

VisTblAllRows Determina si alguna fila en la ventana de la tabla especificada


coincide con ciertas banderas.

VisTblAutoSizeColumn Realiza una mejor ajuste de los contenidos de la pantalla de una columna
específica.

VisTblClearColumnSelection Borra la selección para todas las columnas de una ventana de la


tabla.

VisTblFindDateTime Localiza un valor de fecha / hora dentro de una columna.

VisTblFindNumber Localiza un valor numérico dentro de una columna.

VisTblFindString Localiza un valor de cadena dentro de una columna.

VisTblGetCell Recupera el contenido de una celda en una ventana de la tabla.

VisTblGetColumnTitle Recupera el contenido de un encabezado de columna. La fila


especificada se establece en la fila contexto.

Funciones de gestión de ventanas


Estas funciones permiten manipular las ventanas de una aplicación.

Nombre de la función Descripción

SalAppDisable Desactiva la entrada de abrir las ventanas.

SalAppEnable Activa la entrada para abrir las ventanas.

SalAppFind Encuentra una ventana de nivel superior visible de la aplicación


que se especifica y devuelve su identificador de ventana.

SalBringWindowToTop Trae una ventana especificada a la parte superior de todas las


ventanas superpuestas.

SalCenterWindow Centra una ventana.

Centura Generador de Referencia de funciones 1-51


Capítulo 1 Tablas de función centura Builder

Nombre de la función Descripción

SalCreateWindow Crea una ventana.

SalDestroyWindow Destruye una ventana.

SalDisableWindow Desactiva la entrada de ratón y el teclado a una ventana.

SalDisableWindowAndLabel Desactiva la entrada de ratón y teclado para una ventana,


incluyendo la desactivación de fondo de texto.

SalEnableWindow Permite la entrada de teclado y ratón a una ventana.

SalEnableWindowAndLabel Permite la entrada del teclado y del ratón a una ventana,


incluyendo la habilitación de fondo de texto.

SalFormGetParmNum Obtiene información sobre una ventana de formulario.

SalGetDefButton Obtiene el mango del botón de comando predeterminado.

SalGetFirstChild Busca el primer hijo de una ventana.

SalGetFocus Obtiene el objeto con el foco.

SalGetNextChild Busca el siguiente hijo de una ventana.

SalGetType Devuelve el tipo de objeto especificado.

SalGetWindowLabelText Recupera el texto fondo de una ventana.

SalGetWindowLoc Obtiene la posición actual de una ventana en los ejes X e


Y.

SalGetWindowSize Obtiene el tamaño de la ventana actual.

SalGetWindowState Obtiene el estado actual de una ventana.

SalGetWindowText Recupera el texto de una ventana.

SalHideWindow Oculta una ventana.

SalHideWindowAndLabel Oculta una ventana y su etiqueta asociada.

SalInvalidateWindow Provoca una ventana para ser pintada.

SalIsButtonChecked Determina si un botón se activa o una casilla de verificación


está activada.

SalIsWindowEnabled Especifica si una ventana está habilitado para el


ratón y el teclado.

1-52 Centura Generador de Referencia de funciones


Centura Categorías de funciones

Nombre de la función Descripción

SalIsWindowVisible Especifica si una ventana es visible.

SalMoveWindow Mueve una ventana de un número dado de unidades de


forma en el eje X e Y con respecto a su posición actual.

SalParentWindow Devuelve el identificador de ventana de una ventana padre o


propietario.

SalQueryFieldEdit Devuelve el valor de la marca de campo de edición para un campo de


datos, campo de varias líneas, columna de ventana de la tabla, o una
imagen.

SalSetDefButton Define el botón de comando predeterminado para una ventana


de formulario o cuadro de diálogo.

SalSetFieldEdit Establece o borra la marca de campo de edición para un campo de


datos, campo de varias líneas, columna de ventana de la tabla, o una
imagen.

SalSetFocus Establece el foco en una ventana.

SalSetWindowLabelText Establece el texto fondo de una ventana.

SalSetWindowLoc Mueve una ventana a una posición en los ejes X e Y.

SalSetWindowSize Cambia el tamaño de una ventana.

SalSetWindowText Establece el texto de una ventana.

SalShowWindow Hace una ventana visible.

SalShowWindowAndLabel Oculta una ventana y su etiqueta asociada.

SalStatusGetText Obtiene el texto que se muestra en la barra de estado de una


ventana de nivel superior.

SalStatusSetText Muestra especifican texto en la barra de estado de una


ventana de nivel superior.

SalStatusSetVisible Muestra u oculta la barra de estado opcional de una ventana de nivel


superior.

SalTBarSetVisible Muestra u oculta la barra de herramientas de una ventana de nivel superior.

SalUpdateWindow Actualiza el área cliente de una ventana.

Centura Generador de Referencia de funciones 1-53


Capítulo 1 Tablas de función centura Builder

Nombre de la función Descripción

SalWindowGetProperty Obtiene el valor de una propiedad con nombre para una


instancia de un QuickObject. La propiedad debe haber sido
creado en tiempo de diseño con el editor QuickObject.

SalWindowHandleToNumber Convierte un identificador de ventana a un número.

SalWindowIsDerivedFromClass Convierte un identificador de ventana a un número.

VisWinEnumProps Enumera la lista de propiedades para una ventana especificada.

VisWinGetProp Recupera un valor de la lista propiedad de una ventana


especificada.

VisWinIsChild Comprueba si una ventana especificada es un niño o un


descendiente directo de una ventana padre.

VisWinIsMaximized Comprueba si se maximiza una ventana


especificada.

VisWinIsMinimized Comprueba si se reduce al mínimo una ventana


especificada.

VisWinIsRestored Comprueba si una ventana especificada no es ni


maximizado o minimizado.

VisWinIsWindow Comprueba si una ventana especificada es válido.

VisWinLoadAccelerator Establece una pulsación de tecla aceleradora para una ventana.

VisWinMove Se mueve y cambia el tamaño de una ventana, en base a las coordenadas


del pixel.

VisWinRemoveProp Elimina una entrada de lista de propiedades para una ventana


especificada.

VisWinSetFlags Establece banderas para una ventana especificada.

VisWinSetProp Añade una nueva entrada en la lista propiedad o cambia una entrada de
lista de propiedades existente para una ventana especificada.

VisWinSetStyle Añade un estilo de ventana a una ventana.

VisWinSetTabOrder Cambia el orden de tabulación de un control.

VisWinShow Establece estado de visibilidad de una ventana.

1-54 Centura Generador de Referencia de funciones


Centura Generador de Referencia de funciones

Capitulo 2

Funciones centura
Builder

Esta es una lista alfabética de las funciones Centura Builder acompañados de información detallada acerca del
propósito de cada función, sus parámetros y el valor de retorno, y un ejemplo.

Descripción de las funciones incluyen:

• Sintaxis

• Descripción

• parámetros

• valor de retorno

• Ver también

• Ejemplo

Centura Generador de Referencia de funciones 2-1


Capítulo 2 Funciones centura Builder

SalAbort
Sintaxis Bok = SalAbort ( nExitCode)

Descripción Detiene el procesamiento de la acción de menú actual, acción de los mensajes, o la acción de la aplicación. Utilice
SalAbort cuando se desea terminar la secuencia de llamadas actual sin devolver un estado.

Por ejemplo, si la aplicación es de varias capas en las llamadas a funciones internas y se produce un error, SalAbort termina la
secuencia de llamada de corriente de las funciones y las hojas de la aplicación en el estado en que estaba antes de la primera
llamada a la función de esa secuencia.

parámetros nExitCode Recibe Número. El estado de la salida realizada por SalAbort. Centura ignora este
parámetro como entrada.

Valor de retorno Bok es TRUE si la función tiene éxito y FALSE si falla.

Ver también SalQuit

Ejemplo Si NO SQLCONNECT (HSQL)

Llamada SalAbort (-1)

SalAppDisable
Sintaxis Bok = SalAppDisable ( )

Descripción Desactiva entrada para todas las aplicaciones abiertas. Utilice SalAppDisable y SalAppEnable cuando hay varias
aplicaciones que se ejecutan simultáneamente y que quieren controlar la aplicación que recibe la entrada del usuario.

parámetros No hay parámetros.

Valor de retorno Bok es TRUE si la función tiene éxito y FALSE si falla.

Ver también SalAppEnable

Ejemplo Llamada SalAppDisable ()


Llamar SalLoadAppAndWait ( 'Excel', '') llamada

SalAppEnable ()

2-2 Centura Generador de Referencia de funciones


SalAppEnable
Sintaxis Bok = SalAppEnable ( )

Descripción Activa la entrada a todas las aplicaciones abiertas que fueron desactivados por SalAppDisable. Utilice
SalAppDisable y SalAppEnable cuando hay varias aplicaciones que se ejecutan simultáneamente y que quieren
controlar la aplicación que recibe la entrada del usuario.

parámetros No hay parámetros.

Valor de retorno Bok es TRUE si la función tiene éxito y FALSE si no lo hizo llamar previamente
SalAppDisable.

Ver también SalAppDisable

Ejemplo Llamar SalAppDisable ()

Llamar SalLoadAppAndWait de llamadas ( 'Excel', '') SalAppEnable

()

SalAppFind
Sintaxis CVent = SalAppFind ( strAppName, bActivate)

Descripción Encuentra una ventana de nivel superior visible de la aplicación que se especifica y devuelve su identificador de ventana.

SalAppFind busca primero para ejecutar sesiones de aplicaciones Centura y luego para ejecutar sesiones de
otras aplicaciones de Windows.

Si se especifica el nombre de la aplicación que llama en SalAppFind, Centura sólo puede encontrar otra instancia en
ejecución de la misma. Puede utilizar esta función para evitar que más de una instancia de una aplicación en ejecución.

Si hay varias instancias de una sola aplicación, SalAppFind encuentra y devuelve el identificador de ventana de la
primera instancia que encuentra.

Si una aplicación tiene múltiples ventanas de nivel superior, SalAppFind devuelve el identificador de la primera ventana de
nivel superior que encuentra. Llamando SalAppFind varias veces no siempre devuelve el mango de la misma ventana.

Si una aplicación no tiene ventanas visibles, entonces SalAppFind no puede encontrarlo.

parámetros strAppName Cuerda. El nombre de la aplicación sin la extensión. Para aplicaciones de Centura,
especifique el nombre de * .EXE. Para otras aplicaciones de Windows, especifique el
valor dado en la instrucción NAME en el archivo * .def de la aplicación.

bActivate Boole. Si se establece en TRUE bActivate, SalAppFind también activa la


ventana de la aplicación.

Centura Generador de Referencia de funciones 2-3


Capítulo 2 Funciones centura Builder

Valor de retorno CVent es el identificador de la ventana.

Ejemplo En SAM_AppStartup Si SalAppFind ( ' FACTURA', true)! = HWndNULL

llamada SalQuit ()

SalArrayAvg
Sintaxis NAVG = SalArrayAvg ( nArrayNum)

Descripción Devuelve el valor medio de todos los números en una matriz.

parámetros nArrayNum Matriz numérica. El nombre de una serie de números.

Valor de retorno NAVG es el valor medio en una serie de números.

Ver también SalArrayDimCount


SalArrayGetLowerBound
SalArrayGetUpperBound
SalArrayIsEmpty SalArrayMax
SalArrayMin

SalArraySetUpperBound
SalArraySum

Ejemplo en SAM_Create
Establecer dfAvg = SalArrayAvg ( nArrayNum)

SalArrayDimCount
Sintaxis Bok = SalArrayDimCount ( aMatriz, Ndim)

Descripción Devuelve el número de dimensiones en una matriz.

parámetros aMatriz Formación. El nombre de la matriz para consultar.

Ndim Recibe Número. Número de dimensiones de la matriz.

Valor de retorno Bok es TRUE si la función tiene éxito y FALSE si falla.

Ver también SalArrayAvg


SalArrayGetLowerBound
SalArrayGetUpperBound
SalArrayIsEmpty SalArrayMax
SalArrayMin

SalArraySetUpperBound

2-4 Centura Generador de Referencia de funciones


SalArraySum

Ejemplo En SAM_Create Conjunto Bok = SalArrayDimCount

(AMatriz, Ndim)

Si Ndim = 0

Establecer bDimTrue = False

SalArrayGetLowerBound
Sintaxis Bok = SalArrayGetLowerBound ( aMatriz, Ndim, NBOUND)

Descripción Devuelve el límite inferior de una matriz.

parámetros aMatriz Formación. El nombre de la matriz para consultar.

Ndim Número. Número de la dimensión de consulta. La primera dimensión es uno, el


segundo es de dos, y así sucesivamente.

NBOUND Recibe Número. Menor valor determinado.

Valor de retorno Bok es TRUE si la función tiene éxito y FALSE si falla.

Ver también SalArrayAvg SalArrayDimCount


SalArrayGetUpperBound
SalArrayIsEmpty SalArrayMax
SalArrayMin

SalArraySetUpperBound
SalArraySum

Ejemplo En SAM_Click Conjunto Bok = SalArrayGetLowerBound

(AMatriz, NBOUND)

SalArrayGetUpperBound
Sintaxis Bok = SalArrayGetUpperBound ( aMatriz, Ndim, NBOUND)

Descripción Devuelve el límite superior de una matriz.

parámetros aMatriz Formación. El nombre de la matriz para consultar.

Ndim Número. Número de la dimensión de consulta. La primera dimensión es uno, el


segundo es de dos, y así sucesivamente.

NBOUND Recibe Número. valor límite superior.

Valor de retorno Bok es TRUE si la función tiene éxito y FALSE si falla.

Centura Generador de Referencia de funciones 2-5


Capítulo 2 Funciones centura Builder

Ver también SalArrayAvg SalArrayDimCount


SalArrayGetLowerBound
SalArrayIsEmpty SalArrayMax
SalArrayMin

SalArraySetUpperBound
SalArraySum

Ejemplo En SAM_Click Conjunto Bok = SalArrayGetUpperBound

(AMatriz, NBOUND)

SalArrayIsEmpty
Sintaxis bDatos = SalArrayIsEmpty ( aMatriz)

Descripción Determina si una matriz dinámica contiene datos.

parámetros aMatriz Formación. El nombre de la matriz para consultar.

Valor de retorno bDatos es TRUE si la matriz no contiene datos y FALSE si se tiene datos.

Ver también SalArrayAvg SalArrayDimCount


SalArrayGetLowerBound
SalArrayGetUpperBound
SalArrayMax SalArrayMin

SalArraySetUpperBound
SalArraySum

Ejemplo En SAM_Click Si
No SalArrayIsEmpty (AMatriz)

Llamada ...

2-6 Centura Generador de Referencia de funciones


SalArrayMax
Sintaxis nMax = SalArrayMax ( nArrayNum)

Descripción Devuelve el valor máximo de un conjunto de números.

parámetros nArrayNum Matriz numérica. El nombre de una serie de números.

Valor de retorno nMax es el valor máximo en una matriz de números.

Ver también SalArrayAvg SalArrayDimCount


SalArrayGetLowerBound
SalArrayGetUpperBound
SalArrayIsEmpty SalArrayMin

SalArraySetUpperBound
SalArraySum

Ejemplo en SAM_Create
Establecer dfMax = SalArrayMax ( nArrayNum)

SalArrayMin
Sintaxis nMin = SalArrayMin ( nArrayNum)

Descripción Devuelve el valor mínimo de un conjunto de números. nArrayNum

Matriz numérica. El nombre de una serie de números.

Valor de retorno nMin es el valor mínimo en una matriz de números.

Ver también SalArrayAvg SalArrayDimCount


SalArrayGetLowerBound
SalArrayGetUpperBound
SalArrayIsEmpty SalArrayMax

SalArraySetUpperBound
SalArraySum

Ejemplo en SAM_Create
Establecer dfMin = SalArrayMin ( nArrayNum)

Centura Generador de Referencia de funciones 2-7


Capítulo 2 Funciones centura Builder

SalArraySetUpperBound
Sintaxis Bok = SalArraySetUpperBound ( aMatriz, Ndim, NBOUND)

Descripción Establece el límite superior de una matriz.

Cuando se llama a esta función de una dimensión distinta de la primera, Centura debe copiar la mayor parte de los datos de la
matriz. Puede haber un costo de rendimiento cuando se llama a esta función de cualquier dimensión, pero la primera.

parámetros aMatriz Formación. El nombre de la matriz para consultar.

Ndim Número. Número de la dimensión de consulta. La primera dimensión es uno, el


segundo es de dos, y así sucesivamente.

NBOUND Número. valor límite superior. Especificar -1 para restablecer una matriz dinámica a cero
elementos. Especificar AC_Dynamic para cambiar una matriz estática a una matriz
dinámica. (Se puede hacer sólo la primera dimensión de una dinámica matriz.)

Valor de retorno Bok es TRUE si la función tiene éxito y FALSE si falla.

Ver también SalArrayAvg SalArrayDimCount


SalArrayGetLowerBound
SalArrayGetUpperBound
SalArrayIsEmpty SalArrayMax
SalArrayMin SalArraySum

Ejemplo En SAM_Click Call SalArraySetUpperBound

(AMatriz, 1, 5)

SalArraySum
Sintaxis NSUM = SalArraySum ( nArrayNum)

Descripción Devuelve la suma de los elementos de una matriz de números.

parámetros nArrayNum Matriz numérica. El nombre de una serie de números.

Valor de retorno NSUM es la suma de los elementos de una matriz de números.

Ver también SalArrayAvg SalArrayDimCount


SalArrayGetLowerBound
SalArrayGetUpperBound

2-8 Centura Generador de Referencia de funciones


SalArrayIsEmpty
SalArrayMax
SalArrayMin
SalArraySetUpperBound

Ejemplo en SAM_Create
Establecer dfSum = SalArraySum ( nArrayNum)

SalBringWindowToTop
Sintaxis Bok = SalBringWindowToTop ( hWndToExpose)

Descripción Trae una ventana a la parte superior de todas las ventanas superpuestas.

parámetros hWndToExpose Identificador de ventana. El mango (o nombre) de la ventana para acceder a la parte superior.

Valor de retorno Bok es TRUE si la función tiene éxito y FALSE si falla.

Ver también SalHideWindow


SalShowWindow

Ejemplo Si (hWndCustomer)
Llamada SalBringWindowToTop (HWndCustomer)

SalCenterWindow
Sintaxis Bok = SalCenterWindow ( hWndCenter)

Descripción Centra una ventana. Si la ventana es una ventana de nivel superior, Centura lo centra en el escritorio. Si la ventana es una
ventana secundaria, Centura lo centra en la parte superior de su matriz.

parámetros hWndCenter Identificador de ventana. El mango (o nombre) de la ventana para el centro.

Valor de retorno Bok es TRUE si la función tiene éxito y FALSE si falla.

Ver también SalMoveWindow

Ejemplo Llamada SalCenterWindow ( pbExample)

Centura Generador de Referencia de funciones 2-9


Capítulo 2 Funciones centura Builder

SalClearField
Sintaxis Bok = SalClearField ( hWndFldToClear)

Descripción Borra el valor de un campo de datos, campo de varias líneas, o columna ventana de la tabla.

parámetros hWndFldToClear Identificador de ventana. El mango (o nombre) del campo de datos, campo de varias líneas,
o columna ventana de la tabla para borrar.

Valor de retorno Bok es TRUE si la función tiene éxito y FALSE si falla.

Ver también SalIsNull

Ejemplo Si (dfAge <0)


Llamada SalClearField (DfAge)

SalColorFromRGB
Sintaxis nColor = SalColorFromRGB ( Nred, nGreen, Nblue)

Descripción Compone un color de valores de rojo, verde y azul.

parámetros Nred Número. Un número de 0 a 255.

nGreen Número. Un número de 0 a 255.

Nblue Número. Un número de 0 a 255.

Valor de retorno nColor es el color creado.

Ver también SalColorGet


SalColorGetSysColor
SalColorSet
SalColorToRGB

Ejemplo Establecer Nred = 128 = 128

Conjunto nGreen Conjunto

Nblue = 128 = Conjunto

nColor SalColorFromRGB ( Nred, nGreen, Nblue)


Si NO SalColorSet (hWndItem, COLOR_IndexWindow, nColor)
...

2-10 Centura Generador de Referencia de funciones


SalColorGet
Sintaxis nColor = SalColorGet ( hWndColored, nColorIndex)

Descripción Obtiene el color de una ventana.

parámetros hWndColored Identificador de ventana. El mango (o nombre) de la ventana cuyo color desea.

nColorIndex Número. El color de una parte de la ventana, representado por una de estas
constantes: COLOR_IndexCellText COLOR_IndexTransparent
COLOR_IndexWindow COLOR_IndexWindowText

Valor de retorno nColor es el color devuelto. Puede ser definida por el usuario o una de la ventana predefinida

colores (excluyendo COLOR_Default y los tres COLOR_Sys * constantes). Si especifica


COLOR_IndexTransparent en el segundo parámetro y el color transparente no está definida, SalColorGet
vuelve COLOR_None.

Ver también SalColorFromRGB


SalColorGetSysColor
SalColorSet
SalColorToRGB

Ejemplo Establecer nColor = SalColorGet (HWndItem, COLOR_IndexWindow)


Si nColor = COLOR_Default
Llamar SalColorSet (hWndItem, COLOR_IndexWindow,

COLOR_Magenta)

SalColorGetSysColor
Sintaxis nColor = SalColorGetSysColor ( nColorIndex)

Descripción Obtiene un color del sistema.

parámetros nColorIndex Número. El color de una parte de la ventana, representado por una de estas
constantes: COLOR_SysWindow COLOR_SysWindowFrame
COLOR_SysWindowText

Centura Generador de Referencia de funciones 2-11


Capítulo 2 Funciones centura Builder

Valor de retorno nColor es el color devuelto. Puede ser uno de los colores de las ventanas predefinidas

(Excluyendo COLOR_Default, COLOR_None, y los tres COLOR_Sys * constantes).

Ver también SalColorFromRGB


SalColorGet
SalColorSet
SalColorToRGB

Ejemplo Establecer nSysColorBckgrnd = SalColorGetSysColor (COLOR_SysWindow)

SalColorSet
Sintaxis Bok = SalColorSet ( hWndToSet, nColorIndex, nColor)

Descripción Establece el color de una ventana.

parámetros hWndToSet Identificador de ventana. El mango (o nombre) de la ventana cuyo color desea
establecer.

nColorIndex Número. El color de una parte de la ventana, representado por una de estas
constantes: COLOR_IndexCellText COLOR_IndexTransparent
COLOR_IndexWindow COLOR_IndexWindowText

nColor Número. Un valor definido por el usuario, un valor formulado usando SalColorFromRGB, o
cualquiera de los colores de Windows predefinidas. Para desactivar el color transparente,
especifique COLOR_None.

Valor de retorno Bok es TRUE si la función tiene éxito y FALSE si falla.

Ver también SalColorFromRGB


SalColorGet
SalColorGetSysColor
SalColorToRGB

Ejemplo Llamada SalColorSet (HWndItem, COLOR_IndexWindow, Color_Red ¡)

2-12 Centura Generador de Referencia de funciones


SalColorToRGB
Sintaxis Bok = SalColorToRGB ( nColor, Nred, nGreen, Nblue)

Descripción Se descompone por un color en valores de rojo, verde y azul.

parámetros nColor Número. Un valor definido por el usuario o cualquiera de los colores de la ventana
predefinidos (excluyendo COLOR_Default, COLOR_None, y los tres COLOR_Sys *
constantes).

Nred Recibe número. Un número de 0 a 255 que representa el valor de color rojo.

nGreen Recibe número. Un número de 0 a 255 que representa el valor de verde.

Nblue Recibe número. Un número de 0 a 255 que representa el valor de azul.

Valor de retorno Bok es TRUE si la función tiene éxito y FALSE si falla.

Ver también SalColorFromRGB


SalColorGet
SalColorGetSysColor
SalColorSet

Ejemplo Si no SalColorToRGB ( nColor, Nred, nGreen, Nblue)


... Errores ...

SalCompileAndEvaluate
Sintaxis nTipo = SalCompileAndEvaluate ( strExpression, nError, nErrorPos, Nreturn, strReturn,
dtReturn, hWndReturn, bInhibitErrors, strContext)

Descripción Evalúa una expresión y devuelve el valor de la expresión en el parámetro recibir apropiada a su tipo de datos.
SalCompileAndEvaluate le permite acceder al valor de una variable cuyo nombre no especifica hasta el tiempo
de ejecución.

parámetros strExpression Cuerda. La expresión a evaluar.

nError Recibe Número. El número de error, si uno se devuelve.

nErrorPos Recibe Número. La posición en strExpression a la que un error, si lo hay, se


produjo.

Nreturn Recibe Número. Este parámetro se establece si strExpression se evalúa como


un número.

strReturn Recibe cadena. Este parámetro se establece si strExpression se evalúa como una cadena.

Centura Generador de Referencia de funciones 2-13


Capítulo 2 Funciones centura Builder

dtReturn Recibe fecha / hora. Este parámetro se establece si strExpression se evalúa como un
valor de fecha / hora.

hWndReturn Recibe identificador de ventana. Este parámetro se establece si


strExpression evalúa a un mango.

bInhibitErrors Boole. Si es TRUE, Centura no informa de compilación o errores de evaluación para el


usuario. Especifique TRUE si la aplicación procesa sus propios errores. Si es falso,
Centura informa de errores de compilación y evaluación para el usuario en un cuadro de
diálogo.

strContext Cuerda. El identificador de un contexto de ejecución, ya sea devuelto por


SalContextBreak o SalContextCurrent.

Valor de retorno nTipo es igual a uno de los siguientes valores si la función tiene éxito:

EVAL_Date
EVAL_Handle
EVAL_If
EVAL_Number
EVAL_Set
eval_string
EVAL_Template

Ver también SalContextBreak


SalContextCurrent

Ejemplo Establecer nTipo = SalCompileAndEvaluate (StrExpression, nError,


nErrorPos, Nreturn, strReturn, dtReturn, hWndReturn, FALSE,
strContext) Si nTipo = EVAL_Number

Llamar SalNumberToStr (Nreturn, 0, strString)

...

SalContextBreak
Sintaxis strContext = SalContextBreak ( )

Descripción Recupera el contexto de la declaración de la rotura ejecutado más recientemente. Utilice esta función con
SalCompileAndEvaluate.

parámetros No hay parámetros.

Valor de retorno strContext sirve como el último parámetro de la función SalCompileAndEvaluate.

Ver también SalCompileAndEvaluate


SalContextCurrent

2-14 Centura Generador de Referencia de funciones


Ejemplo Establecer strContext = SalContextBreak ()

SalContextCurrent
Sintaxis strContext = SalContextCurrent ( )

Descripción Recupera el contexto de ejecución actual. Utilice esta función con


SalCompileAndEvaluate.

parámetros No hay parámetros.

Valor de retorno strContext sirve como el último parámetro de la función SalCompileAndEvaluate.

Ver también SalCompileAndEvaluate


SalContextBreak

Ejemplo Establecer strContext = SalContextCurrent ()

SalCreateWindow
Sintaxis hWndCreated = SalCreateWindow ( tWndToCreate, hWndOwner, Parm1,
Parm2, ...)

Descripción Crea cajas modales diálogo, ventanas, ventanas MDI de formularios y ventanas de tabla de nivel superior en tiempo de ejecución.

Esta función acepta una cadena o una plantilla como el primer parámetro. Cuando se pasa una cadena, no se puede pasar
también parámetros de la ventana.

Si especifica un propietario (hWndOwner), la nueva ventana muestra siempre en la parte superior de su propietario, se
cierra cuando su propietario se cierra, y se esconde cuando se minimiza su propietario. SalCreateWindow puede pasar
datos a y desde la ventana que se crea mediante la aceptación de un número variable de parámetros. Los tipos de datos
de estos parámetros deben coincidir con los que se crean los tipos de datos de parámetros de la ventana. Se definen los
parámetros de la ventana en la sección de parámetros de la ventana del esquema de aplicación. Por ejemplo, este código
pasa la variable, nGlobal y el campo de datos, DF1 a la ventana del formulario, frmMain. Antes SAM_Create se envía a
frmMain, su primer parámetro ventana se inicializa con el valor de nGlobal y su parámetro segunda ventana se inicializa
con el valor de DF1.

Llamar SalCreateWindow (frmMain, hWndNULL, nGlobal, DF1)

Puede utilizar parámetros de la ventana para devolver información desde la ventana que se crea mediante el uso de un tipo de
recepción. Sin embargo, puede inicializar recibir parámetros de ventana única con variables. Esto significa que no se puede
pasar un campo de datos o cualquier otro objeto de la ventana a un parámetro ventana que se define como un tipo de
recepción.

parámetros tWndToCreate Plantilla o cadena. El nombre de la ventana para crear.

Centura Generador de Referencia de funciones 2-15


Capítulo 2 Funciones centura Builder

Nota: Si especifica un valor de cadena, no se puede pasar argumentos de los parámetros


de la ventana (Parm1, PARM2, ...).

hWndOwner Identificador de ventana. El mango (o nombre) de la ventana de propietario. Especificar


hWndNULL si no hay una ventana de propietario. Tenga en cuenta que si se crea un formulario de
nivel superior interior de una ventana MDI, entonces esa ventana MDI siempre será el dueño de
esta forma.

parm1 Cualquier tipo de datos Centura. El (opcional) primero de un número variable de


parámetros de la ventana.

parm2 Cualquier tipo de datos Centura. El (opcional) segundo de un número variable de


parámetros de la ventana.

Valor de retorno hWndCreated es la manija de la nueva ventana.

Ver también SalModalDialog


SalDestroyWindow

Ejemplo en SAM_Click
Si no SalCreateWindow ( frmCustomer, hWndNULL)
... Error...

SalCreateWindowExWithParms
Sintaxis hWndCreated = (SalCreateWindowExWithParms tWndToCreate,
hWndOwner, nLeft, nTop, nWidth, nHeight, nFlags ...)

Descripción Crea un formulario, cuadro de diálogo o ventana de la tabla como un hijo de otra forma o cuadro de diálogo en tiempo de ejecución.

Esta función acepta una cadena o una plantilla como el primer parámetro. Cuando se pasa una cadena, no se puede pasar
también parámetros de la ventana.

Si especifica un propietario (hWndOwner), la nueva ventana muestra siempre en la parte superior de su propietario, se cierra
cuando su propietario se cierra, y se esconde cuando se minimiza su propietario. SalCreateWindowExWithParms pueden pasar
datos a y desde la ventana que se crea mediante la aceptación de un número variable de parámetros. Los tipos de datos de
estos parámetros deben coincidir con los que se crean los tipos de datos de parámetros de la ventana. Se definen los
parámetros de la ventana en la sección de parámetros de la ventana del esquema de aplicación.

Por ejemplo, este código pasa la variable, nGlobal y el campo de datos, DF1 a la ventana del formulario,
frmMain. Antes SAM_Create se envía a frmMain, su primer parámetro ventana se inicializa con el valor de
nGlobal y su parámetro segunda ventana se inicializa con el valor de DF1.

2-16 Centura Generador de Referencia de funciones


SalCreateWindowExWithParms de llamadas (frmMain, hWndNULL, nLeft,
nTop, nWidth, nHeight, nGlobal, DF1)

Puede utilizar parámetros de la ventana para devolver información desde la ventana que se crea mediante el uso de un tipo de
recepción. Sin embargo, puede inicializar recibir parámetros de ventana única con variables. Esto significa que no se puede
pasar un campo de datos o cualquier otro objeto de la ventana a un parámetro ventana que se define como un tipo de
recepción.

parámetros tWndToCreate Plantilla o cadena. El nombre de la ventana para crear. Nota: Si especifica un valor

de cadena, no se puede pasar argumentos de los parámetros de la ventana (Parm1,

PARM2, ...).

hWndOwner Identificador de ventana. El mango (o nombre) de la ventana de propietario. Especificar


hWndNULL si no hay una ventana de propietario. Tenga en cuenta que si se crea un formulario de
nivel superior interior de una ventana MDI, entonces esa ventana MDI siempre será el dueño de
esta forma.

nLeft, nTop Posición de la ventana en unidades de forma.

nWidth, nHeight Tamaño de la ventana de unidades de la forma.

nFlags A continuación se puede combinar con el carácter '|' operador:

CREATE_AsChild Crear las ventanas como un niño


hWndPrincipal. HwndParent debe ser una forma, cuadro de

diálogo o en la barra de herramientas.

CREATE_Border Cuando se utiliza con CREATE_AsChild, la


ventana tendrá un borde.
CREATE_Hidden La ventana se creará pero no se muestra.

parm1 Cualquier tipo de datos Centura. El (opcional) primero de un número variable de


parámetros de la ventana.

parm2 Cualquier tipo de datos Centura. El (opcional) segundo de un número variable de


parámetros de la ventana.

Valor de retorno hWndCreated es la manija de la nueva ventana.

Ver también SalModalDialog


SalDestroyWindow

Ejemplo en SAM_Click
Si no SalCreateWindowExWithParms (FrmCustomer, hWndNULL,
nLeft, nTop, nWidth, nHeight)
... Error...

Centura Generador de Referencia de funciones 2-17


Capítulo 2 Funciones centura Builder

SalCursorClear
Sintaxis Bok = SalCursorClear ( hWnd, nTipo)

Descripción Borra el cursor de una ventana.

parámetros CVent Identificador de ventana. El mango (o nombre) de una ventana.

nTipo Número. El tipo de cursor. Especificar una de estas constantes:

CURSOR_DisableDrop CURSOR_DragDrop CURSOR_Window

Valor de retorno Bok es TRUE si la función tiene éxito y FALSE si falla.

Ver también SalCursorSet


SalCursorSetFile
SalCursorSetString

Ejemplo En SAM_Click Call SalCursorClear

(FrmMain, Cursor_Windows)

SalCursorSet
Sintaxis Bok = SalCursorSet ( hWnd, tResource, nTipo)

Descripción Establece el cursor de una ventana.

parámetros CVent Identificador de ventana. El mango (o nombre) de una ventana.

tResource Modelo. Un recurso de icono de la sección de Recursos del contorno. Especificar

uno de estos cursores proporcionados por el sistema: CURSOR_Arrow

CURSOR_Cross CURSOR_IBeam CURSOR_Icon CURSOR_Size

CURSOR_SizeNESW CURSOR_SizeNS CURSOR_SizeNWSE CURSOR_SizeWE

CURSOR_UpArrow CURSOR_Wait

2-18 Centura Generador de Referencia de funciones


nTipo Número. El tipo de cursor. Especificar una de estas constantes:

CURSOR_DisableDrop CURSOR_DragDrop CURSOR_Window

Valor de retorno Bok es TRUE si la función tiene éxito y FALSE si falla.

Ver también SalCursorClear


SalCursorSetFile
SalCursorSetString

Ejemplo En SAM_Click Call SalCursorSet

(FrmMain, Cursor_Arrow, Cursor_Window)

SalCursorSetFile
Sintaxis Bok = SalCursorSetFile ( hWnd, sFile, nTipo)

Descripción Define un cursor definido por la aplicación de la ventana especificada. Utilice esta función para establecer el cursor desde una imagen
almacenada en un archivo.

parámetros CVent Identificador de ventana. El mango (o nombre) de una ventana.

sFile Cuerda. El nombre de un cursor o un archivo de icono.

nTipo Número. El tipo de cursor. Especificar una de estas constantes:

CURSOR_DisableDrop
CURSOR_DragDrop
CURSOR_Window

Valor de retorno Bok es TRUE si la función tiene éxito y FALSE si falla.

Ver también SalCursorClear


SalCursorSet
SalCursorSetString

Ejemplo En SAM_Click Call SalCursorSetFile

(FrmMain, “file1.cne”, Cursor_Window)

SalCursorSetString
Sintaxis Bok = SalCursorSetString ( hWnd, sBuffer, nTipo)

Descripción Establece el cursor de una ventana de una variable de cadena.

parámetros CVent Identificador de ventana. El mango (o nombre) de una ventana.

Centura Generador de Referencia de funciones 2-19


Capítulo 2 Funciones centura Builder

sBuffer Cuerda. La imagen de un cursor o un archivo de icono.

nTipo Número. El tipo de cursor. Especificar una de estas constantes:

CURSOR_DisableDrop CURSOR_DragDrop CURSOR_Window

Valor de retorno Bok es TRUE si la función tiene éxito y FALSE si falla.

Ver también SalCursorClear


SalCursorSet
SalCursorSetFile

Ejemplo En SAM_Click Call SalCursorSetString

(FrmMain, strCurBuf, Cursor_Window)

SalDateConstruct
Sintaxis dtDate = SalDateConstruct ( nYear, nMonth, Nday, Nhour, nMinute, Nsecond)

Descripción Devuelve la fecha / hora construido a partir de los parámetros Nyear, nMonth, Nday, Nhour, nMinute y
Nsecond.

Si especifica valores de los parámetros no válidos, una construcción fecha inesperado puede resultar.

Nota: Si cualquiera de los valores de los parámetros tiene menos que el número especificado de dígitos, SalDateConstruct almohadillas el
valor resultante con ceros a la izquierda (0). Por ejemplo, si es nYear 92, dtDate comienza con 0092.

parámetros nYear Número. Un número con un valor de año de 4 dígitos.

nMonth Número. Un número con un valor de 2 dígitos mes entre 01 y 12 inclusive.

nday Número. Un número con un valor día 2 dígitos entre 01 y 31 inclusive.

Nhour Número. Un número con un valor de hora de 2 dígitos entre 0 y 23 inclusive.

nMinute Número. Un número con un valor minutos 2 dígitos entre 01 y 59 inclusive.

Nsecond Número. Un número con un segundo valor de 2 dígitos entre 01 y 59 inclusive.

Valor de retorno dtDate es el valor de fecha / hora de nueva construcción.

2-20 Centura Generador de Referencia de funciones


Ejemplo en SAM_Create
Establecer dtDeb = SalDateConstruct (1996, 1, 1, 10, 30, 1)

SalDateCurrent
Sintaxis dtNow = SalDateCurrent ( )

Descripción Devuelve el PC de fecha / hora actual.

Para obtener la fecha / hora del sistema del servidor de base de datos, utilice una palabra clave sistema de base de datos
(SYSDATE, SYSTIME o SYSDATETIME) en una instrucción SELECT de SQL.

parámetros No hay parámetros.

Valor de retorno dtNow es la fecha / hora del PC.

Ejemplo en SAM_Create
Establecer dfCurrent = SalDateCurrent ()

SalDateDay
Sintaxis nday ​= SalDateDay ( dtDateTime)

Descripción Devuelve la parte correspondiente al día (1 a 31) de un valor de fecha / hora o devuelve -1 si especifica DATETIME_Null
como parámetro.

parámetros dtDateTime Fecha y hora. Un valor de fecha / hora.

Valor de retorno Nday es un número entre 1 y 31.

Ver también SalDateMonth

SalDateYear

Ejemplo Establecer Nday = SalDateDay ( dtDateTime)

SalDateHour
Sintaxis Nhour = SalDateHour ( dtDateTime)

Descripción Devuelve la parte de horas (0 a 23) de un valor de fecha / hora o devuelve -1 si especifica DATETIME_Null
como parámetro.

parámetros dtDateTime Fecha y hora. Un valor de fecha / hora.

Valor de retorno Nhour es un número entre 0 y 23.

Ver también SalDateMinute

SalDateSecond

Centura Generador de Referencia de funciones 2-21


Capítulo 2 Funciones centura Builder

Ejemplo Establecer Nhour = SalDateHour (DtDateTime)

SalDateMinute
Sintaxis nMinute = SalDateMinute ( dtDateTime)

Descripción Devuelve la porción minutos (0 a 59) de un valor de fecha / hora o devuelve -1 si especifica DATETIME_Null
como parámetro.

parámetros dtDateTime Fecha y hora. Un valor de fecha / hora.

Valor de retorno nMinute es un número entre 0 y 59.

Ver también SalDateHour

SalDateSecond

Ejemplo Establecer nMinute = SalDateMinute (DtDateTime)

SalDateMonth
Sintaxis nMonth = SalDateMonth ( dtDateTime)

Descripción Devuelve la parte correspondiente al mes (1 a 12) de un valor de fecha / hora o devuelve -1 si especifica DATETIME_Null
como parámetro.

parámetros dtDateTime Fecha y hora. Un valor de fecha / hora.

Valor de retorno nMonth es un número entre 1 y 12.

Funciones relacionadas

SalDateDay
SalDateYear

Ejemplo Establecer nMonth = SalDateMonth ( dtDateTime)

SalDateMonthBegin
Sintaxis dtMonthBegin = SalDateMonthBegin ( dtDateTime)

Descripción Devuelve la fecha del primer día del mes o vuelve DATETIME_Null si el valor especificado es nulo. Por
ejemplo, si dtDateTime es de 25 de diciembre de 1992 SalDateMonthBegin devuelve 1 de diciembre de.,
1992

parámetros dtDateTime Fecha y hora. Un valor de fecha / hora.

Valor de retorno dtMonthBegin es la fecha del primer día del mes de dtDateTime.

Ver también SalDateQuarterBegin

2-22 Centura Generador de Referencia de funciones


SalDateWeekBegin

Ejemplo Establecer dtMonthBegin = SalDateMonthBegin (SalDateCurrent ())

SalDateQuarter
Sintaxis nQuarter = SalDateQuarter ( dtDateTime)

Descripción Devuelve el trimestre del año (1 a 4) de un valor de fecha / hora o devuelve -1 si especifica DATETIME_Null como
parámetro.

parámetros dtDateTime Fecha y hora. Un valor de fecha / hora.

Valor de retorno nQuarter es un número entre 1 y 4.

Ejemplo Seleccione el caso ( SalDateQuarter (DtDate))


Caso 1
Establecer strQuarter = Break 'del primer trimestre'

...

SalDateQuarterBegin
Sintaxis dtQuarterBegin = SalDateQuarterBegin ( dtDateTime)

Descripción Devuelve la fecha del primer día de la cuarta parte de un valor de fecha / hora o vuelve DATETIME_Null si
el valor especificado es nulo.

parámetros dtDateTime Fecha y hora. Un valor de fecha / hora.

Valor de retorno dtQuarterBegin es el primer día del trimestre de dtDateTime.

Ver también SalDateMonthBegin


SalDateWeekBegin
SalDateYearBegin

Ejemplo Establecer dtQuarterBegin = SalDateQuarterBegin

(SalDateCurrent ()

SalDateSecond
Sintaxis nSeconds = SalDateSecond ( dtDateTime)

Descripción Devuelve la porción segundos (0 a 59) de un valor de fecha / hora o devuelve -1 si especifica DATETIME_Null
como parámetro.

parámetros dtDateTime Fecha y hora. Un valor de fecha / hora.

Centura Generador de Referencia de funciones 2-23


Capítulo 2 Funciones centura Builder

Valor de retorno nSeconds es un número entre 0 y 59.

Ver también SalDateHour


SalDateMinute

Ejemplo Set = nSeconds SalDateSecond ( dtDateTime)

SalDateToStr
Sintaxis nLongitud = SalDateToStr ( dtDateTime, strDate)

Descripción Convierte un valor de fecha / hora para un valor de cadena o devuelve -1 si especifica DATETIME_Null
como parámetro.

parámetros dtDateTime Fecha y hora. El valor de fecha / hora para convertir.

strDate Recibe cadena. El valor de la cadena resultante.

Valor de retorno nLength es la longitud de strDate.

Ver también SalFmtFormatDateTime


SalStrToDate

Ejemplo Llamada SalDateToStr (DtDateTime, strDateTime)


! strDateTime = AAAA-MM-DD-HH.MM.SS.TTTTTT

SalDateWeekBegin
Sintaxis dtWeekBegin = SalDateWeekBegin ( dtDateTime)

Descripción Devuelve la fecha del lunes anterior o el día actual si es un lunes o vuelve DATETIME_Null si el
valor especificado es nulo.

parámetros dtDateTime Fecha y hora. Un valor de fecha / hora.

Valor de retorno dtWeekBegin es la fecha del lunes anterior, o la fecha actual si es lunes.

Ver también SalDateMonthBegin


SalDateQuarterBegin
SalDateYearBegin

Ejemplo Establecer dtWeekBegin = SalDateWeekBegin ( SalDateCurrent ())

2-24 Centura Generador de Referencia de funciones


SalDateWeekday
Sintaxis nWeekday = SalDateWeekday ( dtDateTime)

Descripción Devuelve el día de la semana como un número entre 0 y 6 o devuelve -1 si especifica DATETIME_Null
como parámetro. 0 representa Sábado, 1 representa S D OMINGO, y por lo

en.

parámetros dtDateTime Fecha y hora. Un valor de fecha / hora.

Valor de retorno

nWeekday es un número entre 0 y 6.

Ejemplo Seleccione el caso ( SalDateWeekday (DtDate))


caso 0
Establecer la rotura strWeekday = 'Sábado'

SalDateYear
Sintaxis nYear = SalDateYear ( dtDateTime)

Descripción Devuelve la parte de año de una fecha o devuelve -1 si especifica DATETIME_Null como parámetro.

parámetros dtDateTime Fecha y hora. Un valor de fecha / hora.

Valor de retorno nYear es la parte de año de una fecha.

Ver también SalDateDay


SalDateMonth

Ejemplo Establecer nYear = SalDateYear (DtDateTime)

SalDateYearBegin
Sintaxis dtYearBegin = SalDateYearBegin ( dtDateTime)

Descripción Devuelve la fecha del primer día del año o vuelve DATETIME_Null si el valor especificado es nulo.

parámetros dtDateTime Fecha y hora. Un valor de fecha / hora.

Valor de retorno dtYearBegin es la fecha del primer día del año.

Ver también SalDateMonthBegin


SalDateQuarterBegin
SalDateWeekBegin

Centura Generador de Referencia de funciones 2-25


Capítulo 2 Funciones centura Builder

Ejemplo Establecer dtYearBegin = SalDateYearBegin (SalDateCurrent ())

SalDDEAddAtom
Sintaxis nNewAtom = SalDDEAddAtom ( strStringToAdd)

Descripción Añade una cadena a la tabla de átomo global y crea un nuevo átomo de identificar la cadena. Si la cadena de añadir ya se
encuentra en la tabla de átomo, el átomo de recuento de referencia para esa cadena se incrementa en uno.

Llamar SalDDEGetAtomName para recuperar la cadena de la tabla átomo.

parámetros strStringToAdd Cuerda. La cadena (255 caracteres o menos) para añadir a la tabla de átomo global.

Valor de retorno Si la función tiene éxito, nNewAtom es el valor de la nueva átomo global. Si la cadena ya existe,
nNewAtom es el valor del átomo existente. De lo contrario, nNewAtom es cero (0).

Ver también SalDDEDeleteAtom


SalDDEFindAtom
SalDDEGetAtomName

Ejemplo Establecer nOptions = SalDDEAlloc () llamada SalDDESetOptions

(NOptions, 0, CF_TEXT)
Conjunto nItem = SalDDEAddAtom (strItem)

Llamar SalDDEPost (hWndServer, WM_DDE_ADVISE, hWndForm,

nOptions, nItem)

SalDDEAlloc
Sintaxis nMemory = SalDDEAlloc ( )

Descripción Asigna un identificador de memoria para:

• Los datos en un mensaje WM_DDE_DATA o WM_DDE_Poke.

• Las opciones en un mensaje WM_DDE_ADVISE.

• cadena de mando de un mensaje WM_DDE_EXECUTE.

parámetros No hay parámetros sobre.

Valor de retorno nMemory es un identificador de memoria global. Si la función falla, nMemory es cero (0).

Ver también SalDDEFree

Ejemplo Set = nOptions SalDDEAlloc ( )

2-26 Centura Generador de Referencia de funciones


SalDDEDeleteAtom
Sintaxis nAtomCount = SalDDEDeleteAtom ( nAtomToDelete)

Descripción Decrementa el contador de referencia de un átomo. Si el contador de referencias llega a cero (0), Centura
elimina tanto el átomo y su cadena asociada de la tabla de átomo global. Cuando la aplicación termina, llamar a
esta función para cada SalDDEAddAtom exitosa llamada realizada.

parámetros nAtomToDelete Número. El átomo que desea eliminar.

Valor de retorno Si la función tiene éxito, nAtomCount es cero (0). Si la función falla, nAtomCount es igual a
nAtomToDelete.

Ver también SalDDEAddAtom

Ejemplo Llamada SalDDEDeleteAtom ( nReceivedItem)

SalDDEExtract
Sintaxis Bok = SalDDEExtract ( nwParam, nlParam, hWndSender, nLowlParam, nHighlParam)

Descripción Extrae identificador de ventana del remitente y los datos en el parámetro lParam a la recepción de un mensaje
de Windows DDE.

parámetros nwParam Número. El parámetro de palabra del mensaje DDE.

nlParam Número. La larga parámetro del mensaje DDE.

hWndSender Recibe identificador de ventana. manija de la ventana del emisor.

nLowlParam Recibe Número. La palabra de orden inferior de lParam.

nHighlParam Recibe Número. La palabra de orden superior de lParam.

Valor de retorno Bok es TRUE si la función tiene éxito y FALSE si falla ..

Ejemplo Llamada SalDDEExtract (WParam, lParam, hWndServer,


NDATA, nReceivedItem)

SalDDEExtractCmd
Sintaxis Bok = SalDDEExtractCmd ( nCommand, strCommand, nCommandSize)

Descripción Extrae la cadena de comandos que hace referencia la palabra de orden superior de la lParam de un mensaje
WM_DDE_EXECUTE.

parámetros nCommand Número. El identificador de memoria para la cadena de comandos.

Centura Generador de Referencia de funciones 2-27


Capítulo 2 Funciones centura Builder

strCommand Recibe cadena. La cadena de comandos.

nCommandSize Número. El tamaño máximo de la cadena de comandos.

Valor de retorno Bok es TRUE si la función tiene éxito y FALSE si falla.

Ver también SalDDESetCmd

Ejemplo Si SalDDEExtractCmd ( nCommand, strCommand, nCommandSize)

Establecer fldData = strCommand

SalDDEExtractDataText
Sintaxis Bok = SalDDEExtractDataText ( NDATA, nstatus, strData, nDataSize)

Descripción Extrae los datos referenciados por la palabra de orden inferior de la lParam en un mensaje
WM_DDE_DATA o WM_DDE_Poke.

parámetros NDATA Número. El mango del objeto de memoria que contiene los datos y otra
información.

nstatus Recibe Número. La palabra de estado. Véase el capítulo en el DDE


Centura del desarrollador de referencia para más información sobre el DDE_ *

bits de estado.

strData Recibe cadena. Los datos.

nDataSize Número. El tamaño de la memoria intermedia de datos.

Valor de retorno Bok es TRUE si la función tiene éxito y FALSE si falla.

Ver también SalDDESetDataText

Ejemplo Llamada SalDDEExtractDataText (NDATA, nstatus, strDDEData,


DDE_Data)

SalDDEExtractOptions
Sintaxis Bok = (SalDDEExtractOptions nOptions, nFlags, NFORMAC)

Descripción Extrae identificador de ventana del remitente y los datos en el parámetro lParm de un mensaje de Windows
DDE.

Para más información sobre el DDE, ver el capítulo en el DDE Centura del desarrollador de referencia.

parámetros nwParam Número. El parámetro de palabra del mensaje DDE.

nlParam Número. La larga parámetro del mensaje DDE.

hWndSender Recibe identificador de ventana. manija de la ventana del emisor.

2-28 Centura Generador de Referencia de funciones


nLowParam Recibe Número. La palabra de orden inferior de lParam.

nHighParam Recibe Número. El alto orden .word de lParam.

Valor de retorno Ninguna.

Ejemplo Si no SalDDEExtractOptions (NOptions, nFlags, NFORMAC)

Llamar SalMessageBox ( 'No se puede extraer opción?', 'Servidor DDE',


MB_OK)

SalDDEFindAtom
Sintaxis Natom = SalDDEFindAtom ( strTopicString)

Descripción Busca en la tabla de átomo global y devuelve el átomo asociado con la cadena dada.

parámetros strTopicString Cuerda. La cadena a buscar.

Valor de retorno Natom es el átomo global asociado con strTopicString. Natom es cero (0) si Centura
no encontrar la cadena en la tabla átomo.

Ver también SalDDEGetAtomName

Ejemplo Si naplicación = 0 = Conjunto

naplicación SalDDEAddAtom ( DDEServer_Application)

Llamar SalMessageBox ( 'Añadir átomo de aplicación', 'DDE',


MB_OK)

SalDDEFree
Sintaxis nManejador = SalDDEFree ( nMemory)

Descripción Libera un mango de memoria asignada por SalDDEAlloc para:

• Los datos en un mensaje WM_DDE_DATA o WM_DDE_Poke.

• Las opciones en un mensaje WM_DDE_ADVISE.

• cadena de mando de un mensaje WM_DDE_EXECUTE.

Cuando la aplicación termina, llamar a esta función para cada SalDDEAlloc exitosas llamada realizada.

parámetros nMemory Número. El identificador de memoria para liberar.

Valor de retorno nManejador es cero (0) si la función tiene éxito, y es igual al valor de nMemory si
la función falla.

Ver también SalDDEAlloc

Centura Generador de Referencia de funciones 2-29


Capítulo 2 Funciones centura Builder

Ejemplo Llamar SalDDEDeleteAtom (nReceivedItem) Si nstatus

y DDE_fRelease

Llamada SalDDEFree ( NDATA)

SalDDEGetAtomName
Sintaxis nAtomSize = SalDDEGetAtomName ( Natom, strAtomName, nStringLength)

Descripción Devuelve la cadena asociada a un átomo.

parámetros Natom Número. El número de átomos.

strAtomName Recibe cadena. La cadena asociada con Natom.

nStringLength Número. Especificar la longitud máxima de strAtomName.

Valor de retorno nAtomSize es la longitud de la cadena devuelta si la función tiene éxito y cero (0) si
no hay tal átomo.

Ver también SalDDEAddAtom


SalDDEDeleteAtom
SalDDEFindAtom

Ejemplo Establecer nAtomSize = SalDDEGetAtomName ( Natom, strAtomName,


nStringLength)

SalDDEGetExecuteString
Sintaxis strCommand = SalDDEGetExecuteString ( nMsglParam)

Descripción Una aplicación de servidor llama a esta función para obtener la cadena de comando enviado por un cliente. Esta función
convierte el lParam del mensaje SAM_DDE_ClientExecute partir de un valor numérico a un valor de cadena y devuelve
el valor de cadena en strCommand.

parámetros nMsglParam Número. El lParam del mensaje SAM_DDE_ClientExecute que


contiene la cadena de comandos.

Valor de retorno strCommand es la cadena de comando enviado por una aplicación cliente al servidor.

Ejemplo Establecer strCommand = SalDDEGetExecuteString (nMsglParam )

SalDDEPost
Sintaxis Nreturn = SalDDEPost ( hWndReceiver, nMessage, hWndSender, nLowlParam, nHighlParam)

Descripción mensajes de todos los mensajes WM_DDE_ * excepto:

• WM_DDE_INITIATE

2-30 Centura Generador de Referencia de funciones


• WM_DDE_ACK en respuesta a una WM_DDE_INITIATE

SalDDEPost coloca un mensaje en la cola de mensajes del receptor, permitiendo que los mensajes de proceso
receptor ya en su primera cola de mensajes. SalDDEPost devuelve sin esperar a que el receptor para procesar el
mensaje.

parámetros hWndReceiver Identificador de ventana. identificador de ventana del receptor.

nMessage Número. El número de mensaje.

hWndSender Identificador de ventana. manija de la ventana del emisor.

nLowlParam Número. La palabra de orden inferior del parámetro lParam envía con el
mensaje.

nHighlParam Número. La palabra de orden del parámetro lParam envía con el mensaje.

Valor de retorno Nreturn es un valor distinto de cero si la función tiene éxito y cero (0) en caso contrario.

Ver también SalDDESend


SalDDESendAll

Ejemplo Llamada SalDDEPost ( hWndServer, WM_DDE_EXECUTE, hWndForm, 0,


nCommand)

SalDDERequest
Sintaxis Bok = SalDDERequest ( hWndClient, strService, strServerTopic, strServerItem, nTimeout, strData)

Descripción Una aplicación cliente llama a esta función a pedir a un servidor para enviar los datos.

parámetros hWndClient Identificador de ventana. identificador de ventana del cliente asociado con el servicio
DDE, el tema y tema.

strService Cuerda. El nombre del servicio DDE.

strServerTopic Cuerda. El nombre del tema DDE.

strServerItem Cuerda. El nombre del elemento DDE.

nTimeout Número. El valor de tiempo de espera en milisegundos.

strData Recibe cadena. Una variable de cadena o una ventana en la aplicación cliente que puede recibir
datos. La ventana debe ser capaz de mantener un valor (por ejemplo, un campo de datos, columna
de ventana de la tabla, el campo de líneas múltiples, o un cuadro combinado) y debe ser definida
con un tipo de datos de cadena.

Valor de retorno Bok es TRUE si la función tiene éxito y FALSE si falla.

Centura Generador de Referencia de funciones 2-31


Capítulo 2 Funciones centura Builder

Ejemplo Si no SalDDERequest ( frmMain, dfApplication2, dfTopic2,


dfItem2, 10000, dfRequestData2) Llamada

SalWaitCursor (FALSO)
Llamar SalMessageBox ( 'SalDDERequest al servidor de Excel
fallido', 'DDE Error', MB_OK | MB_ICONHAND)

SalDDESend
Sintaxis Nreturn = SalDDESend ( hWndReceiver, nMessage, hWndSender, nLowlParam, nHighlParam)

Descripción Envía un mensaje WM_DDE_ACK en respuesta a un mensaje WM_DDE_INITIATE. A diferencia de


SalDDEPost, SalDDESend no coloca el mensaje en la cola de mensajes del receptor; en cambio, lo hace un
envío inmediato del mensaje. SalDDESend no vuelve hasta que el receptor ha procesado el mensaje.

parámetros hWndReceiver Identificador de ventana. identificador de ventana del receptor.

nMessage Número. El número de mensaje.

hWndSender Identificador de ventana. manija de la ventana del emisor.

nLowlParam Número. La palabra de orden inferior del parámetro lParam envía con el
mensaje.

nHighlParam Número. La palabra de orden del parámetro lParam envía con el mensaje.

Valor de retorno Nreturn es el valor devuelto por el receptor del mensaje.

Ver también SalDDEPost


SalDDESendAll

Ejemplo Llamada SalDDESend ( hWndClient, WM_DDE_ACK, hWndForm,

naplicación, nTopic)

SalDDESendAll
Sintaxis Nreturn = SalDDESendAll ( nMessage, hWndSender, nLowlParam, nHighlParam)

Descripción Difunde un mensaje WM_DDE_INITIATE y no vuelve hasta que todos los receptores han procesado el
mensaje.

parámetros nMessage Número. El número de mensaje.

hWndSender Identificador de ventana. manija de la ventana del emisor.

nLowlParam Número. La palabra de orden inferior del parámetro lParam envía con el
mensaje.

2-32 Centura Generador de Referencia de funciones


nHighlParam Número. La palabra de orden del parámetro lParam envía con el mensaje.

Valor de retorno Nreturn es un valor distinto de cero si la función tiene éxito, y cero (0) en caso contrario.

Ver también SalDDEPostSalDDESend

Ejemplo Llamada SalDDESendAll (WM_DDE_INITIATE, hWndForm,

naplicación, nTopic)

SalDDESendExecute
Sintaxis Bok = SalDDESendExecute ( hWndClient, strService, strServerTopic, strServerItem,
nTimeout, strCommand)

Descripción Un cliente llama a esta función para enviar un comando WM_DDE_EXECUTE a un servidor.

parámetros hWndClient Identificador de ventana. identificador de ventana del cliente asociado con el servicio
DDE, el tema y tema.

strService Cuerda. El servicio DDE.

strServerTopic Cuerda. El nombre del tema DDE.

strServerItem Cuerda. El nombre del elemento DDE.

nTimeout Número. El valor de tiempo de espera en milisegundos.

strCommand Cuerda. La cadena de comandos para enviar a strService. Para la compatibilidad con
otras aplicaciones DDE, siga las reglas de sintaxis para cadenas de comandos. Para
obtener información acerca de las reglas de sintaxis, consulte la sección sobre el
mensaje WM_DDE_EXECUTE al final del capítulo en el DDE
Centura
Referencia del desarrollador .

Valor de retorno Bok es TRUE si la función tiene éxito y FALSE si falla.

Ejemplo Si no SalDDESendExecute ( frmMain, dfApplication2,


dfTopic2, dfItem2, 10000, strSend) Llamada

SalWaitCursor (FALSO)
Llamar Sal cuadro de mensaje ( 'SalDDESendExecute' ||

'Al servidor de Excel ha fallado', 'DDE Error',

Centura Generador de Referencia de funciones 2-33


Capítulo 2 Funciones centura Builder

SalDDESendToClient
Sintaxis Bok = SalDDESendToClient ( hWndServer, strData, nClientID, nTimeout)

Descripción Una aplicación de servidor llama a esta función para enviar datos a los clientes. Utilice
SalDDESendToClient con las dos conversaciones enlace fríos y calientes.

parámetros hWndServer Identificador de ventana. identificador de ventana del servidor asociado con el servicio
DDE, el tema y tema.

strData Cuerda. Los datos que se envían a los clientes.

nClientID Número. identificador de ventana del cliente convertir en un número. Para una

conversación enlace activo, especifique cero (0). Centura actualiza todos los clientes

con enlace con los datos en strData. Para una conversación enlace frío, el servidor

recibe SAM_DDE_ClientRequest (en respuesta a la llamada de un cliente

SalDDERequest). El SAM_DDE_ClientRequest WParam identifica al cliente para recibir

los datos en strData.

nTimeout Número. El valor de tiempo de espera en milisegundos.

Valor de retorno Bok es TRUE si la función tiene éxito y FALSE si falla.

Ejemplo Si no SalDDESendToClient (FrmMain, dfServerData, 0, 100)


llamar SalWaitCursor (FALSO)

SalDDESetCmd
Sintaxis Bok = SalDDESetCmd ( nHighlParam, strCommand)

Descripción Asigna una cadena de comando a los datos referenciados por la palabra de orden superior de la IParam en un
mensaje WM_DDE_EXECUTE.

parámetros nHighlParam Número. El mango al bloque de comandos que contiene la cadena de


mando.

strCommand Cuerda. El comando a ejecutar.

Valor de retorno Bok es TRUE si la función tiene éxito y FALSE si falla.

Ver también SalDDEExtractCmd

Ejemplo Llamada SalDDESetCmd ( nCommand, strCommand) Llamada SalDDEPost (hWndServer,

WM_DDE_EXECUTE, hWndForm, 0,

nCommand)

2-34 Centura Generador de Referencia de funciones


SalDDESetDataText
Sintaxis Bok = SalDDESetDataText ( NDATA, nstatus, strData)

Descripción Asigna un valor a los datos referenciados por la palabra de orden inferior de la lParam en un mensaje
WM_DDE_DATA o WM_DDE_Poke.

parámetros NDATA Número. La manija para el objeto de memoria que contiene los datos y otra
información.

nstatus Número. La palabra de estado. Véase el capítulo en el DDE Centura


Referencia del desarrollador Para más información sobre la DDE_ bits de estado *.

strData Cuerda. El valor a asignar.

Valor de retorno Bok es TRUE si la función tiene éxito y FALSE si falla.

Ver también SalDDEExtractDataText

Ejemplo Llamada SalDDESetDataText (NDATA, nDDEFlags, strData)


Llamar SalDDEPost (hWndServer, WM_DDE_Poke, hWndForm, NDATA,

nItem)

SalDDESetOptions
Sintaxis Bok = (SalDDESetOptions nOptions, nFlags, NFORMAC)

Descripción Asigna un valor a los datos referenciados por la palabra de orden inferior de la lParam en un mensaje
WM_DDE_ADVISE.

parámetros nOptions Número. La manija para el objeto de memoria que especifica cómo los datos se va a
enviar.

nFlags Número. La palabra de estado. Véase el capítulo en el DDE Centura


Referencia del desarrollador Para más información sobre la DDE_ bits de estado *.

NFormat Número. El formato de datos cf_ *.

Valor de retorno Bok es TRUE si la función tiene éxito y FALSE si falla.

Ejemplo Llamada SalDDESetOptions (NOptions, 0, CF_TEXT)


Conjunto nItem = SalDDEAddAtom (strItem)

Llamar SalDDEPost (hWndServer, WM_DDE_ADVISE, hWndForm,

nOptions, nItem)

Centura Generador de Referencia de funciones 2-35


Capítulo 2 Funciones centura Builder

SalDDEStartServer
Sintaxis Bok = SalDDEStartServer ( hWndServer, strService, strServerTopic, strServerItem
)

Descripción Una aplicación de servidor llama a esta función para señalar clientes que está listo para aceptar conexiones de ellos. Una
aplicación de servidor debe llamar a esta función para que los clientes puedan conectarse a él.

parámetros hWndServer Identificador de ventana. identificador de ventana del servidor asociado con la
aplicación DDE, el tema y tema.

strService Cuerda. El servicio DDE.

strServerTopic Cuerda. El nombre del tema DDE.

strServerItem Cuerda. El nombre del elemento DDE.

Valor de retorno Bok es TRUE si la función tiene éxito y FALSE si falla.

Ejemplo Si no SalDDEStartServer (FrmMain, dfServerApplication,


dfServerTopic, dfServer Elemento)

llamar SalWaitCursor (FALSO)

SalDDEStartSession
Sintaxis Bok = SalDDEStartSession ( hWndDest, strService, strServerTopic, strServerItem, nTimeout)

Descripción Un cliente llama a esta función para iniciar una conversación enlace activo con una aplicación de servidor.

parámetros hWndDest Identificador de ventana. El mango (o nombre) de un objeto que puede contener un valor (tal como

un campo de datos, columna de ventana de la tabla, el campo de líneas múltiples, o un cuadro

combinado).

Si SalDDEStartSession tiene éxito, la aplicación de servidor actualiza el objeto


asociado a hWndDest con el valor de strServerItem. Un mensaje
SAM_DDE_DataChange se envía a hWndDest después de que el valor del
objeto cambia.

strService Cuerda. El servicio DDE.

strServerTopic Cuerda. El nombre del tema DDE.

strServerItem Cuerda. El nombre del elemento DDE.

nTimeout Número. El valor de tiempo de espera en milisegundos.

Valor de retorno Bok es TRUE si la función tiene éxito y FALSE si falla.

2-36 Centura Generador de Referencia de funciones


Ejemplo Si no SalDDEStartSession (MlString1, dfApplication1, dfTopic1,
dfItem1, 1000)
llamar SalWaitCursor (FALSO)
Llamar SalMessageBox ( 'SalDDEStartSession con el servidor SW
fallido', 'DDE Error', MB_OK | MB_ICONHAND)

SalDDEStopServer
Sintaxis Bok = SalDDEStopServer ( hWndServer)

Descripción Un servidor llama a esta función para poner fin a las operaciones del servidor DDE. El servidor debe llamar
SalDDEStopServer para cada SalDDEStartServer éxito.

parámetros hWndServer Identificador de ventana. identificador de ventana del servidor asociado con el servicio
DDE, el tema y tema.

Valor de retorno Bok es TRUE si la función tiene éxito y FALSE si falla.

Ejemplo Si no SalDDEStopServer (FrmMain)


llamar SalWaitCursor (FALSO)

SalDDEStopSession
Sintaxis Bok = SalDDEStopSession ( hWndDest)

Descripción Un cliente llama a esta función para finalizar una conversación enlace activo con una aplicación de servidor. El cliente
debe llamar SalDDEStopSession para cada SalDDEStartSession éxito.

parámetros hWndDest Identificador de ventana. El mango (o nombre) del objeto en la aplicación


cliente asociado con el servicio DDE, el tema y tema.

Valor de retorno Bok es TRUE si la función tiene éxito y FALSE si falla.

Ejemplo Si no SalDDEStopSession ( mlString1)


llamar SalWaitCursor (FALSO)

SalDestroyWindow
Sintaxis Bok = SalDestroyWindow ( hWndDestroy)

Descripción Destruye una ventana de formulario, una ventana de la tabla de nivel superior, o un cuadro de diálogo modal creada con SalCreateWindow.

En el caso de una ventana de formulario o ventana de la tabla de nivel superior, puede haber creado automáticamente en tiempo de

ejecución.

parámetros hWndDestroy Identificador de ventana. El mango (o nombre) de la ventana para destruir.

Centura Generador de Referencia de funciones 2-37


Capítulo 2 Funciones centura Builder

Valor de retorno Bok es TRUE si la función tiene éxito y FALSE si falla.

Ver también SalCreateWindow


SalEndDialog

Ejemplo en SAM_Click
Llamada SalDestroyWindow ( hWndForm)

SalDisableWindow
Sintaxis Bok = SalDisableWindow ( hWndDisable)

Descripción Desactiva la entrada de teclado y ratón a una ventana.

Si la ventana contiene texto (por ejemplo, un botón pulsador), el texto aparece en gris. Si la ventana es un campo
de datos, no puede recibir el foco.

parámetros hWndDisable Identificador de ventana. El mango (o nombre) de la ventana para desactivar.

Valor de retorno Bok es TRUE si la función tiene éxito y FALSE si falla.

Ver también SalDisableWindowAndLabel


SalEnableWindow
SalIsWindowEnabled

Ejemplo en SAM_Create
Llamada SalDisableWindow ( pbUpdate)

SalDisableWindowAndLabel
Sintaxis Bok = SalDisableWindowAndLabel ( hWndDisable)

Descripción Desactiva entrada del teclado y del ratón a una ventana y grises a cabo su etiqueta asociada. Una etiqueta es el

texto de fondo que precede inmediatamente a la ventana en el esquema. El texto debe tener un fundamento

mneumonic.

Si la ventana contiene texto (por ejemplo, un botón pulsador), el texto aparece en gris. Si la ventana es un campo
de datos, no puede recibir el foco.

parámetros hWndDisable Identificador de ventana. El mango (o nombre) de la ventana para desactivar.

Valor de retorno Bok es TRUE si la función tiene éxito y FALSE si falla.

Ver también SalDisableWindow

SalEnableWindowAndLabel

2-38 Centura Generador de Referencia de funciones


SalIsWindowEnabled

SalGetWindowLabelText

SalHideWindowAndLabel

SalSetWindowLabelText

SalShowWindowAndLabel

Ejemplo Llamada SalDisableWindow ( dfName)

SalDlgChooseColor
Sintaxis Bret = SalDlgChooseColor ( hWndOwner, nColor)

Descripción Muestra el cuadro de diálogo Color de Windows donde el usuario puede seleccionar un color existente o crear una

nueva. Véase el capítulo Panel de control en el

Guía del usuario de Microsoft Windows' para una detallada

Descripción del cuadro de diálogo Color.

parámetros hWndOwner Identificador de ventana. El mango (o nombre) del propietario del cuadro de diálogo.
Especificar hWndNULL si no tiene dueño.

nColor Recibe Número. El valor RGB del color el usuario selecciona.

Valor de retorno BRET es TRUE si el usuario selecciona un color y FALSE si el usuario hace clic en el empuje Cancelar

botón.

Ver también SalDlgChooseFont

Ejemplo en SAM_Click
Llamada SalDlgChooseColor (FrmMain, nColor)

SalDlgChooseFont
Sintaxis Bret = SalDlgChooseFont ( hWndOwner, strFontName, nsize, nEnhancements, nColor)

Descripción Muestra el cuadro de diálogo de fuentes de Windows, donde el usuario puede elegir un tipo de letra, así como su tamaño, estilo,

mejoras, color de la pantalla, y así sucesivamente. Véase el capítulo Panel de control en el

Guía del usuario de Microsoft Windows' para una detallada

Descripción del cuadro de diálogo Fuente.

parámetros hWndOwner Identificador de ventana. El mango (o nombre) del propietario del cuadro de diálogo.
Especificar hWndNULL si no tiene dueño.

strFontName Recibe cadena. El nombre de la fuente que el usuario selecciona.

Centura Generador de Referencia de funciones 2-39


Capítulo 2 Funciones centura Builder

nTamaño Recibe Número. El tamaño de la fuente que el usuario selecciona.

nEnhancements Recibe Número. Las mejoras de fuente (cursiva, negrita, etc.), en su caso, que el
usuario selecciona.

nColor Recibe Número. Especificar el color del texto inicial. Cuando regresa
SalDlgChooseFont, nColor es el color del texto que el usuario selecciona.

Valor de retorno Bret es TRUE si el usuario elige un tipo de letra y FALSO si el usuario hace clic en el pulsador Cancelar

botón.

Ver también SalDlgChooseColor

Ejemplo Llamada SalDlgChooseFont (FrmMain, strFontName,


nTamaño, nEnhancements)

SalDlgOpenFile
Sintaxis Bret = SalDlgOpenFile ( hWndOwner, strDlgTitle, strFilters, nFilters, nIndex, strFile, strPath)

Descripción Muestra un cuadro de diálogo de Windows en el que el usuario puede seleccionar un archivo para abrirlo.

parámetros hWndOwner Identificador de ventana. El mango (o nombre) del propietario del cuadro de diálogo.
Especificar hWndNULL si no tiene dueño.

strDlgTitle Cuerda. El título del cuadro de diálogo Abrir archivo.

strFilters Cuerda. Una serie de filtros de archivos y sus descripciones. Cada filtro debe tener
una descripción que precede al filtro en la matriz. Por ejemplo, para permitir a los
usuarios abrir archivos con sólo extensiones específicas, rellenar la matriz strFilters
con filtros tales como:

Set strFilters [0] = 'Archivos ejecutables' Set strFilters [1] =

'* .exe' strFilters ajuste [2] = 'Dynamic Link Libraries' Set

strFilters [3] = '* .dll' Set strFilters [4] = ' Archivos de

inicialización Set strFilters [5] = '* .ini'

nFilters Número. El número de elementos en strFilters. La matriz por encima de seis

elementos contiene tres filtros. Especificar 6 para mostrar los tres filtros.

Puede limitar el número de filtros que se muestran. Por ejemplo, para mostrar sólo los
dos primeros filtros (* .exe y .dll *), especifique 4.

2-40 Centura Generador de Referencia de funciones


nIndex Recibe Número. El filtro que elija el usuario. Por ejemplo, si el usuario elige
archivos de inicialización, es nIndex 3. El filtro por defecto es siempre el primer filtro
en strFilters.

strFile Recibe cadena. El nombre del archivo que el usuario elija. Para inicializar el cuadro
combinado en el que la pantalla los nombres de archivo, asigne un nombre de archivo a una
variable antes de llamar SalDlgOpenFile. En la llamada SalDlgOpenFile posterior, especifique
la variable para este parámetro. Si el valor de la variable es incorrecta o no válida, Centura
ignora su intento de establecer el valor de la pantalla por defecto.

strPath Recibe cadena. El nombre de la ruta completa del archivo que el usuario elija. Para
inicializar el cuadro combinado en el que la pantalla rutas, asignar una ruta a una variable
antes de llamar SalDlgOpenFile. En la llamada SalDlgOpenFile posterior, especifique la
variable para este parámetro. Si el valor de la variable es incorrecta o no válida, Centura
ignora su intento de establecer el valor de la pantalla por defecto.

Valor de retorno Bret es TRUE si el usuario especifica un nombre de archivo y FALSO si el usuario hace clic en el Cancelar

presionar el botón.

Ver también SalDlgSaveFile

Ejemplo acciones de mensajes

en SAM_Create
Set strFilters [0] = 'Dynamic Link Libraries' Set strFilters [1]

= '* .dll' Set strFilters [2] = 'Archivos ejecutables' Set

strFilters [3] = '* .exe' strFilters ajuste [4] = ' Archivos de

inicialización Set strFilters [5] = '* .ini'

strFilters, 6, nIndex, strFile, strPath) de llamada SalDlgOpenFile

(FrmMain, 'Abrir archivo', strFilters, 6,


nIndex, strFile, strPath)

Centura Generador de Referencia de funciones 2-41


Capítulo 2 Funciones centura Builder

SalDlgSaveFile
Sintaxis Bret = SalDlgSaveFile ( hWndOwner, strDlgTitle, strFilters, nFilters, nIndex, strFile, strPath)

Descripción Muestra un cuadro de diálogo de Windows en el que el usuario puede guardar un archivo. Si no se especifica una

extensión de archivo, Centura guarda el archivo con la extensión que muestra el cuadro Guardar como tipo combinado.

parámetros hWndOwner Identificador de ventana. El mango (o nombre) del propietario del cuadro de diálogo.
Especificar hWndNULL si no tiene dueño.

strDlgTitle Cuerda. El cuadro de diálogo título de la Guarde el archivo.

strFilters Cuerda. Una serie de filtros de archivos y sus descripciones. Cada filtro debe tener una

descripción que precede al filtro en la matriz. Por ejemplo, para permitir a los usuarios

guardar archivos con extensiones específicas sólo, rellenar la matriz strFilters con filtros

tales como:

Set strFilters [0] = 'Archivos ejecutables' Set strFilters [1] =

'* .exe' strFilters ajuste [2] = 'Dynamic Link Libraries' Set

strFilters [3] = '* .dll' Set strFilters [4] = ' Archivos de

inicialización Set strFilters [5] = '* .ini'

nFilters Número. El número de elementos en strFilters. La matriz por encima de seis

elementos contiene tres filtros. Especificar 6 para mostrar los tres filtros.

Puede limitar el número de filtros que se muestran. Por ejemplo, para ver sólo los
dos primeros filtros (* .exe y .dll *), especifique 4.

nIndex Recibe Número. El filtro que elija el usuario. Esto refleja el formato en el que Centura
guarda el archivo. La extensión de un archivo no implica formato. Por defecto, si el
usuario no especifica una extensión de archivo, Centura guarda el archivo con la
primera extensión strFilters. En este caso, la extensión de archivo por defecto es .EXE.

Por ejemplo, si el usuario elige bibliotecas de vínculos dinámicos, pero no especifica una
extensión de archivo, el archivo se guarda en formato DLL pero con una extensión .EXE.

strFile Recibe cadena. El nombre del archivo que el usuario elija.

2-42 Centura Generador de Referencia de funciones


Para inicializar el cuadro combinado en el que la pantalla los nombres de archivo, asigne un
nombre de archivo a una variable antes de llamar SalDlgSaveFile. En la llamada
SalDlgSaveFile posterior, especifique la variable para este parámetro. Si el valor de la variable
es incorrecta o no válida, Centura ignora su intento de establecer el valor de la pantalla por
defecto.

strPath El nombre de la ruta completa del archivo que el usuario elija. Para inicializar el cuadro
combinado en el que la pantalla rutas, asignar un nombre de ruta para una variable antes de
llamar SalDlgSaveFile. En la llamada SalDlgSaveFile posterior, especifique la variable para
este parámetro. Si el valor de la variable es incorrecta o no válida, Centura ignora su intento
de establecer el valor de la pantalla por defecto.

Ejemplo acciones de mensajes

en SAM_Create
Set strFilters [0] = 'Dynamic Link Libraries' Set strFilters [1]

= '* .dll' Set strFilters [2] = 'Archivos ejecutables' Set

strFilters [3] = '* .exe' strFilters ajuste [4] = ' Set strFilters [5]

= 'inicialización de archivos * .ini' On Call SAM_Click SalDlgSaveFile

(FrmMain 'Guardar archivo',

strFilters, 6, nIndex, strFile, strPath)

SalDragDropDisableDrop
Sintaxis Bok = SalDragDropDisableDrop ( )

Desactiva cayendo mientras que en modo de arrastre.

parámetros No hay parámetros.

Valor de retorno Bok es TRUE si la función tiene éxito y FALSE si falla.

Ver también SalDragDropEnableDrop

Ejemplo en SAM_Click
Llamada SalDragDropDisableDrop ()

Centura Generador de Referencia de funciones 2-43


Capítulo 2 Funciones centura Builder

SalDragDropEnableDrop
Sintaxis Bok = SalDragDropEnableDrop ( )

Descripción Permite a caer mientras que en modo de arrastre.

parámetros No hay parámetros.

Valor de retorno Bok es TRUE si la función tiene éxito y FALSE si falla.

Ver también SalDragDropDisableDrop

Ejemplo En SAM_Click Call SalDragDropEnableDrop

()

SalDragDropGetSource
Sintaxis Bok = SalDragDropGetSource ( HwndSource, nX, NY)

Descripción Recupera el identificador de la ventana de origen y la ubicación del ratón en esa ventana cuando inicia el
modo de arrastre.

parámetros HwndSource Recibe identificador de ventana. El mango de la ventana de la fuente. Estos tipos de ventanas

pueden ser ventanas de fuentes: Cuadro de lista desplegable

campo de varias líneas

Campo de datos Imagen

Cuadro de lista ventana de la tabla

nX Recibe Número. La posición del ratón en el eje X.

Nueva York Recibe Número. La posición del ratón en el eje y.

Valor de retorno Bok es TRUE si la función tiene éxito y FALSE si falla.

Ver también SalDragDropGetTarget

Ejemplo en SAM_Click
Llamada SalDragDropGetSource (HwndSource, nX, NY)

2-44 Centura Generador de Referencia de funciones


SalDragDropGetTarget
Sintaxis Bok = SalDragDropGetTarget ( hWndTarget, nX, NY)

Descripción Recupera el identificador de la ventana de destino y la ubicación del ratón en esa ventana.

parámetros hWndTarget Recibe identificador de ventana. El mango de la ventana de destino. Cualquier


tipo de ventana Centura puede ser una ventana a puerta, pero sin ventanas
acciones (como cuadros) no reciben mensajes SAM_Drag *.

nX Recibe Número. La posición del ratón en el eje X.

Nueva York Recibe Número. La posición del ratón en el eje y.

Valor de retorno Bok es TRUE si la función tiene éxito y FALSE si falla.

Ver también SalDragDropGetSource

Ejemplo en SAM_Click
Llamada SalDragDropGetTarget (HWndRecv, nX, NY)

SalDragDropStart
Sintaxis Bok = SalDragDropStart ( HwndSource)

Descripción Inicia el modo de arrastre. Debe tener uno de los botones del ratón (izquierda, centro, derecha) deprimido.

parámetros HwndSource Identificador de ventana. El mango (o nombre) de una ventana.

Valor de retorno Bok es TRUE si la función tiene éxito y FALSE si falla.

Ver también SalDragDropStop

Ejemplo en SAM_Click
Llamada SalDragDropStart (FrmMain)

SalDragDropStop
Sintaxis Bok = SalDragDropStop ( )

Descripción Termina modo de arrastre.

parámetros Ningún parámetro.

Valor de retorno Bok es TRUE si la función tiene éxito y FALSE si falla.

Centura Generador de Referencia de funciones 2-45


Capítulo 2 Funciones centura Builder

Ver también SalDragDropStart

Ejemplo Establecer Bok = SalDragDropStop ()

SalDrawMenuBar
Sintaxis Bok = SalDrawMenuBar ( hWndForm)

Descripción Vuelve a dibujar la barra de menú de una ventana determinada forma o ventana de la tabla de nivel superior. Llamar a esta función para

hacer que los elementos de menú de nivel superior para ser activadas o desactivadas. Para un elemento de menú de nivel superior o en el

menú emergente, un Activado cuando la variable sólo se evalúa cuando se llama SalDrawMenuBar o cuando la barra de menú se vuelve a

dibujar por otras razones.

parámetros hWndForm Identificador de ventana. El mango (o nombre) de la ventana del formulario o ventana de la tabla de

nivel superior cuya barra de menú que desea volver a dibujar.

Valor de retorno Bok es TRUE si la función tiene éxito y FALSE si falla.

Ejemplo en SAM_Click
Llamada SalDrawMenuBar ( frmMain)

SalDropFilesAcceptFiles
Sintaxis Bok = (SalDropFilesAcceptFiles hWnd, bAccept)

Descripción Indica si una ventana puede aceptar un archivo desde el Administrador de archivos de Windows'.

parámetros CVent Identificador de ventana. El mango (o nombre) de una ventana.

bAccept Boole. Especifique si CVent puede aceptar un archivo desde el Administrador de archivos
de Windows'.

El valor predeterminado para editables imágenes es TRUE; el valor por defecto para todos los

otros tipos de ventanas es FALSO.

Valor de retorno Bok es TRUE si la función tiene éxito y FALSE si falla.

Ver también SalDropFilesQueryFiles


SalDropFilesQueryPoint
Ejemplo Establecer bAccept = SalDropFilesAcceptFiles (HWnd, TRUR)

2-46 Centura Generador de Referencia de funciones


SalDropFilesQueryFiles
Sintaxis nfiles = (SalDropFilesQueryFiles HwndSource, sArrayFiles)

Descripción Recupera los nombres de los archivos cayeron en una ventana. La recepción del mensaje
SAM_DropFilesmsg_SAM_DropFiles indica que el usuario se redujo archivos en la ventana.

parámetros HwndSource Identificador de ventana. El mango (o nombre) de la ventana en la que se


retiraron los archivos.

sArrayFiles Recibe Array cadena. Los nombres de los archivos caído.

Valor de retorno nfiles es el número de archivos de caídas Si la función tiene éxito y cero (0) si el
función falla. SalDropFilesQueryFiles falla a menos que se llama como el resultado de la recepción del
mensaje SAM_DropFiles.

Ver también SalDropFilesAcceptFiles


SalDropFilesQueryPoint

Ejemplo en SAM_Click
Set = nfiles SalDropFilesQueryFiles (HwndSource,
sArrayFiles)

Centura Generador de Referencia de funciones 2-47


Capítulo 2 Funciones centura Builder

SalDropFilesQueryPoint
Sintaxis Bok = SalDropFilesQueryPoint ( hWnd, nX, NY)

Descripción Encuentra la ubicación del ratón en una ventana en el momento en que el usuario se redujo archivos en la
ventana. La recepción del mensaje SAM_DropFiles indica que el usuario se redujo archivos en la ventana.

parámetros CVent Identificador de ventana. El mango (o nombre) de la ventana en la que se dejaron


caer archivos.

nX Recibe Número. La ubicación del ratón en el eje X.

Nueva York Recibe Número. La ubicación del ratón en el eje y.

Valor de retorno Bok es TRUE si la función tiene éxito y FALSE si falla.

Ver también SalDropFilesAcceptFiles


SalDropFilesQueryFiles

Ejemplo en SAM_Click
Llamada SalDropFilesQueryPoint (HWnd, nX, NY)

SalEditCanCopyTo
Sintaxis Bok = SalEditCanCopyTo ( )

Descripción Esta función devuelve TRUE si una imagen editable tiene el enfoque y contiene un objeto que se puede copiar en un archivo.
Se puede utilizar esta función en la sección Habilitado Cuando para una copia al elemento del menú.

parámetros No hay parámetros.

Valor de retorno Bok es cierto si una imagen editable tiene el enfoque y contiene un objeto, y FALSO
de otra manera. Bok es cierto incluso cuando el contenido de la imagen no son el resultado de una pasta de la operación.

Ver también SalEditCopyTo

Ejemplo Menú
Menú emergente: & Editar

Elemento del menú: & Copy Para

...
Configuración del menú

Se activa cuando: SalEditCanCopyTo ()

2-48 Centura Generador de Referencia de funciones


SalEditCanCut
Sintaxis Bok = SalEditCanCut ( )

Descripción Esta función devuelve TRUE si se ha seleccionado los datos de un campo de datos, campo de varias líneas, columna de ventana de la tabla,

o una imagen editable. Se puede utilizar esta función en la sección cuando se habilita para un elemento de menú Cortar.

parámetros No hay parámetros.

Valor de retorno Bok es TRUE si se selecciona de datos y de lo contrario.

Ver también SalEditCut

Ejemplo Configuración del menú

Se activa cuando: SalEditCanCut ()


...

SalEditCanPaste
Sintaxis Bok = SalEditCanPaste ( )

Descripción Esta función devuelve TRUE si hay datos en el portapapeles que se pueden pegar en el cuadro editable con el
foco. Se puede utilizar esta función en la sección cuando se habilita para un elemento de menú Pegar.

Sin Parámetros

Valor devuelto
Bok es TRUE si hay datos en el portapapeles para ser pegado y de lo contrario.

Ver también SalEditPaste

Ejemplo Configuración del menú

Se activa cuando: SalEditCanPaste ()

SalEditCanPasteFrom
Sintaxis Bok = SalEditCanPasteFrom ( )

Descripción Esta función devuelve TRUE si una imagen editable tiene el foco. Se puede utilizar esta función en la sección
Habilitado Cuando para una Pegar Desde elemento de menú.

parámetros No hay parámetros.

Valor de retorno

Bok es cierto si una imagen editable tiene el enfoque y de lo contrario.

Ver también SalEditPasteFrom

Centura Generador de Referencia de funciones 2-49


Capítulo 2 Funciones centura Builder

Ejemplo Configuración del menú

Se activa cuando: SalEditCanPasteFrom ()

SalEditCanUndo
Sintaxis Bok = SalEditCanUndo ( )

Descripción Esta función devuelve TRUE si hay alguna edición de un campo de datos, campo de varias líneas, columna de ventana de la tabla, o
una imagen que se puede deshacer. Se puede utilizar esta función en la sección cuando se habilita para un elemento de menú
Deshacer.

Sin Parámetros Valor devuelto Bok es TRUE si no hay ningún tipo de edición de deshacer y de lo contrario.

Ver también SalEditUndo

Ejemplo Configuración del menú

Se activa cuando: SalEditCanUndo ( )

...

SalEditClear
Sintaxis Bok = SalEditClear ( )

Descripción Elimina los datos seleccionados a partir del campo de datos, campo de varias líneas, columna de ventana de la tabla, o imagen con el

enfoque. lugares Centura borran los datos en memoria intermedia de anulación de Windows'.

parámetros No hay parámetros.

Valor de retorno Bok es TRUE si la función tiene éxito y FALSE si falla.

Ejemplo Configuración del menú

Se activa cuando: SalEditCanCut ()

SalEditCopy
Sintaxis Bok = SalEditCopy ( )

Descripción Copias seleccionadas datos de un campo de datos, campo de varias líneas, columna de ventana de la tabla, o una imagen y la

coloca en el portapapeles.

parámetros No hay parámetros.

Valor de retorno Bok es TRUE si la función tiene éxito y FALSE si falla.

2-50 Centura Generador de Referencia de funciones


Ejemplo Configuración del menú

Se activa cuando: SalEditCanCut ()

...
acciones de menú

Llamada SalEditCopy ()

SalEditCopyString
Sintaxis Bok = SalEditCopyString ( strString)

Descripción Copia una cadena en el portapapeles como texto.

parámetros strString Cuerda. La cadena de copiar al portapapeles.

Valor de retorno Bok es TRUE si la función tiene éxito y FALSE si falla.

Ver también SalEditPasteString

Ejemplo acciones de menú

Llamada SalEditCopyString (mlNotes)

SalEditCopyTo
Sintaxis Bok = SalEditCopyTo ( )

Descripción Copia un objeto a un archivo de una imagen editable. La imagen debe tener el foco. Esta función sólo funciona

cuando el contenido de la imagen son el resultado de una pasta de la operación.

parámetros No hay parámetros.

Valor de retorno Bok es TRUE si la función tiene éxito y FALSE si falla.

Ver también SalEditCanCopyTo


SalEditPasteFrom

Ejemplo acciones de menú

Llamada SalEditCopyTo ()

SalEditCut
Sintaxis Bok = SalEditCut ( )

Descripción Corta datos seleccionados de un campo de datos, campo de varias líneas, columna de ventana de la tabla, o una imagen y la coloca en el

portapapeles.

parámetros No hay parámetros.

Centura Generador de Referencia de funciones 2-51


Capítulo 2 Funciones centura Builder

Valor de retorno Bok es TRUE si la función tiene éxito y FALSE si falla.

Ver también SalEditCanCut

Ejemplo Configuración del menú

Se activa cuando: SalEditCanCut ()

SalEditPaste
Sintaxis Bok = SalEditPaste ( )

Descripción Pastas datos del portapapeles en el campo de datos, campo de varias líneas, columna de ventana de la tabla, o imagen
con el enfoque.

parámetros No hay parámetros.

Valor de retorno Bok es TRUE si la función tiene éxito y FALSE si falla.

Ver también SalEditCanPaste

Ejemplo acciones de menú

Llamada SalEditPaste ()

SalEditPasteFrom
Sintaxis Bok = SalEditPasteFrom ( )

Descripción Copia un archivo a la imagen editable con el foco.

Esta función muestra el cuadro de diálogo Pegar desde donde el usuario puede seleccionar un archivo para pegar en el
cuadro.

El usuario puede recuperar estos tipos de archivos:

Tipo Extensión de archivo Descripción

BMP . Mapa de bits independiente del dispositivo

DIB . DIB Mapa de bits independiente del dispositivo

GIF . gif formato de gráficos intercambeable

ICONO . ico icono de archivo

PCX . PCX Cepillo de pintura

PELEA . tif Tag Image File Format

JPEG * . jpg formato JPEG

2-52 Centura Generador de Referencia de funciones


WMF . WMF metarchivo de windows

El usuario puede seleccionar un archivo de cualquier tipo, incluso si el tipo de archivo no está en la lista anterior. Centura todavía lo
pega en la imagen con un icono de documento genérico para su imagen. El contenido del archivo están disponibles para la aplicación
a través de la función SalPicGetString.

parámetros No hay parámetros.

Valor de retorno Bok es TRUE si la función tiene éxito y FALSE si falla.

Ver también SalEditCanPasteFrom

Ejemplo acciones de menú

Llamada SalEditPasteFrom ()

SalEditPasteString
Sintaxis Bok = SalEditPasteString ( strString)

Descripción Pega el contenido del portapapeles en la cadena especificada en formato de texto.

parámetros strString Recibe cadena. La cadena en la que se pegan el contenido del


portapapeles.

Valor de retorno Bok es TRUE si la función tiene éxito y FALSE si falla.

Ver también SalEditCopyString

Ejemplo Llamada SalEditPasteString (StrOldClipboard)

SalEditUndo
Sintaxis Bok = SalEditUndo ( )

Descripción Deshace la última edición en un campo de datos, campo de varias líneas, columna de ventana de la tabla, o una imagen. Edición que
puede deshacer incluye la inserción de texto, texto de corte, limpieza de texto y pegar texto.

parámetros No hay parámetros.

Valor de retorno Bok es TRUE si la función tiene éxito y FALSE si falla.

Ver también SalEditCanUndo

Ejemplo Configuración del menú

Se activa cuando: SalEditCanUndo ( )

Centura Generador de Referencia de funciones 2-53


Capítulo 2 Funciones centura Builder

SalEnableWindow
Sintaxis Bok = SalEnableWindow ( hWndEnable)

Descripción Permite la entrada de teclado y ratón a una ventana.

parámetros hWndEnable Identificador de ventana. El mango (o nombre) de la ventana para habilitar.

Valor de retorno Bok es TRUE si la función tiene éxito y FALSE si falla.

Ver también SalDisableWindow


SalEnableWindowAndLabel
SalIsWindowEnabled

Ejemplo Llamada SalEnableWindow ( frmCustomer)

SalEnableWindowAndLabel
Sintaxis Bok = SalEnableWindowAndLabel ( hWndEnable)

Descripción Activa la entrada de teclado y el ratón a una ventana y permite su etiqueta asociada también.

Una etiqueta es el texto de fondo que precede inmediatamente a la ventana en el esquema.

parámetros hWndEnable Identificador de ventana. El mango (o nombre) de la ventana para habilitar.

Valor de retorno Bok es TRUE si la función tiene éxito y FALSE si falla.

Ver también SalDisableWindowAndLabel


SalEnableWindow WindowEnabled

Ejemplo en SAM_Click
Llamada SalEnableWindowAndLabel (DfName)

SalEndDialog
Sintaxis Bok = SalEndDialog ( hWndModal, Nreturn)

Descripción Destruye un cuadro de diálogo modal y devuelve el control al llamador del SalModalDialog.

parámetros hWndModal Identificador de ventana. El mango (o nombre) del cuadro de diálogo modal para destruir.

Nreturn Número. El valor de retorno de la función SalModalDialog.

Valor de retorno Bok es TRUE si la función tiene éxito y FALSE si falla.

2-54 Centura Generador de Referencia de funciones


Ver también SalModalDialog

Ejemplo en SAM_Click
Llamada SalEndDialog (HWndForm, 0)

SalFileClose
Sintaxis Bok = SalFileClose ( hFile)

Descripción Cierra un archivo.

parámetros hFile Recibe identificador de archivo. El mango del archivo para cerrar. Cuando la función
devuelve el valor de este parámetro se vuelve nula.

Valor de retorno Bok es TRUE si la función tiene éxito y FALSE si falla.

Ver también SalFileOpen

Ejemplo Si NO SalFilePutStr (hFile, sLine)


Llamada SalFileClose (HFile)
Llamar SalMessageBeep (0)

SalFileCopy
Sintaxis nstatus = SalFileCopy ( strSourcePath, strDestPath, bOverWrite)

Descripción Copia el contenido de un archivo (fuente) a otro archivo (destino).

parámetros strSourcePath Cuerda. El nombre y la ruta del archivo de origen.

strDestPath Cuerda. El nombre de la ruta completa del archivo de destino.

bOverWrite Boole. Especifica si (true) o no (false) para sobrescribir el archivo


de destino.

Si el archivo de destino ya existe y bOverWrite es falso, entonces


SalFileCopy falla, y devuelve FILE_CopyExist. Si el archivo de destino ya
existe y bOverWrite es cierto, entonces SalFileCopy tiene éxito y el archivo de
destino se sobrescribe.

Valor de retorno nstatus es igual a uno de los siguientes valores:

FILE_CopyDest
FILE_CopyExist
FILE_CopyOK
FILE_CopyRead
FILE_CopySrc
FILE_CopyWrite

Centura Generador de Referencia de funciones 2-55


Capítulo 2 Funciones centura Builder

Ejemplo en SAM_AppStartup
Establecer bLogFileSaved = SalFileCopy ( 'C: \\ DB \\ APP.LOG',
( 'C: \\ DB \\ APP.OLD', TRUE)

SalFileCreateDirectory
Sintaxis Bok = SalFileCreateDirectory ( strDir)

Descripción Crea un directorio.

parámetros strDir Cuerda. El nombre de ruta completo del nuevo directorio.

Valor de retorno Bok es TRUE si la función tiene éxito y FALSE si un directorio o un archivo con el
nombre especificado ya existe, o si la ruta especificada en el directorio no puede ser encontrado.

Ver también SalFileRemoveDirectory

Ejemplo Establecer DirCreated = SalFileCreateDirectory ( 'C: \\ NOTAS \\ REL2')

SalFileGetC
Sintaxis Bok = SalFileGetC ( hFile, nChar)

Descripción Devuelve el siguiente carácter en un archivo abierto. Debe utilizar esta función en lugar de la función SalFileGetChar
si el archivo contiene no ASCII (ANSI) o caracteres de 16 bits. Si el carácter devuelto es un personaje de 16 bits, el
byte inicial del personaje está en el byte de orden, y el byte final está en el byte de orden inferior. Para obtener el
byte inicial, utilice SalNumberHighand para obtener el byte final, utilice SalNumberLow.

parámetros hFile Identificador de archivo. El mango del archivo abierto.

nChar Recibe Número. El siguiente carácter de hFile.

Valor de retorno Bok es TRUE si la función tiene éxito y FALSE si la función es incapaz de leer el
siguiente carácter a partir del archivo, o si un identificador de archivo no válido se pasa en hFile.

Ver también SalFilePutC

Ejemplo en SAM_AppStartup
Llamada SalFileOpen (HFile, 'C: \\ DB \\ APP.LOG',

OF_Read | OF_Binary)

2-56 Centura Generador de Referencia de funciones


SalFileGetChar
Sintaxis nChar = SalFileGetChar ( hFile)

Descripción Devuelve el siguiente carácter en un archivo abierto.

parámetros hFile Identificador de archivo. El mango del archivo abierto.

Valor de retorno nChar es un número que representa un carácter ANSI. Al final del archivo,
SalFileGetChar devuelve un -1.

Ver también SalFilePutChar

Ejemplo Si SalFileOpen (fhDestFile, strDestFile, OF_Create


| OF_ReadWrite) Loop

Establecer nChar = SalFileGetChar (FhSrcFile)


...

SalFileGetCurrentDirectory
Sintaxis Bok = SalFileGetCurrentDirectory ( strPath)

Descripción Obtiene el nombre de la ruta completa del directorio de trabajo actual.

parámetros strPath Recibe cadena. El nombre de ruta completo, incluyendo la letra de la unidad, del
directorio de trabajo actual.

Valor de retorno Bok es TRUE si la función tiene éxito y FALSE si falla.

Ver también SalFileSetCurrentDirectory

Ejemplo en SAM_AppStartup
Si no SalFileGetCurrentDirectory (StrCurrentDir)
Llamar SalMessageBox ( 'No se pudo obtener actual

directorio', 'Error', 0

SalFileGetDateTime
Sintaxis Bok = SalFileGetDateTime ( strFileName, dtDateTime)

Descripción Obtiene la fecha y hora de modificación del archivo especificado.

parámetros strFileName Cuerda. El nombre del archivo cuya fecha de modificación que desee.

dtDateTime Recibe fecha / hora. La fecha y hora de modificación del strFileName.

Centura Generador de Referencia de funciones 2-57


Capítulo 2 Funciones centura Builder

Valor de retorno Bok es TRUE si la función tiene éxito y FALSE si falla.

Ver también SalFileSetDateTime

Ejemplo Establecer Bok = SalFileGetDateTime ( 'WIN.INI',


gdFileDate)

SalFileGetDrive
Sintaxis strDriveLetter = SalFileGetDrive ( )

Descripción Obtiene la letra de la unidad (actual) de disco predeterminada.

Sin Parámetros Valor devuelto strDriveLetter es una cadena que identifica la unidad de disco actual. El primer carácter es una

letra entre 'A' y 'Z', y el segundo carácter es de dos puntos (:).

Ver también SalFileSetDrive

Ejemplo en SAM_AppStartup
Si SalFileGetDrive () = 'A'
Establecer blsDriveA = VERDADERO

Else

Establecer blsDriveA = FALSO

SalFileGetStr
Sintaxis Bok = SalFileGetStr ( hFile, strBuffer, nBufferSize)

Descripción Devuelve la siguiente línea de un archivo abierto. Centura despoja de la posterior retorno de carro / línea de la
cadena devuelta.

parámetros hFile Identificador de archivo. El mango del archivo abierto.

strBuffer Recibe cadena. La cadena devuelta.

nBufferSize Número. El número máximo de bytes a leer.

Valor de retorno Bok es TRUE si el archivo se lee con éxito y de lo contrario. FALSO es también
devuelta a la final del archivo.

Ver también SalFilePutStr

Ejemplo Si SalFileGetStr (FhSrcFile, strText, LINE_SIZE)


Llamar SalFilePutStr (fhDestFile, strText) Else

Descanso

2-58 Centura Generador de Referencia de funciones


SalFileOpen
Sintaxis Bok = SalFileOpen ( hFile, strFileName, nStyle)

Descripción Se abre, vuelve a abrir, crea o elimina un archivo.

parámetros hFile Recibe identificador de archivo. El mango del archivo abierto.

strFileName Cuerda. El nombre del archivo que desea abrir, crear, eliminar, o prueba.

nStyle Número. Una constante que especifica el estilo en que para abrir el archivo. nStyle
puede ser una o más estilos combinados usando el bit a bit OR | operador ().

Valor de retorno Bok es TRUE si la función tiene éxito y FALSE si falla.

Ver también SalFileClose

SalListFiles

SalFileOpenExt

Ejemplo Llamada SalFileOpen (FhSrcFile, strSrcFile, OF_Read)

SalFileOpenExt
Sintaxis Bok = SalFileOpenExt ( hFile, strFileName, nStyle, strReopen)

Descripción Abre o re-abre un archivo. nombres de archivo largos de hasta 260 caracteres es compatible.

parámetros hFile Recibe identificador de archivo. El mango del archivo abierto o reabierto.

strFileName Cuerda. El nombre del archivo que desea abrir, crear, eliminar, o prueba.

nStyle Número. Una constante que especifica el estilo en que para abrir el archivo. nStyle
puede ser una o más estilos combinado usando el
O (|) del operador.

strReopen Recibe cadena. La información utilizada para volver a abrir el archivo.

Valor de retorno Bok es TRUE si la función tiene éxito y FALSE si falla.

Ver también SalFileOpenF

Ejemplo en SAM_Create
Si SalFileOpenExt (HFile, 'C: \\ AUTOEXEC.BAT', OF_Read,
strReopen)

Centura Generador de Referencia de funciones 2-59


Capítulo 2 Funciones centura Builder

SalFilePutC
Sintaxis Bok = SalFilePutC ( hFile, nChar)

Descripción Escribe un carácter en un archivo abierto. Utilice esta función en lugar de SalFilePutChar si el
personaje es un no-ASCII (ANSI) o caracteres de 16 bits.

parámetros hFile Identificador de archivo. El mango del archivo abierto.

nChar Número. La no-ASCII o un valor numérico de 16 bits del carácter para


escribir en hFile.

Valor de retorno Bok es TRUE si la función tiene éxito y FALSE si no es capaz de escribir en hFile.

Ver también SalFileGetC

Ejemplo Lazo
Llamada SalFilePutC ( hFile, nNull) Si nCount = 5

Conjunto romper

nPosiciones = nPosiciones + 1

SalFilePutChar
Sintaxis Bok = SalFilePutChar ( hFile, nChar)

Descripción Escribe un carácter en un archivo abierto.

parámetros hFile Identificador de archivo. El mango del archivo abierto.

nChar Número. El valor numérico del carácter ANSI para escribir en hFile.

Valor de retorno Bok es TRUE si la función tiene éxito y FALSE si falla.

Ver también SalFileGetChar

Ejemplo Llamar SalFileSeek (fhInFile, nFilePos, ARCHIVO, _SeekBegin) Llamada SalFilePutChar

(HFile, nChar)

2-60 Centura Generador de Referencia de funciones


SalFilePutStr
Sintaxis Bok = SalFilePutStr ( hFile, strString)

Descripción Escribe una cadena en un archivo abierto. Centura añade un carácter retorno de carro / línea a
la cuerda.

parámetros hFile Identificador de archivo. El mango del archivo abierto.

strString Cuerda. La cadena a escribir.

Valor de retorno Bok es TRUE si la función tiene éxito y FALSE si falla.

Ver también SalFileGetStr

Ejemplo Lazo
! Leer cada línea del archivo de origen y escribirla en el archivo de

destino

Si SalFileGetStr (fhSrcFile, strText, LINE_SIZE)


Llamada SalFilePutStr (FhDestFile, strText)

SalFileRead
Sintaxis nResult = SalFileRead ( hFile, strBuffer, nBufferLength)

Descripción Lee una memoria intermedia de caracteres desde un archivo abierto en una cadena.

parámetros hFile Identificador de archivo. El mango del archivo abierto.

strBuffer Recibe cadena. La cadena a la que se leen los datos.

nBufferLength Número. El número de bytes a leer.

Valor de retorno nResult es el número de bytes leídos. En el final del archivo, SalFileRead devuelve un recuento de bytes

menos de la cantidad solicitada.

Ver también SalFileWrite

Ejemplo Llamar SalFileSeek (fhInFile, nFilePos, FILE_SeekBegin) Loop

Establecer nCharsRead = SalFileRead (FhInFile, strBuffer,


nRecSize)

Centura Generador de Referencia de funciones 2-61


Capítulo 2 Funciones centura Builder

SalFileRemoveDirectory
Sintaxis Bok = SalFileRemoveDirectory ( strDir)

Descripción Elimina un directorio.

parámetros strDir Cuerda. El nombre de la ruta completa del directorio que desea eliminar.

Valor de retorno Bok es TRUE si la función tiene éxito y FALSE si falla. SalFileRemoveDirectory
También devuelve FALSO si strDir contiene archivos o directorios otros.

Ver también SalFileCreateDirectory

Ejemplo en SAM_AppStartup
Establecer bNotesOldDeleted = SalFileRemoveDirectory (StrDir)

SalFileSeek
Sintaxis Bok = SalFileSeek ( hFile, nBytes, Nposition)

Descripción Posiciona el puntero de archivo en un archivo abierto. La siguiente operación de archivo (como una lectura o escritura) tiene lugar en
esta nueva ubicación.

parámetros hFile Identificador de archivo. El mango de un archivo abierto.

nBytes Número. La posición específica del puntero del fichero; el número de bytes de
Nposition donde tendrá lugar la siguiente operación de archivo.

Nposition Número. La posición general del puntero del fichero; uno de los valores
siguientes:

FILE_SeekBegin
FILE_SeekCurrent
FILE_SeekEnd

Valor de retorno Bok es TRUE si la función tiene éxito y FALSE si falla.

Ver también SalFileTell

Ejemplo Llamada SalFileSeek (FhInFile, 0, FILE_SeekBegin)

2-62 Centura Generador de Referencia de funciones


SalFileSetCurrentDirectory
Sintaxis Bok = SalFileSetCurrentDirectory ( strPath)

Descripción Cambia el directorio de trabajo actual. Si la ruta especificada no contiene una letra de unidad, se cambia el directorio
actual de la unidad predeterminada. De lo contrario, el directorio actual de la unidad especificada se cambia sin hacer que
la corriente de excitación.

parámetros strPath Cuerda. El nombre de ruta del nuevo directorio de trabajo actual.

Valor de retorno Bok es TRUE si la función tiene éxito y FALSE si falla.

Ver también SalFileGetCurrentDirectory


SalFileSetDrive

Ejemplo en SAM_AppStartup
Establecer DirOk = SalFileSetCurrentDirectory ( 'C: \\ NOTAS \\ REL2')

SalFileSetDateTime
Sintaxis Bok = SalFileSetDateTime ( strFileName, dtDateTime)

Descripción Establece la fecha y hora de modificación del archivo especificado.

parámetros strFileName Cuerda. El nombre del archivo cuya fecha de modificación que desea establecer.

dtDateTime Fecha y hora. La fecha y hora de modificación.

Valor de retorno Bok es TRUE si la función tiene éxito y FALSE si falla.

Ver también SalFileGetDateTime

Ejemplo en SAM_Click
Establecer Bok = SalFileSetDateTime ( 'Sql.ini', SalDateCurrent ())

SalFileSetDrive
Sintaxis Bok = SalFileSetDrive ( strDriveLetter)

Descripción Establece la unidad de disco actual a la letra de la unidad especificada.

parámetros strDriveLetter String.0 La nueva letra de la unidad de disco. La longitud del valor de este
parámetro es un carácter. Si especifica un valor mayor que este, Centura lee sólo el
primer carácter.

Valor de retorno Bok es TRUE si la función tiene éxito y FALSE si falla.

Centura Generador de Referencia de funciones 2-63


Capítulo 2 Funciones centura Builder

Ver también SalFileGetDrive


SalFileSetCurrentDirectory

Ejemplo en SAM_AppStartup
Establecer bDriveIsC = SalFileSetDrive ( 'C')

SalFileTell
Sintaxis nPos = SalFileTell ( hFile)

Descripción Devuelve la posición actual en un archivo abierto.

parámetros hFile Identificador de archivo. El mango de un archivo abierto.

Valor de retorno nPos es la posición actual en hFile. Si se produce un error, nPos es igual a -1.

Ver también SalFileSeek

Ejemplo Set = nRecPos SalFileTell (FhInFile)

SalFileWrite
Sintaxis nResult = SalFileWrite ( hFile, strBuffer, nBufferLength)

Descripción Escribe una cadena en un archivo abierto.

parámetros hFile Identificador de archivo. El mango de un archivo abierto.

strBuffer Cuerda. La cadena a escribir a hFile.

nBufferLength Número. El número de bytes a escribir.

Valor de retorno nResult es el número de bytes escritos.

Ver también SalFileRead

Ejemplo Llamada SalFileWrite (FhInFile, strCharBuf, 1)

SalFmtFieldToStr
Sintaxis Bok = SalFmtFieldToStr ( hWndField, strValue, bFormat)

Descripción Copia el contenido de un campo de datos o columna ventana de la tabla en una cadena. Esta función también le permite copiar
el formato de los datos.

parámetros hWndField identificador de ventana. El mango (o nombre) de la columna de campo de datos o la ventana de
la tabla de la cuyo valor (y, opcionalmente, cuyo formato) que desea copiar.

2-64 Centura Generador de Referencia de funciones


strValue Recibe cadena. La cadena a la que copiar el valor del campo de datos. Si bFormat es
TRUE, la cadena debe ser lo suficientemente largo para contener los caracteres de
formato.

bFormat Boole. Especifica si desea mantener el formato del campo. Si es TRUE, copias
CENTURA el contenido del campo con formato a la cadena; Si es falso, Centura
copia el contenido del campo sin formato a la cadena.

Valor de retorno Bok es TRUE si la función tiene éxito y FALSE si falla.

Ver también SalFmtStrToField

Ejemplo en SAM_FieldEdit
Llamada SalFmtFieldToStr (DfDateTime,
dfDateString, TRUE)

SalFmtFormatDateTime
Sintaxis strDateTime = SalFmtFormatDateTime ( dtDateTime, strPicture)

Descripción Formatos de un valor de fecha / hora con un formato de imagen de fecha / hora determinada. Si no se especifica un formato
de imagen o el que se especifica es válido, Centura utiliza la configuración predeterminada de la sección [INTL] y la sección
[GTITOOLS] definida por el usuario de Win.ini para el formato.

parámetros dtDateTime Fecha y hora. El valor de fecha / hora para formatear.

strPicture Cuerda. El formato de imagen de fecha / hora.

Valor de retorno strDateTime es la cadena de fecha / hora con formato.

Ver también SalFmtFormatNumber


SalFmtIsValidPicture

Ejemplo Establecer dtDateTime = 1992-02-14-00.00.00 Set =

strFormatted SalFmtFormatDateTime (DtDateTime,


strPicture)

Centura Generador de Referencia de funciones 2-65


Capítulo 2 Funciones centura Builder

SalFmtFormatNumber
Sintaxis strNumber = SalFmtFormatNumber ( nNúmero, strPicture)

Descripción Formatea un valor numérico utilizando un formato de número de imagen. Si no se especifica un formato de imagen o el
que se especifica es válido, Centura utiliza la configuración predeterminada de la sección [INTL] y la sección [GTITOOLS]
definida por el usuario de Win.ini para el formato.

parámetros nNúmero Número. El valor del número de formato.

strPicture Cuerda. El formato de número de imagen.

Valor de retorno strNumber es una serie de números con formato.

Ver también SalFmtFormatDateTime

SalFmtIsValidPicture

Ejemplo Establecer strNumber = SalFmtFormatNumber (NNúmero, strPicture)

SalFmtGetFormat
Sintaxis NFormat = SalFmtGetFormat ( hWndField)

Descripción Devuelve el formato actual de una columna de campo de datos o ventana de la tabla.

Nota: Algunos de los parámetros tienen subparámetros. Por ejemplo, el formato de fecha tiene tanto un subparámetro que
especifica carácter separador de una fecha y un subparámetro que especifica la secuencia mes / día / año.

parámetros hWndField Identificador de ventana. El mango (o nombre) del campo de datos o columna ventana
de la tabla a formato.

Valor de retorno NFormat es un número que indica el formato del campo. El valor de retorno es uno de
las siguientes constantes.

campos de fecha pueden tener el formato:

FMT_Format_Date
FMT_Format_DateTime
FMT_Format_Picture
FMT_Format_Time
FMT_Format_Unformatted

Los campos numéricos pueden tener el formato:

FMT_Format_Format_Currency
FMT_Format_Decimal
FMT_Format_Percentage

2-66 Centura Generador de Referencia de funciones


FMT_Format_Picture
FMT_Format_Unformatted

campos de cadena pueden tener el formato:

FMT_Format_Invisible
FMT_Format_Lowercase
FMT_Format_Uppercase
FMT_Format_Unformatted

Ver también SalFmtSetFormat

Ejemplo Configuración del menú

Se activa cuando:

comprueba cuando: SalFmtGetFormat (DfDateTime) =


FMT_Format_Unformatted

SalFmtGetInputMask
Sintaxis Bok = SalFmtGetInputMask ( hWnd, strMask)

Descripción Obtiene la máscara de entrada de una columna de campo de datos o la ventana de la tabla.

Véase el capítulo de formato y validación en la referencia técnica de Centura para más información sobre las máscaras de
entrada.

parámetros CVent Identificador de ventana. El mango (o nombre) de un cuadro combinado, campo de datos, o columna

ventana de la tabla.

strMask Recibe cadena. La máscara de entrada recuperada.

Valor de retorno Bok es TRUE si la función tiene éxito y FALSE si CVent no es una ventana válida
manejar o el objeto no tiene una máscara de entrada.

Ver también SalFmtIsValidInputMask


SalFmtKeepMask
SalFmtSetInputMask
SalFmtUnmaskInput

Ejemplo en SAM_Click
Establecer Bok = SalFmtGetInputMask (DF1, DF2)

Centura Generador de Referencia de funciones 2-67


Capítulo 2 Funciones centura Builder

SalFmtGetPicture
Sintaxis Bok = SalFmtGetPicture ( hWndField, strPicture)

Descripción Obtiene el formato de la imagen de una columna de campo de datos o la ventana de la tabla.
parámetros hWndField Identificador de ventana. El mango (o nombre) de la columna de campo de datos o la
ventana de la tabla cuyo formato de imagen que desee.

strPicture Recibe cadena. El formato de la imagen.

Valor de retorno Bok es TRUE si la función tiene éxito, y FALSE si el campo de datos o ventana de la tabla
columna no es la imagen con formato.

Ver también SalFmtSetPicture

Ejemplo Establecer Bok = SalFmtGetPicture (HWndField, strPicture)

SalFmtIsValidField
Sintaxis bValid = SalFmtIsValidField ( hWndField)

Descripción Valida el contenido de una columna de campo de datos o ventana de la tabla usando el perfil actual.

Centura despoja de caracteres de formato y valida el contenido de un campo según el tipo. Después de eso, Centura
valida el formato de imagen caracteres adicionales que se introducen para garantizar que se ajustan a los requisitos
del perfil.

parámetros hWndField Identificador de ventana. El mango (o nombre) de la columna de campo de datos o


la ventana de la tabla cuyo contenido desea validar.

Valor de retorno bValid es TRUE si el contenido del campo son válidos y FALSE si el contenido del campo son

inválido.

Ejemplo en SAM_Validate
Si SalFmtIsValidField (dfDateTime)
Llamada SalFmtValidateField (DfDateTime,
FMT_Validate_None)

2-68 Centura Generador de Referencia de funciones


Centura Generador de Referencia de funciones

SalFmtIsValidInputMask
Sintaxis Bok = SalFmtIsValidInputMask ( strMask)

Descripción Valida la máscara de entrada de una columna de campo de datos o la ventana de la tabla. Véase el capítulo de formato y validación

en la referencia técnica de Centura para más información sobre las máscaras de entrada.

parámetros strMask Cuerda. Una máscara de entrada.

Valor de retorno Bok es TRUE si strMask es una máscara de entrada válida y FALSO si no es válido.

Ver también SalFmtGetInputMask


SalFmtSetInputMask
SalFmtKeepMask
SalFmtUnmaskInput

Ejemplo en SAM_Click
Si SalFmtIsValidInputMask (DF1)
Establecer gl2 = 'es válido'

Else

Establecer gl2 = 'no es válido'

SalFmtIsValidPicture
Sintaxis Bok = SalFmtIsValidPicture ( strPicture, nTipo)

Descripción Valida un número o fecha / hora de formato de imagen. Estos son

ejemplos de formatos de imagen de fecha / hora:

Fecha / Hora Imagen Valor visualizado

d MMMM, aaaa 09 de enero 1989

dddd, MMMM d, aaaa Viernes, 07 de febrero 1989

M / d / aa 03.18.89

dd-MM-aaaa 18-03-1989

d "de" MMMM, aaaa 9 de enero de 1989

M / d / yy-hh.mm.ss AMPM 2/3 / AM 91-12.23.15

Centura Generador de Referencia de funciones 2-69


Capítulo 2

Estos son ejemplos de los formatos de la imagen:

Imagen número Valor visualizado

7,00%

0.00E + 00 3.65e + 03

0.00E-00 3.65e03

$ #, ## 0; ($ #, ## 0) $ 1,350

$ #, ## 0; ($ #, ## 0) ($ 1,350)

0.00 95.00

parámetros strPicture Cuerda. La cadena de imagen.

nTipo Número. Especificar si el formato es para un número o valor de fecha / hora


con una de estas constantes: FMT_Pic_DateTime FMT_Pic_Number

Valor de retorno Bok es TRUE si el formato de la imagen es válida y de lo contrario.

Ver también SalFmtGetPicture

SalFmtSetPicture

Ejemplo Conjunto strPicture = 'M / d / yy'

Establecer bValid = SalFmtIsValidPicture (StrPicture,


FMT_Pic_DateTime)

SalFmtKeepMask
Sintaxis Bret = SalFmtKeepMask ( BMantenga)

Descripción Por defecto, Centura elimina caracteres de máscara de entrada cuando se copia el valor en un campo de datos, columna de
ventana de la tabla, o un cuadro combinado. Por ejemplo, si crea un campo de datos con la máscara de entrada AA-AA y
copiar su valor a otro campo de datos, Centura no copia el guión.

Puede llamar SalFmtKeepMask para cambiar el comportamiento predeterminado para que Centura mantiene los caracteres de
máscara de entrada cuando se copia el valor en un campo de datos, columna de ventana de la tabla, o un cuadro combinado. Por
ejemplo, si crea un campo de datos con la máscara de entrada AA-AA y copiar su valor a otro campo de datos, copias Centura el
guión.

2-70 Centura Generador de Referencia de funciones


El carácter "^" en una máscara de entrada se impone a una configuración que realice con esta función.

Véase el capítulo de formato y validación en el NTURA referencia técnica Centura para más información sobre
las máscaras de entrada.

parámetros BMantenga Boole.

Si FALSO (por defecto), Centura elimina caracteres de máscara de entrada cuando se


copia un valor.

Si es TRUE, Centura mantiene los caracteres de máscara de entrada cuando se copia un valor.

Valor de retorno Bret es el valor que ha especificado en BMantenga.

Ver también SalFmtGetInputMask


SalFmtIsValidInputMask
SalFmtSetInputMask
SalFmtUnmaskInput

Ejemplo Establecer Bret = SalFmtKeepMask ( BMantenga)

SalFmtSetFormat
Sintaxis Bok = SalFmtSetFormat ( hWndField, NFORMAC)

Descripción Establece el formato de columna de la ventana de un campo de datos o tabla.

perfil de país de un campo determina las características de un formato. Si el campo utiliza el formato por defecto, el perfil en

WIN.INI determina las características de un formato. El formato de un campo debe estar de acuerdo con el tipo de datos del

campo, así que por ejemplo, los campos de número sólo puede ser formateado como valores decimales, porcentajes, o de

divisas.

parámetros hWndField Identificador de ventana. El mango (o nombre) de la columna de campo de datos o la ventana de
la tabla cuyo formato desea establecer.

NFormat Número. El formato para hWndField.

Valor de retorno Bok es TRUE si la función tiene éxito y FALSE si el formato no se puede establecer como
cuando el formato no es apropiado para el campo especificado.

Ver también SalFmtGetFormat

Ejemplo Establecer Bok = SalFmtSetFormat (HWndField, NFORMAC)

Centura Generador de Referencia de funciones 2-71


Capítulo 2

SalFmtSetInputMask
Sintaxis Bok = SalFmtSetInputMask ( hWnd, strMask)

Descripción Establece la máscara de entrada de una columna de campo de datos o la ventana de la tabla.

Véase el capítulo de formato y validación en la referencia técnica de Centura para más información sobre las máscaras de
entrada.

parámetros CVent Identificador de ventana. El mango (o nombre) de un cuadro combinado, campo de datos, o columna

ventana de la tabla.

strMask Cuerda. La cadena que sujeta la máscara de entrada. Si strMask es una cadena vacía
( ''), establece Centura CVent ser formateado.

Valor de retorno Bok es TRUE si la función tiene éxito y FALSE si falla.

Ver también SalFmtGetInputMask


SalFmtIsValidInputMask
SalFmtKeepMask
SalFmtUnmaskInput

Ejemplo Establecer Bok = SalFmtSetInputMask (HWnd, strMask)

SalFmtSetPicture
Sintaxis Bok = SalFmtSetPicture ( hWndField, strPicture)

Descripción Establece el formato de la imagen de una columna de campo de datos o la ventana de la tabla.

parámetros hWndField Identificador de ventana. El mango (o nombre) de la columna de campo de datos o


ventana tabla cuyo formato de imagen que desea ajustar.

strPicture Cuerda. El formato de la imagen.

Valor de retorno Bok es TRUE si la función tiene éxito y FALSE si falla. Bok es FALSO si alguno de
lo siguiente es cierto:

• El identificador de ventana no es válida.

• El campo / columna no es de fecha / hora o tipo de datos serie.

• El formato de imagen no es válido.

Ver también SalFmtGetPicture

Ejemplo Establecer Bok = SalFmtSetPicture (HWndField, strPicture)

2-72 Centura Generador de Referencia de funciones


SalFmtStrToField
Sintaxis Bok = SalFmtStrToField ( hWndField, strValue, bFormat)

Descripción Copia una cadena a una columna de campo de datos o la ventana de la tabla. Después de copiar la cadena en el campo, Centura da

formato a la cadena.

parámetros hWndField Identificador de ventana. El mango (o nombre) de la columna de campo de datos o la ventana de
la tabla a la que se asigna la cadena.

strValue Cuerda. La cadena a copiar.

bFormat Boole. Especificar si (true) o no (false) el valor de cadena tiene el mismo


formato que el campo.

Valor de retorno Bok es VERDADERO si el valor de la cadena tiene el mismo formato que el campo de datos o tabla

la columna de la ventana. Bok es FALSO si no está formateada valor de la cadena.

Ver también SalFmtFieldToStr

Ejemplo acciones de mensajes

en SAM_FieldEdit
Llamada SalFmtStrToField (DfDateTime, dfDateString,
CIERTO )

SalFmtUnmaskInput
Sintaxis Bok = SalFmtUnmaskInput ( hWnd, strInput)

Descripción Unmasks the contents of a data field or table window column and puts the result in a string. Unmasking
involves taking control characters out of a string, but does not include converting characters from
lowercase to uppercase and vice versa. See the Formatting and Validating chapter in the Centura
Technical Reference for more about input masks.

Parameters hWnd Window Handle. The handle (or name) of a combo box, data field, or table
window column.

strInput Receive String. The unmasked contents of hWnd.

Return Value bOk is TRUE if the function succeeds and FALSE if hWnd is not a valid window
handle or the object does not have an input mask.

See Also SalFmtGetInputMask


SalFmtIsValidInputMask
SalFmtKeepMask
SalFmtSetInputMask

Centura Generador de Referencia de funciones 2-73


Chapter 2

Example Set bOk = SalFmtUnmaskInput ( hWnd, strInput )

SalFmtValidateField
Syntax bOk = SalFmtValidateField ( hWndField, nValidate )

Description Validates and formats a data field's or table window column's contents. Centura strips off formatting
characters and validates a field's contents according to type. After that, Centura 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 Centura to validate the field
successfully.

Parameters hWndField Window Handle. The handle (or name) of the data field or table window
column to validate and format.

nValidate Number. A constant value that indicates what Centura does if a format error
occurs and the function returns FALSE:

Return Value bOk is TRUE if the function succeeds and FALSE otherwise, such as when the input
is invalid. If bOk is FALSE, Centura optionally displays an error dialog box.

Example If SalFmtIsValidField ( dfDateTime )


Call SalFmtValidateField ( dfDateTime,
FMT_Validate_None )
Return VALIDATE_Ok

SalFontGet
Syntax bOk = SalFontGet ( hWndFont, strName, nSize, nEnhancement )

Description Gets a window's font name, size, and enhancements.

Parameters hWndFont Window Handle. The handle (or name) of the window whose font information
you want.

strName Receive String. The name of the font.

nSize Receive Number. The size of the font.

nEnhancment Receive Number. The font enhancements. To combine two or more of the
FONT_Enh* constants, use the OR (|) operator.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

See Also SalFontGetNames


SalFontGetSizes
SalFontSet

2-74 Centura Builder Function Reference


Example If NOT SalFontGet ( hWndField, strFont, nSize, nEnhancement )
... Error ...

SalFontGetNames
Syntax nNames = SalFontGetNames ( nGet, strArrayFontNames )

Description Gets the names of the screen or printer fonts.

Parameters nGet Number. A constant that specifies whether to get the screen or printer fonts:

strArrayFontNames Receive String Array. The name of an array of strings that


contains the font names returned.

Return Value nNames is the number of font names returned.

See Also SalFontGet


SalFontGetSizes
SalFontSet

Example Set nTotal = SalFontGetNames ( FONT_GetScreen, sFontNames )

SalFontGetSizes
Syntax nSizes = SalFontGetSizes ( nGet, strFontName, nArrayFontSizes )

Description Gets the sizes of a screen or printer font.

Parameters nGet Number. Specify whether to get the sizes of a printer or screen font:

strFontName String. The name of the font.

nArrayFontSizes Receive Numeric Array. The name of an array of numbers that contains the
font sizes (in points) returned.

Return Value nSizes is the number of font sizes returned.

See Also SalFontGet


SalFontGetNames
SalFontSet

Example Set nTotal = SalFontGetSizes ( FONT_GetScreen, sFont,


nSizes )

Centura Builder Function Reference 2-75


Chapter 2

SalFontSet
Syntax bOk = SalFontSet ( hWnd, strName, nSize, nEnhancement )

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

Parameters hWnd Window Handle. The handle (or name) of the window whose font attributes
you want to set.

strName String. The name of the font.

nSize Number. The size of the font (in points).

nEnhancment Number. The font enhancements. To specify two or more of the


FONT_Enh* constants, combine them using the OR (|) operator.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

See Also SalFontGet


SalFontGetNames
SalFontGetSizes

Example Set bOk = SalFontSet ( hWnd, strName, nSize, nEnhancement )

SalFormGetParmNum
Syntax bOk = SalFormGetParmNum ( hWndForm, nParm, nValue )

Description Returns the value of one of three form window parameters: height, width, or number of pages.

Parameters hWndForm Window Handle. The handle (or name) of the form window whose
parameter value you want.

nParm Number. Specify form height, form width, or number of pages to return in
nValue:

nValue Receive Number. The value of the form parameter requested.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

Example On SAM_Create
Call SalFormGetParmNum ( frmMain, FORM_nFormPages,

dfPages )

2-76 Centura Builder Function Reference


SalFormUnitsToPixels
Syntax nNumPixels = SalFormUnitsToPixels ( hWnd, nFormUnits, bVertical )

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

Parameters hWnd Window Handle. The handle (or name) of a window.

nFormUnits Number. The number of form units.

bVertical Boolean. 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.

Return Value nNumPixels is the number of pixels returned if the function succeeds. nNumPixels is
zero (0) if hWnd is invalid.

See Also SalPixelsToFormUnits

Example Set nPixels = SalFormUnitsToPixels ( pbExample, nWidth, FALSE )

SalGetDataType
Syntax nDataType = SalGetDataType ( hWnd )

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

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.

Parameters hWnd Window Handle. The handle (or name) of a data field or table window
column.

Return Value nDataType is 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 (excluding DT_Boolean).

See Also SalGetType

Example Set nType = SalGetType ( hWndChild ) If nType =


TYPE_DataField
Set nDataType = SalGetDataType ( hWndChild )

Centura Builder Function Reference 2-77


Chapter 2

SalGetDefButton
Syntax hWndDef = SalGetDefButton ( hWndParent )

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

Parameters hWndParent Window Handle. The handle (or name) of the form window or dialog box.

Return Value hWndDef is the handle of the default push button. It equals if 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.

See Also SalSetDefButton

Example Menu Actions


Set hWndDef = SalGetDefButton ( frmMain ) Call
SalSetDefButton ( frmMain.pb2 ) Set hWndDef = SalGetDefButton
( frmMain )

SalGetFirstChild
Syntax hWndChild = SalGetFirstChild ( hWndParent, nTypeMask )

Description Returns the handle of the first child window of the specified type. This function can be used to get MDI
child windows.

Parameters hWndParent Window Handle. The handle (or name) of a form window, dialog box, or
table window whose first child handle you want.

nTypeMask Number. One or more window types combined (using the OR (|) operator) to
create a mask of child window types. Centura only examines those child
windows whose type AND'd with nTypeMask yields a non-zero value.

Return Value hWndChild is the handle of the first child window of the specified type. hWndChild
equals hWndNULL if there is no child window or if hWndParent is invalid.

See Also SalGetNextChild


SalGetType

Example Set hWndChild = SalGetFirstChild ( hWndCurrentFW, nTypeMask )

2-78 Centura Builder Function Reference


SalGetFocus
Syntax hWndFocus = SalGetFocus ( )

Description Returns the handle of the window with the focus.

Parameters No parameters.

Return Value hWndFocus identifies the window that can currently receive input from the keyboard.

See Also SalSetFocus

Example Set hWndSave = SalGetFocus ( )

SalGetItemName
Syntax bOk = SalGetItemName ( hWnd, strText )

Description Gets the name of an object. Use SalGetItemName to qualify variables in SQL statements.

Parameters hWnd Window Handle. The handle of an object.

strText Receive String. The name of the object.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

Example Call SalGetItemName ( hWndCurrent, strItemName ) Return


strItemName

SalGetMaxDataLength
Syntax nDataLength = SalGetMaxDataLength ( hWndObject )

Description Returns the maximum length of a data field, multiline text field, or table window column. Use this function
before assigning a value to any of these objects to ensure that the value fits.

Parameters hWndObject Window Handle. The handle of a data field, multiline text field, or table window
column.

Return Value nDataLength is a number that specifies the maximum length of hWndObject. A
length of DW_Default (-1) indicates that the object was declared with a length of ‘Default’.

See Also SalSetMaxDataLength

Example Set nDataLen = SalGetMaxDataLength ( hWnddfCurrent )

Centura Builder Function Reference 2-79


Chapter 2

SalGetNextChild
Syntax hWndNextChild = SalGetNextChild ( hWndChild, nTypeMask )

Description Returns the handle of the next child window that matches a specified type. Use this function after calling
SalGetFirstChild to get the other child window siblings. If you want this function to work for background text,
lines, and frames, set the system variable bStaticsAsWindows to TRUE. This is a global system variable,
so the setting persists until you change it.

Parameters hWndChild Window Handle. The handle (or name) of a child window. You can specify the
return value of SalGetFirstChild.

nTypeMask Number. One or more window types combined (using the OR (|) operator) to
create a mask of child window types. Centura only examines those child
windows whose type AND'd with nTypeMask yields a non-zero value.

Return Value hWndNextChild is the handle of the next child window of the specified type.
hWndNextChild equals hWndNULL if there is no child window or if hWndChild is invalid.

See Also SalGetFirstChild


SalGetType

Example Set hWndChild = SalGetNextChild ( hWndChild, nTypeMask )

SalGetProfileInt
Syntax nValue = SalGetProfileInt ( strSection, strEntry, nDefault, strFileName )

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

Parameters strSection String. The section heading.

strEntry String. The entry whose associated value is being retrieved.

nDefault Number. Specify the default value (0 to 32,767) to return if the function cannot
find the entry.

strFileName String. The name of the initialization file or company name depending on the
settings made using the SalUseRegistry function. If you are searching for an
INI file and do not specify the full path, Centura searches for the file in the
Windows subdirectory.

2-80 Centura Builder Function Reference


Return Value nValue is the integer value of an entry in the specified section of a file or registry, if
the function is successful. If the value found is not an integer, nValue is zero (0). If SalGetProfileInt
cannot find the specified entry, nValue is the default value of the entry.

See Also SalGetProfileString


SalSetProfileString
SalUseRegistry

Example Set nValue = SalGetProfileInt ( strSection, strEntry, nDefault,


strFileName )

SalGetProfileString
Syntax nBytes = SalGetProfileString ( strSection, strEntry, strDefault, strValue, strFileName )

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

Parameters strSection String. The section heading.

strEntry String. The entry whose associated value is being retrieved.

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

strValue Receive String. The value of strEntry. Maximum 1024 bytes.

strFileName String. The name of the initialization file or company name depending on the
settings made using the SalUseRegistry function. If you are searching for an
INI file and do not specify the full path, Centura searches for the file in the
Windows subdirectory.

Return Value nBytes is the number of bytes copied to strValue, not including the terminating null
character.

See Also SalGetProfileInt


SalSetProfileString
SalUseRegistry

Example Set nBytes = SalGetProfileString ( strSection, strEntry,


strDefault, strValue, strFileName )

Centura Builder Function Reference 2-81


Chapter 2

SalGetType
Syntax nType = SalGetType ( hWnd )

Description Returns an object's type.

Use SalGetType with internal functions that process objects generically. Such internal functions pass only a
window handle; the internal function does not know the type of the associated object.

Parameters hWnd Window Handle. The handle of an object.

Return Value nType is a number that indicates the object's type. The value returned is one of a
predetermined set of constants.

See Also SalGetFirstChild


SalGetNextChild

Example Set nType = SalGetType ( hWndChild ) If nType =


TYPE_DataField
Set nDataType = SalGetDataType ( hWndChild ) If
nDataType = nHideDataType
Call SalHideWindow ( hWndChild )

SalGetVersion
Syntax nType = SalGetVersion ( )

Description Returns the Centura version. For example, SalGetVersion returns 400 for Centura v4.0.0.

Parameters No parameters.

Return Value nType is a number that indicates the Centura version number.

Example Message Actions


On SAM_Create
Set df1 = SalGetVersion ()

2-82 Centura Builder Function Reference


SalGetWindowLabelText
Syntax nLength = SalGetWindowLabelText ( hWnd, sText, nMaxLength )

Description Retrieves the background text of a window.

Important: The background text does not require a mnemonic for the functions listed above to operate.

Parameters hWnd Window Handle. The handle (or name) of a window.

strText Receive String. The window text.

nMaxLen Number. The maximum length of the window text.

Return Value nLength is a number that indicates the length of strText. nLength is zero (0) if the
window has no text.

Example Set nLength = SalGetWindowLabelText ( hWnd, sText, nMaxLength )

SalGetWindowLoc
Syntax bOk = SalGetWindowLoc ( hWnd, nX, nY )

Description Returns a window's current position on the X and Y axes.

Parameters hWnd Window Handle. The handle (or name) of a window.

nX Receive Number. The position of the window on the X axis, specified in


Centura form units.

nY Receive Number. The position of the window on the Y axis, specified in


Centura form units.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

See Also SalSetWindowLoc

Example Call SalSetWindowLoc ( pbExample, 0, 0 ) Call SalGetWindowLoc

( pbExample, nX, nY )

Centura Builder Function Reference 2-83


Chapter 2

SalGetWindowSize
Syntax bOk = SalGetWindowSize ( hWnd, nWidth, nHeight )

Description Returns a window's size.

Parameters hWnd Window Handle. The handle (or name) of a window.

nWidth Receive Number. The width of the window, specified in Centura form
units.

nHeight Receive Number. The height of the window, specified in Centura form
units.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

See Also SalSetWindowSize

Example Call SalGetWindowSize ( pbExample, nWidth, nHeight )


Call SalSetWindowSize ( pbExample, nWidth+1, nHeight+1 )

SalGetWindowState
Syntax nState = SalGetWindowState ( hWnd )

Description Returns a window's current state.

Parameters hWnd Window Handle. The handle (or name) of a window. This function fails if you
specify a window name that has not been created.

Return Value nState is a constant that indicates a window's current state. It is equal to one of a
predefined set of values.

Example On SAM_Click
If SalGetWindowState ( fwDataWindow ) != Window_Normal

SalGetWindowText
Syntax nLength = SalGetWindowText ( hWnd, strText, nMaxLen )

Description Retrieves the text of a window.

Window text is the title of a form window, dialog box, table window, radio button, check box, background
text, or push button. For a data field, multiline text field, or table window column, window text is the field
value in string form, regardless of the object's data type.

2-84 Centura Builder Function Reference


Note: Use SalTblGetColumnTitle to get the title of a table window column.

Parameters hWnd Window Handle. The handle (or name) of a window.

strText Receive String. The window text.

nMaxLen Number. The maximum length of the window text.

Return Value nLength is a number that indicates the length of strText. nLength is zero (0) if the
window has no text.

See Also SalSetWindowText


SalTblGetColumnTitle

Example Call SalGetWindowText ( hWndForm, strfrmTitle, 50 )

SalHideWindow
Syntax bOk = SalHideWindow ( hWndToHide )

Description Hides a window.

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

Parameters hWndToHide Window Handle. The handle (or name) of a window to hide.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

See Also SalBringWindowToTop


SalShowWindow

Example Call SalHideWindow ( hWndChild )

SalHideWindowAndLabel
Syntax bOk = SalHideWindowAndLabel ( hWndToHide )

Description Hides a window and its associated label.

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.

Parameters hWndToHide Window Handle. The handle (or name) of a window to hide.

Return Value bOk is 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.

Centura Builder Function Reference 2-85


Chapter 2

See Also SalBringWindowToTop


SalHideWindow
SalShowWindowAndLabel

Example Set bOk = SalHideWindowAndLabel ( hWndToHide )

SalHStringToNumber
Syntax nHString = SalHStringToNumber ( strString )

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

Note: You must pass a string handle as the lParam parameter because the value is too large to fit in the wParam.

Parameters strString String. The string whose handle you want to change to a number.

Return Value nHString is a number that represents the converted string handle.

See Also SalNumberToHString

Example Set nHString = SalHStringToNumber ( strString )

SalInvalidateWindow
Syntax bOk = SalInvalidateWindow ( hWndToPaint )

Description Causes a window to be repainted.

Parameters hWndToPaint Window Handle. The handle (or name) of a window to repaint.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

See Also SalUpdateWindow

Example Set bOk = SalInvalidateWindow ( hWndToPaint )

SalIsButtonChecked
Syntax bIsSet = SalIsButtonChecked ( hWnd )

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

Parameters hWnd Window Handle. The handle (or name) of a radio button or check box.

Return Value bIsSet is TRUE if hWnd is set or checked and FALSE otherwise.

2-86 Centura Builder Function Reference


Example Set bIsSet = SalIsButtonChecked ( hWnd )

SalIsNull
Syntax bNull = SalIsNull ( hWndIsNull )

Description Verifies whether a data field, multiline text field, or table window column is null or empty.

Parameters hWndIsNull Window Handle. The handle (or name) of a data field, multiline text
field, or table window column.

Return Value bNull is TRUE if hWndIsNull is null or empty, and FALSE otherwise.

See Also SalClearField

Example On SAM_Validate
If SalIsNull ( dfDateTime )
Call SalMessageBox ( 'You must enter a value',
'Validate Error', MB_Ok )
Return VALIDATE_Cancel

SalIsValidDateTime
Syntax bOk = SalIsValidDateTime ( hWndField )

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

Parameters hWndField Window Handle. The handle (or name) of a data field, multiline text
field, or table window column.

Return Value bOk is TRUE if hWndField contains a valid date/time value and FALSE otherwise.

Example On SAM_Validate
If NOT SalIsValidDateTime ( dfDateTime )

SalIsValidDecimal
Syntax bOk = SalIsValidDecimal ( hWndField, nPrecision, nScale )

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

Centura Builder Function Reference 2-87


Chapter 2

Parameters hWndField Window Handle. The handle (or name) of a data field, multiline text
field, or table window column.

nPrecision Number. The number of digits to display.

nScale Number. The number of digits to the right of the decimal point.

Return Value bOk is TRUE if hWndField contains a number of the specified precision and scale,
and FALSE if hWndField's value does not match the parameter specifications.

See Also SalIsValidInteger


SalIsValidNumber

Example On SAM_Validate
If NOT SalIsValidDecimal ( dfDecimal, 5, 2 )
Call SalMessageBox ( 'Invalid decimal value', 'Validate

SalIsValidInteger
Syntax bOk = SalIsValidInteger ( hWndField )

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

Parameters hWndField Window Handle. The handle (or name) of a data field, multiline text
field, or table window column.

Return Value bOk is TRUE if hWndField contains a valid integer value and FALSE if the number is
a fraction, decimal, or any other invalid integer value.

See Also SalIsValidDecimal


SalIsValidNumber

Example On SAM_Validate
If NOT SalIsValidInteger ( dfInteger)
Call SalMessageBox ( 'Invalid integer value', 'Validate

Error', MB_Ok ) Return


VALIDATE_Cancel

2-88 Centura Builder Function Reference


SalIsValidNumber
Syntax bOk = SalIsValidNumber ( hWndField )

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

Parameters hWndField Window Handle. The handle (or name) of a data field, multiline text
field, or table window column.

Return Value bOk is TRUE if hWndField contains a valid SQLBase number and FALSE otherwise.

See Also SalIsValidDecimal


SalIsValidInteger

Example On SAM_Validate
! Examples of valid numbers: 100, 100.123, -100 If NOT SalIsValidNumber
( dfNumber)
Call SalMessageBox ( 'Invalid number value', 'Validate
Error', MB_Ok )

SalIsWindowEnabled
Syntax bEnabled = SalIsWindowEnabled ( hWndEnabled )

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

Parameters hWndEnabled Window Handle. The handle (or name) of a window.

Return Value bOk is TRUE if hWndEnabled is enabled and FALSE if hWndEnabled is not enabled
or is not a valid handle.

See Also SalDisableWindow


SalEnableWindow

Example If SalIsWindowEnabled ( pbUpdate )


Call SalDisableWindow ( pbUpdate )

SalIsWindowVisible
Syntax bOk = SalIsWindowVisible ( hWndVisible )

Description Determines whether a window is currently visible.

Parameters hWndVisible Window Handle. The handle (or name) of a window. Create a window first
before using a window template as a parameter.

Centura Builder Function Reference 2-89


Chapter 2

Return Value bOk is TRUE if the window is visible and FALSE otherwise.

See Also SalHideWindow


SalShowWindow

Example Set bOk = SalIsWindowVisible ( hWndVisible )

SalListAdd
Syntax nIndex = SalListAdd ( hWndList, strName )

Description Adds a string to a list box or combo box.

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

Parameters hWndList Window Handle. The handle (or name) of a list box or combo box.

strName String. The string to add.

Return Value nIndex is the index of the new list box entry. SalListAdd returns LB_Err on an error
and LB_ErrSpace if there is insufficient memory to store the new string.

See Also SalListInsert


SalListPopulate

Example Call SalListAdd ( hWndlbCurrent, strLBItem )

SalListClear
Syntax bOk = SalListClear ( hWndList )

Description Deletes all entries from a list box or combo box.

Parameters hWndList Window Handle. The handle (or name) of a list box or combo box.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

Example Call SalListClear ( lbProducts )

2-90 Centura Builder Function Reference


SalListDelete
Syntax nRemaining = SalListDelete ( hWndList, nIndex )

Description Deletes a list box or combo box entry.

Parameters hWndList Window Handle. The handle (or name) of a list box or combo box.

nIndex Number. The index of the entry to delete.

Return Value nRemaining is the number of rows remaining in the list box or combo box if the
function succeeds. SalListDelete returns LB_Err if an error occurs.

Example Set nCount = SalListDelete ( hWndlbCurrent, nLBIdx )

SalListFiles
Syntax bOk = SalListFiles ( hWndList, hWndPath, strPathName, nFlags )

Description Populates a list box or combo box with a directory of files. You can create the same kinds of dialog boxes
as those displayed by items of the Windows File menu.

Parameters hWndList Window Handle. The handle (or name) of a list box or combo box.

hWndPath Window Handle. The handle (or name) of the data field that displays the
current directory and drive of the files listed in hWndList.

strPathName Receive String. The path name of the directory whose files are listed. You must
specify a field name or variable; you cannot specify a string constant as a receive
parameter.

nFlags Number. The type of file access. You can combine FA_* constants with
the OR (|) operator to create this value.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

See Also SalFileOpen

Example Call SalListFiles ( hWndLB, hWndLoadPath, strLoadPath,


nFileAttrib )

Centura Builder Function Reference 2-91


Chapter 2

SalListGetMultiSelect
Syntax bOk = SalListGetMultiSelect ( hWndList, nSelectedArray )

Description Returns an array of index numbers of selected list box entries. Use the SalListQueryMultiCount
function to return the number of selected list box entries.

Parameters hWndList Window Handle. The handle (or name) of a list box.

nSelectedArray Receive Numeric Array. The name of an array of index numbers of


selected list box entries.

Return Value bOk is TRUE if the function succeeds and FALSE if hWndList or nSelectedArray are
not valid, or if no list box entries are selected.

Example Call SalListGetMultiSelect ( lbExample, nSelectedArray )

SalListInsert
Syntax nIndex = SalListInsert ( hWndList, nIndex, strAdd )

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

Parameters hWndList Window Handle. The handle (or name) of a list box or combo box.

nIndex Number. The position at which to insert the row. A value of -1 adds the entry
to the end of the list box or combo box.

strAdd String. The string to insert.

Return Value nIndex is the index of the new entry. SalListInsert returns LB_Err on an error and
LB_ErrSpace if there is insufficient memory to store the new string.

See Also SalListAdd

Example Call SalListInsert ( hWndLB, -1, strInsertStr )

SalListPopulate
Syntax bOk = SalListPopulate ( hWndList, hSql, strSelect )

Description Populates a list box or combo box with a result set. SalListPopulate overrides any settings made with
SalListSetTabs.

If the SELECT statement returns data from multiple columns, each column's data
displayed in a list box is separated by tabs. However, due to a Microsoft Windows limitation, each
column's data displayed in a combo box is separated by a single '|'

2-92 Centura Builder Function Reference


character. There is no space between one column's data, the separator character, and another column's
data.

Parameters hWndList Window Handle. The handle (or name) of the list box or combo box to populate.

hSql Sql Handle. The handle of a SELECT statement.

strSelect String. The S ELECT statement.

The SELECT statement can contain bind variables, but it cannot contain
INTO variables.

If strSelect is null (''), Centura uses the previously prepared SELECT


statement associated with hSql. This avoids repreparing each time
SalListPopulate executes.

Return Value bOk is TRUE if the function succeeds and FALSE if any of the parameters are invalid
or if strSelect contains INTO variables.

See Also SalListAdd


SalListInsert

Example On SAM_Click
Call SalListPopulate ( lbExample, hSql, 'select
name, trainer, room ' || 'from guest_roster' )

SalListQueryCount
Syntax nEntries = SalListQueryCount ( hWndList )

Description Returns the number of list box or combo box entries.

Parameters hWndList Window Handle. The handle (or name) of a list box or combo box.

Return Value nEntries is the number of entries in hWndList. SalListQueryCount returns LB_Er if
an error occurs.

Example If NOT SalListQueryCount ( hWndlbCurrent )


Return FALSE

Centura Builder Function Reference 2-93


Chapter 2

SalListQueryFile
Syntax bDirectory = SalListQueryFile ( hWndList, strFileName )

Description Fetches the selected directory or file name from a list box or combo box.

Parameters hWndList Window Handle. The handle (or name) of a list box or combo box.

strFileName Receive String. The directory or file name being fetched.

Return Value bDirectory is TRUE if strFileName is the name of a directory and FALSE if it is the
name of a file.

Example Call SalListQueryFile ( hWndLB, strFileName )

SalListQueryMultiCount
Syntax nSelected = SalListQueryMultiCount ( hWndList )

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

multiple-selection in the list box's customizer.

Parameters hWndList Window Handle. The handle (or name) of a multiple-selection list box.

Return Value nSelected is the number of selected entries in hWndList if the function succeeds.
nSelected equals LB_Err if hWndList is a single-selection list box or is not a valid handle.

Example Set nSelected = SalListQueryMultiCount ( lbExample )

SalListQuerySelection
Syntax nIndex = SalListQuerySelection ( hWndList )

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

multiple-selection in the list box's customizer.

Note: For an example of getting a list of selected entries in a multiple-selection list box, see SalListQueryState.

Parameters hWndList Window Handle. The handle (or name) of a combo box or
single-selection list box.

2-94 Centura Builder Function Reference


Return Value nIndex is the index of the selected entry if the function succeeds.
SalListQuerySelection returns LB_Err if no entry is selected or if the list box is a multiple-selection
box.

See Also SalListGetMultiSelect


SalListQueryState

Example Set nLBIdx = SalListQuerySelection (hWndlbCurrent )

SalListQueryState
Syntax bSelected = SalListQueryState ( hWndList, nIndex )

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

Parameters hWndList Window Handle. The handle (or name) of a list box or combo box.

nIndex Number. The index of the list box or combo box entry.

Return Value bSelected is TRUE if the nIndex entry is selected and FALSE if the entry is not
selected or an error occurs.

Example If SalListQueryState ( hWndlbCurrent, nLBIdx )


Set nCount = SalListDelete (hWndlbCurrent, nLBIdx) Else

Set nLBIdx = nLBIdx + 1

SalListQueryText or SalListQueryTextX
Syntax nLength = SalListQueryText ( hWndList, nIndex, strText )

or

strText = SalListQueryTextX ( hWndList, nIndex )

Description Fetches a list box or combo box entry.

Parameters hWndList Window Handle. The handle (or name) of a list box or combo box.

nIndex Number. The index of the list box or combo box entry.

Return Value strText is the fetched list box or combo box entry.

Example Set strRecv = SalListQueryTextx ( hWnddbCurrent, nLBIdx )

Centura Builder Function Reference 2-95


Chapter 2

SalListQueryTextLength
Syntax nLength = SalListQueryTextLength ( hWndList, nIndex )

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

Parameters hWndList Window Handle. The handle (or name) of a list box or combo box.

nIndex Number. The index of the list box or combo box entry.

Return Value nLength is the length of the string. SalListQueryTextLength returns LB_Err if an
error occurs.

Example Set nLBItemLen = SalListQueryTextLength (hWndlbCurrent, nLBIdx)

SalListQueryTextX
Syntax strText = SalListQueryTextX ( hWndList, nIndex )

Description Fetches a list box or combo box entry.

Parameters hWndList Window Handle. The handle (or name) of a list box or combo box.

nIndex Number. The index of the list box or combo box entry.

strText Receive String. The string to which the entry is fetched.

Return Value nLength is the length of strText. SalListQueryText returns LB_Err if nIndex is
invalid.

strText is the fetched list box or combo box entry.

Example Set strText = SalListQueryTextX ( hwndLst, 2 )

SalListRedraw
Syntax bOk = SalListRedraw ( hWndList, bRedraw )

Description Redraws entries in a list box or combo box, or prevents them from being redrawn. For example, use
SalListRedraw when populating a list box or combo box to prevent the contents from being redrawn after
adding each entry. When Centura finishes populating it, use this function to redraw the list box or combo
box .

Parameters hWndList Window Handle. The handle (or name) of a list box or combo box.

bRedraBoolean. If TRUE, Centura redraws the list box or combo box


contents; if FALSE, Centura does not.

2-96 Centura Builder Function Reference


Return Value bOk is TRUE if the function succeeds and FALSE otherwise, such as when hWndList
is not a valid handle.

Example On SAM_Click
Call SalListRedraw ( lbList, FALSE )

SalListSelectString
Syntax nIndex = SalListSelectString ( hWndList, nIndexStart, strText )

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

single-selection in the list box's customizer.

SalListSelectString uses search wraps. For example, if Centura starts searching for a string in the middle of
a list box and reaches the end of the list box without finding the string, Centura wraps the search to the
beginning of the list box. It continues the search until it reaches the middle of the list box where it started the
search.

Parameters hWndList Window Handle. The handle (or name) of a combo box or
single-selection list box.

nIndexStart Number. The index at which to start the search. The search begins at row
nIndexStart + 1.

strText String. The string to search for.

Return Value nIndex is the index of the selected string. SalListSelectString returns LB_Err if an
error occurs or if hWndList is a multiple-selection list box.

Example Set nIdx = SalListSelectString ( hWndLB, 0, strFindStr )


If nIdx = LB_Err
Call SalListInsert ( hWndLB, -1, strInsertStr ) Else

Call SalListInsert ( hWndLB, nIdx + 1, strInsertStr )

SalListSetMultiSelect
Syntax bOk = SalListSetMultiSelect ( hWndList, nIndex, bSelect )

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

multiple-selection in the list box's customizer.

Parameters hWndList Window Handle. The handle (or name) of a combo box or
multiple-selection list box.

Centura Builder Function Reference 2-97


Chapter 2

nIndex Number. The index of the entry to select or deselect. If you specify -1,
Centura selects or deselects all list box or combo box entries.

bSelect Boolean. Specify whether to select (TRUE) or deselect (FALSE) the


nIndex entry.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

Example Call SalListSetMultiSelect ( lbExample, 5, TRUE )

SalListSetSelect
Syntax bOk = SalListSetSelect ( hWndList, nIndex )

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

or multiple-selection in the list box's customizer.

Parameters hWndList Window Handle. The handle (or name) of a combo box or
single-selection list box.

nIndex Number. The index of the entry to select. If you specify -1, Centura
deselects the entry.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails. bOk is equal to LB_Err if
an error occurs.

Example Call SalListSetSelect ( hWndLB, 0 )

SalListSetTabs
Syntax bOk = SalListSetTabs ( hWndList, nArrayTabStops )

Description Sets tabs in a list box. List boxes use tabs to align columns of data. You need to set tabs when you are
using a proportional font. SalListPopulate overrides any settings made with SalListSetTabs.

Parameters hWndList Window Handle. The handle (or name) of a list box.

nArrayTabStops Numeric Array. The name of an array of numbers that represent


tabs. Specify tabs in inches.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

Example On SAM_Create Set

nTabStops[0] = 2 Set

nTabStops[1] = 3 Call SalListSetTabs

( hWndItem, nTabStops )

2-98 Centura Builder Function Reference


Call SalListAdd ( hWndItem,
'aaa'||TAB||'aaaa'||TAB||'aaaaa' )

SalLoadApp
Syntax bOk = SalLoadApp ( strAppName, strParameters )

Description Starts an application.

Parameters strAppName String. The name of the application to start.

strParameters String. Optional command line arguments.

See the SAL (Centura Application Language) chapter of the Centura Developer's
Reference for detailed information about command line arguments.

Return Value bOk is TRUE if the function succeeds and FALSE if Centura cannot find the
application or cannot start it.

See Also SalLoadAppAndWait

Example On SAM_AppStartup
Call SalLoadApp ( ' DBWINDOW.EXE','' )

SalLoadAppAndWait
Syntax bOk = SalLoadAppAndWait ( strAppName, nMode, nRet )

Description Starts an application, then waits for it to exit before returning control to the original application.

Parameters strAppName String. The name of the application to start, separated from command line
arguments with a space. See the SAL chapter in the
Centura Developer’s Reference for
information about command line arguments.

nMode Number. The show mode. Specify any of these Window_* constants:

Window_Maximized
Window_Minimized
Window_Normal
Window_NotVisible

nRet Receive Number. The return status. If the function succeeds (bOk is TRUE),
nRet is the exit status of the invoked application. A zero exit status usually
means successful

Centura Builder Function Reference 2-99


Chapter 2

execution. If bOk is TRUE, but the invoked application exits before entering a
message loop, its exit status is not available to Centura. In this case, nRet is
zero as though the program exited with a zero exit status.

If the function is unsuccessful (bOk is FALSE), nRet is an error code


indicating why Windows could not start the application. In Windows 3.1,
this value is less than 32: 0
Out of memory, executable file was corrupt, or invalid relocations 2

File not found 3

Path not found 5

Attempt to dynamically link to a task, or there was a sharing or


network protection violation 6
Library requires separate data segments for each task 8
Insufficient memory to start application 10
Incorrect Windows version 11
Invalid .EXE file (non-Windows .EXE or error in .EXE image)

12 Application designed for different operating system 13 DOS 4.0


application 14 Unknown .EXE type

15 Attempt to load real-mode application developed for an


earlier version of Windows
16 Attempt to load a second instance of an .EXE
containing multiple, writeable data segments 19 Attempt to load a
compressed executable file. The file
must be decompressed before it can be loaded. 20 A DLL
required to run this application was corrupt. 21 Application requires
Microsoft Windows 32-bit
extensions
Return Value bOk is TRUE if the function succeeds and FALSE if Centura cannot find the
application or cannot start it.

See Also SalLoadApp

Example On SAM_AppStartup Call SalLoadAppAndWait

(‘DBWindow.EXE’, WINDOW_NORMAL,
NRECUSTATUS)

2-100 Centura Builder Function Reference


SalMapEnterToTab
Syntax bOk = SalMapEnterToTab ( bState )

Description This function 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.

Parameters bState Boolean.

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.

Return Value bOk is TRUE if the function succeeds and FALSE if you do not specify a Boolean
value.

Example Set bOk = SalMapEnterToTab ( bState )

SalMDIArrangeIcons
Syntax bOk = SalMDIArrangeIcons ( hWndMDI )

Description Arranges minimized child window icons in an MDI window.

Parameters hWndMDI Window Handle. The handle of an MDI window.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

See Also SalMDICascade


SalMDITile

Example Menu Actions


Call SalMDIArrangeIcons ( hWndMDI )

SalMDICascade
Syntax bOk = SalMDICascade ( hWndMDI )

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

Parameters hWndMDI Window Handle. The handle of an MDI window.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

See Also SalMDIArrangeIcons


SalMDITile

Centura Builder Function Reference 2-101


Chapter 2

Example Menu Actions


Call SalMDICascade ( hWndMDI )

SalMDITile
Syntax bOk = SalMDITile ( hWndMDI, bPosition )

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

Parameters hWndMDI Window Handle. The handle of an MDI window.

bPosition Boolean. How to tile the child windows. If TRUE, tile the windows
vertically; if FALSE, tile the windows horizontally.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

See Also SalMDIArrangeIcons


SalMDICascade

Example Menu Actions


Call SalMDITile ( hWndMDI, FALSE )

SalMessageBeep
Syntax bOk = SalMessageBeep ( nAlertLevel )

Description Plays a waveform sound that corresponds to a given system alert level defined in the [sounds] section of
WIN.INI. A user can set the sound for each alert level with the sounds application in the Control Panel.

Parameters nAlertLevel Number. The alert level:

0xFFFFFFFF (-1)Standard beep using the computer speaker.

MB_IconAsterisk MB_IconExclamation MB_IconStop MB_IconQuestion

MB_Ok

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

See Also SalMessageBox

Example Call SalMessageBeep ( - 1 )

2-102 Centura Builder Function Reference


SalMessageBox
Syntax nResult = SalMessageBox ( strText, strTitle, nFlags )

Description 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, whose value is hWndForm,

creates the message box.

Parameters strText String. The message text. You can enter multiple lines of text by pressing
CTRL-ENTER to start a new line.

strTitle String. The message box title.

nFlags Number. The message box style.

Create a style by combining style option constants using the OR (|) operator.
You can combine at most one constant from each component. A style has
four components:

1. Push buttons

2. Message icons, if any

3. A default button

4. Whether the message box is system modal

Push Button Style Constants

MB_AbortRetryIgnore
MB_Ok(default)
MB_OkCancel
MB_RetryCancel
MB_YesNo
MB_YesNoCancel Icon
Style Constants
MB_IconAsterisk
MB_IconExclamation
MB_IconHand
MB_IconQuestion
MB_IconStop
Response Button Style Constants

MB_DefButton1

Centura Builder Function Reference 2-103


Chapter 2

MB_DefButton2
MB_DefButton3
MB_NoFocus
System Style Constants

MB_ApplModal (default)
MB_SystemModal
Return Value nResult is the value of the push button the user clicks.

See Also SalMessageBeep

Example Set nResult = SalMessageBox ( strText, strTitle, nFlags )

2-104 Centura Builder Function Reference


SalModalDialog
Syntax nReturn = SalModalDialog ( tDlgBoxToCreate, hWndOwner, Parm1, Parm2, ...)

Description Creates a modal dialog box.

This function accepts a string or a template as the first parameter. When you pass a string, you cannot
also pass window parameters.

You cannot use receive window parameters as receive function arguments. You can use a temporary
variable as the function argument and then assign the temporary variable to the receive function
parameter.

A modal dialog box disables its owner window. A system modal dialog box disables the entire Windows
system. SalEndDialog destroys the modal dialog box and enables all windows that were disabled.

SalModalDialog 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 receive
type. However, you can initialize receive window parameters only with variables. This means that you
cannot pass a data field or any other window object to a window parameter that was defined as a receive
type.

Parameters tDlgBoxToCreate Template or String. The name of the modal dialog box to create.

NOTE: If you specify a string value, you cannot pass window parameter
arguments (Parm1, Parm2, ...).

hWndOwner Window Handle. The handle (or name) of the owner window. Use
hWndNULL for a dialog box that does not have an owner.

Parm1 Any Centura data type. The (optional) first of a variable number of
window parameters.

Parm2 Any Centura data type. The (optional) second of a variable number of
window parameters.

Return Value nReturn is the value specified in the second parameter of SalEndDialog
(hWndOwner). nReturn is equal to -1 if the dialog box is not created.

See Also SalEndDialog


SalModalDialogFromStr

Example Call SalModalDialog ( dlgAboutBox, hWndForm )

Centura Builder Function Reference 2-105


Chapter 2

SalModalDialogFromStr
Syntax nReturn = SalModalDialogFromStr ( tDlgBoxToCreate, hWndOwner, Parm1, Parm2, ... )

Description Creates a modal dialog box. This function is useful with internal functions that expect to receive a dialog
box name in a string parameter.

A modal dialog box disables its owner window. A system modal dialog box disables the entire Windows
system. SalEndDialog destroys a modal dialog box and enables all windows that were disabled.

Parameters strName String. The name of the modal dialog box to create.

hWndOwner Window Handle. The handle (or name) of the owner window. Use hWndNUL
for dialog boxes that do not have owners.

Parm1 Any Centura data type. The (optional) first of a variable number of
window parameters.

Parm2 Any Centura data type. The (optional) second of a variable number of
window parameters.
Return Value nReturn is the value specified in the second parameter of SalEndDialog
(hWndOwner). nReturn is equal to -1 if the dialog box is not created.

See Also SalModalDialog


Example Set nReturn = SalModalDialogFromStr ( tDlgBoxToCreate,
hWndOwner )

SalMoveWindow
Syntax bOk = SalMoveWindow ( hWndToMove, nXOffset, nYOffset )

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

Parameters hWndToMove Window Handle. The handle (or name) of the window to move.

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

nYOffset Number. The number of form units to move the window on the Y axis.

Return Value bOk is TRUE if the function succeeds, and FALSE if hWndToMove is invalid.

See Also SalCenterWindow


Example Call SalMoveWindow ( pbExample, 1,1 )

2-106 Centura Builder Function Reference


Centura Builder Function Reference

SalNumberAbs
Syntax nNum = SalNumberAbs ( nValue )

Description Computes a number's absolute value.

Parameter s nValue Number. The number whose absolute value you want.

Return Value nNum is the absolute value of nValue.

Example On SAM_Click
Set nNum1 = SalNumberAbs ( - 12 )

SalNumberArcCos
Syntax nArcCos = SalNumberArcCos ( nValue )

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

Parameters nValue Number. The number whose arccosine you want.

Return Value nArcCos is the arccosine of nValue. It is zero (0) if nValue is less than -1 or greater
than 1.

Example On SAM_Click
Set nNum1 = SalNumberArcCos ( 1 )

SalNumberArcSin
Syntax nArcSin = SalNumberArcSin ( nValue )

Description Computes a value's arcsine. The value's domain is -1 to 1.

Parameters nValue Number. The number whose arcsine you want.

Return Value nArcSin is the arcsine of nValue. nArcSin is zero (0) if nValue is less than -1 or
greater than 1.

Example On SAM_Click
Set nNum1 = SalNumberArcSin (1)

Centura Builder Function Reference 2-107


Chapter 2

SalNumberArcTan
Syntax nArcTan = SalNumberArcTan ( nValue )

Description Computes a value's arctangent.

Parameters nValue Number. The number whose arctangent you want.

Return Value nArcTan is the arctangent of nValue. nArcTan is in the range -1 to 1.

See Also SalNumberArcTan2

Example On SAM_Click
Set nNum1 = SalNumberArcTan ( 1 )

SalNumberArcTan2
Syntax nArcTan2 = SalNumberArcTan2 ( nValueY, nValueX )

Description Computes the arctangent of two values. This function uses the signs of both parameters to
determine the quadrant of the return value.

Parameters nValueY Number. One of two values whose arctangent you want.

nValueX Number. The other of two values whose arctangent you want.

Return Value nArcTan2 is the arctangent of nValueY and nValueX. nArcTan2 is in the range -1/2 to
1/2.

See Also SalNumberArcTan

Example On SAM_Click
Set nNum1 = SalNumberArcTan2 ( 1, 0 )

SalNumberCos
Syntax nCos = SalNumberCos ( nAngle )

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

Parameters nAngle Number. The value of the angle whose cosine you want.

Return Value nCos is the cosine of nAngle. If the angle is large, nCos can reflect a partial loss of
significance. If the angle is so large that significance is totally lost, SalNumberCos returns zero (0).

See Also SalNumberCosH

Example On SAM_Click
Set nNum1 = SalNumberCos ( 0 )

2-108 Centura Builder Function Reference


SalNumberCosH
Syntax nCosH = SalNumberCosH ( nAngle )

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

Parameters nAngle Number. The value of the angle whose hyperbolic cosine you want.

Return Value nCosH is the hyperbolic cosine of nAngle. If the return value is too large, nCosH
equals zero (0).

See Also SalNumberCos

Example On SAM_Click
Set nNum1 = SalNumberCosH ( 0 )

SalNumberExponent
Syntax nNumExp = SalNumberExponent ( nValue )

Description Computes a value's exponential function.

Parameters nValue Number. The value whose exponential function you want.

Return Value nNumExp is the result of 'e' to the power of nValue. When there is an underflow or
overflow, nNumExp is equal to zero (0).

Example On SAM_Click
Set nNumExp = SalNumberExponent ( 2.302585093 )

SalNumberHigh
Syntax nHi = SalNumberHigh ( nValue )

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

Parameters nValue Number. The number whose high-order word value you want. Centura treats
nValue as an unsigned 32-bit number.

Return Value nHi is the high-order word value of nValue.

See Also SalNumberLow

Example On SAM_Click
Set nHi = SalNumberHigh ( 0xffffaaaa )

Centura Builder Function Reference 2-109


Chapter 2

SalNumberHypot
Syntax nHypotenuse = SalNumberHypot ( nX, nY )

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

Parameters nX Number. The length of one side of a right triangle.

nY Number. The length of another side of a right triangle.

Return Value nHypotenuse is the length of the hypotenuse of a right triangle. If the computation of
the hypotenuse results in an overflow, nHypotenuse is equal to zero (0).

Example On SAM_Click
Set nHypotenuse = SalNumberHypot ( 3, 4 )

SalNumberLog
Syntax nLog = SalNumberLog ( nValue )

Description Computes a number's natural logarithm.

Parameters nValue Number. The number whose natural logarithm you want.

Return Value nLog is the natural logarithm of nValue. If nValue is negative or 0, nLog is equal to
zero (0).

See Also SalNumberLogBase10

Example On SAM_Click
Set nLog = SalNumberLog ( 1000 )

SalNumberLogBase10
Syntax nLogBase10 = SalNumberLogBase10 ( nValue )

Description Computes a number's base -10 logarithm.

Parameters nValue Number. The number whose base -10 logarithm you want.

Return Value nLogBase10 is the base-10 logarithm of nValue. If nValue is negative or 0,


nLogBase10 is equal to zero (0).

See Also SalNumberLog

Example On SAM_Click
Set nLogBase10 = SalNumberLogBase10 ( 1000 )

2-110 Centura Builder Function Reference


SalNumberLow
Syntax nLo = SalNumberLow ( nValue )

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

Parameters nValue Number. The number whose low-order word value you want. Centura treats
nValue as an unsigned 32-bit number.

Return Value nLo is the low-order word value of nValue.

See Also SalNumberHigh

Example On SAM_Click
Set nLo = SalNumberLow ( 0xffffaaaa )

SalNumberMax
Syntax nNumMax = SalNumberMax ( nVal1, nVal2 )

Description Returns the greater of two values.

Parameters nVal1 Number. The first of two values.

nVal2 Number. The second of two values.

Return Value nNumMax is the greater of nVal1 and nVal2.

See Also SalNumberMin

Example On SAM_Click
Set nNumMax = SalNumberMax ( 1765.2, -2 )

SalNumberMin
Syntax nNumMin = SalNumberMin ( nVal1, nVal2 )

Description Returns the lesser of two values.

Parameters nVal1 Number. The first value.

nVal2 Number. The second value.

Return Value nNumMin is the lesser of nVal1 and nVal2.

See Also SalNumberMax

Example On SAM_Click
Set nNumMin = SalNumberMin ( 1765.2, -2 )

Centura Builder Function Reference 2-111


Chapter 2

SalNumberMod
Syntax nModulo = SalNumberMod ( nNumber, nNumberMod )

Description Returns a number's modulo. This function divides nNumber by nNumberMod and returns the
remainder.

Parameter
nNumber Number. The number to divide.

nNumberMod Number. The number by which to divide nNumber.

Return Value nModulo is the remainder of nNumber divided by nNumberMod.

Example On SAM_Click
Set nNumber = SalNumberMod ( 5, 2 )

SalNumberPi
Syntax nNumPi = SalNumberPi ( nValue )

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

Parameters nValue Number. The number to multiply by Pi.

Return Value nNumPi is nValue multiplied by Pi.

Example On SAM_Click
Set nNumPi = SalNumberSin ( SalNumberPi ( 1 ) /2 )

SalNumberPower
Syntax nNumPower = SalNumberPower ( nX, nY )

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

Parameters nX Number. The number to raise to the power of nY.

nY Number. The exponent.

Return Value nNumPower is equal to nX raised to the nYth power, with the following conditions:

1. If nX is not 0 and nY is 0, nNumPower is equal to 1.

2. If nX is 0 and nY is negative, nNumPower is equal to zero (0).

3. If both nX and nY are zero (0), or if nX is negative and nY is not a whole number, nNumPower is
equal to zero (0), meaning that an error occurred.

2-112 Centura Builder Function Reference


4. In instances where an overflow or an underflow occurs, nNumPower is equal to zero (0).

Example On SAM_Click
Set nNumPow = SalNumberPower ( 2, 3 )

SalNumberRandInit
Syntax bOk = SalNumberRandInit ( nSeed )

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

Use SalNumberRandInit when you want to generate the same set of pseudo-random numbers over and
over again, for example, when doing reproducible experiments. Call SalNumberRandInit followed by
numerous calls to SalNumberRandom. To repeat the random number series, call SalNumberRandInit
again, specify the same seed value, and follow with numerous calls to SalNumberRandom.

Parameters nSeed Number. The starting point. A whole number in the range of 0 to 32767.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

See Also SalNumberRandom

Example On SAM_Click
Call SalNumberRandInit ( 12 )

SalNumberRandom
Syntax nRandomNum = SalNumberRandom ( )

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

Parameters No parameters.

Return Value nRandomNum is a pseudo-random number.

See Also SalNumberRandInit

Example On SAM_Click
Call SalNumberRandInit ( 12 ) Set nRandNum = SalNumberRandom

()

Centura Builder Function Reference 2-113


Chapter 2

SalNumberRound
Syntax nResult = SalNumberRound ( nNumber )

Description Returns a rounded number.

If the fractional part of a number is greater than or equal to .5, Centura rounds the number up. For
example, the number 124.33 returns 124; the number 124.56 returns
125.

Parameters nNumber Number. The number to round.

Return Value nResult is nNumber after rounding.

Example On SAM_Click
Set nNumber = SalNumberRound ( 124.5 )

SalNumberSin
Syntax nSin = SalNumberSin ( nAngle )

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

Parameters nAngle Number. The value of the angle whose sine you want.

Return Value nSin is the sine of nAngle. If the angle is large, nSin can reflect a partial loss of
significance. If the angle is so large that significance is totally lost, nSin is equal to zero (0).

See Also SalNumberSinH

Example On SAM_Click
Set nNum = SalNumberSin ( SalNumberPi ( 1 ) /2 )

SalNumberSinH
Syntax nSinH = SalNumberSinH ( nAngle )

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

Parameters nAngle Number. The value of the angle whose hyperbolic sine you want.

Return Value nSinH is the hyperbolic sine of nAngle. If the angle is too large, nSinH is equal to
zero (0).

See Also SalNumberSin

Example On SAM_Click

2-114 Centura Builder Function Reference


Set nNum = SalNumberSinH ( 0 )

SalNumberSqrt
Syntax nSqrt = SalNumberSqrt ( nValue )

Description Computes a number's square root.

Parameters nValue Number. The number whose square root you want.

Return Value nSqrt is the square root of nValue. If nValue is negative, it is out of the domain of
valid values and nSqrt is equal to zero (0).

Example On SAM_Click
Set nSqrt = SalNumberSqrt ( 36 )

SalNumberTan
Syntax nTan = SalNumberTan ( nAngle )

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

Parameters nAngle Number. The value of the angle whose tangent you want.

Return Value nTan is the tangent of nAngle. If the angle is large, nTan can reflect a partial loss of
significance. If the angle is so large that significance is totally lost, nTan is equal to zero (0).

See Also SalNumberTanH

Example On SAM_Click
Set nNum = SalNumberTan ( SalNumberPi ( 1 ) / 4 ) )

SalNumberTanH
Syntax nTanH = SalNumberTanH ( nAngle )

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

Parameters nAngle Number. The value of the angle whose hyperbolic tangent you want.

Return Value nTanH is the hyperbolic tangent of nAngle. If the angle is large, nTanH can reflect a
partial loss of significance. If the angle is so large that significance is totally lost, nTanH is equal to
zero (0).

See Also SalNumberTan

Centura Builder Function Reference 2-115


Chapter 2

Example On SAM_Click
Set nNum = SalNumberTanH ( 0 )

SalNumberToChar
Syntax strChar = SalNumberToChar ( nNumber )

Description Converts a decimal value to an ASCII character.

Parameters nNumber Number. The number to convert.

Return Value strChar is the character converted from nNumber.

See Also SalStrFirstC

Example On SAM_Click
Set df2 = SalNumberToChar ( df1 )

SalNumberToHString
Syntax strString = SalNumberToHString ( nHString )

Description Converts a number to a string handle.

Parameters nHString Number. The numeric value of the string handle to convert.

Return Value strString is a string handle that represents the number converted.

See Also SalHStringToNumber

Example On SAM_Click
Set strString = SalNumberToHString ( lParam )
Set nBuffLen = SalStrGetBufferLength (strString)

SalNumberToStr
Syntax nLength = SalNumberToStr ( nNumber, nDecimalPlaces, strString )

Description Converts a number to a string.

Parameters nNumber Number. The number to convert.

nDecimalPlaces Number. The number of decimal places you want in strString.

strString Receive String. The string converted from nNumber.

Return Value nLength is the length of strString, including the decimal point.

strString is the string converted from nNumber.

2-116 Centura Builder Function Reference


See Also SalNumberToStrX
SalStrToNumber

Example On SAM_Click
Set nLength = SalNumberToStr ( 124.5, 1, strString )

SalNumberToStrX
Syntax strString = SalNumberToStrX ( nNumber, nDecimalPlaces)

Description Converts a number to a string.

Parameters nNumber Number. The number to convert.

nDecimalPlaces Number. The number of decimal places you want in strString.

strString Receive String. The string converted from nNumber.

Return Value nLength is the length of strString, including the decimal point.

strString is the string converted from nNumber.

See Also SalNumberToStr


SalStrToNumber

Example On SAM_Click
Set df2 = SalNumberToStrX ( df1, 2 )

SalNumberToWindowHandle
Syntax hWnd = SalNumberToWindowHandle ( nWnd )

Description Converts a number to a window handle.

For example, you can broadcast a message by passing -1 to SalSendMsg as follows:

Set hWndAll = SalNumberToWindowHandle ( -1 ) Call


SalSendMsg ( hWndAll, nMsg, 0, 0 )

Parameters nWnd Number. The number to convert.

Return Value hWnd is the window handle converted from nWnd.

See Also SalWindowHandleToNumber

Example Set hWndtblCustomer = SalNumberToWindowHandle ( lParam )

Centura Builder Function Reference 2-117


Chapter 2

SalNumberTruncate
Syntax nResult = SalNumberTruncate ( nNumber, nPrecision, nScale )

Description Truncates a number.

Parameters nNumber Number. The number to truncate, starting with the leftmost.

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

nScale Number. The number of digits to the right of the decimal point. The nPrecision
parameter must be large enough to hold the number of digits that you specify
in this parameter.

Return Value nResult is the result of truncating nNumber.

Example On SAM_Click Set nNum = SalNumberTruncate ( 10.0625, 4, 4 )

SalParentWindow
Syntax hWndParent = SalParentWindow ( hWnd )

Description Returns the handle of an object’s parent window. The following table shows the SalParentWindow
behavior with tool bars and MDI windows:

Where called Parameter Return

Tool bar child in a hWndItem Handle of the top-level object that


top-level object. contains it (hWndForm).

Tool bar child in an MDI hWndItem Handle of the MDI window that
window. contains it (hWndMDI).

Child table window in a tool hWndForm Handle of the top-level object that
bar. contains it (hWndForm is the handle of
the table window).

Top-level object in an MDI hWndForm Handle of hte MDI window that


window. contains it (hWndMDI).

Parameters hWnd Window Handle. The handle (or name) of the object whose parent window
handle you want.

Return Value hWndParent is the parent window handle of hWnd. If hWnd is a top-level window,
hWndParent is the window handle of the owner window, as passed to
SalCreateWindow, otherwise hWndParent is equal to hWndNull.

2-118 Centura Builder Function Reference


Example Set hWndParent = SalParentWindow ( hWnd )

SalPicClear
Syntax bOk = SalPicClear ( hWndToClear )

Description Deletes the contents of a picture.

Parameters hWndToClear Window Handle. The handle (or name) of a picture.

Return Value bOk is TRUE if the function succeeds and FALSE if hWnd is not a valid picture.

See Also SalPicSet


SalPicSetFile
SalPicSetFit
SalPicSetString

Example Call SalPicClear ( hWndPicture )

SalPicGetDescription
Syntax nLength = SalPicGetDescription ( hWndPict, strDesc, nMaxLen )

Description Retrieves a description of a picture's contents. An example of a description is "Microsoft Draw".

Parameters hWndPict Window Handle. The handle (or name) of a picture.

strDesc Receive String. A description of the contents of hWndPict. For a graphic


image, SalPicGetDescription returns one of the following values:

Value Image Type

Gupta:BMP Device-Independent Bitmap

Gupta:GIF Graphics Interchange Format

Gupta:ICO Icon File

Gupta:PCX Paintbrush

Gupta:TIFF Tag Image File Format

Gupta:WMF Windows MetaFile

For a file, SalPicGetDescription returns 'Gupta:DOSFILE'.

Centura Builder Function Reference 2-119


Chapter 2

For an OLE object, SalPicGetDescription returns the description of the object


class that the server application recorded in the Windows registration
database, followed by the word "Object". For example:

Package Object Paintbrush


Picture Object Sound Object

nMaxLength Number. The maximum length of the text to retrieve.

Return Value nLength is the length (in bytes) of strDesc.

See Also SalPicGetSting

Example Set nLength = SalPicGetDescription ( hWndPict, strDesc,


nMaxLen )

SalPicGetString
Syntax nLength = SalPicGetString ( hWndPict, nFormat, strPict )

Description Copies the contents of a picture to a string.

Parameters hWndPict Window handle. The handle (or name) of a picture.

nFormat Number. The format of the picture contents:

PIC_FormatBitmap
PIC_FormatIcon
PIC_FormatObject

strPict Receive String. The contents of hWndPict.

Return Value nLength is the length (in bytes) of strPict. If the format is not available, nLength is
equal to zero (0).

See Also SalPicGetDescription

Example Set nLength = SalPicGetString ( hWndPict, nFormat, strPict )

SalPicSet
Syntax bOk = SalPicSet ( hWndPic, tResource, nFormat )

Description Inserts a resource into a picture.

Parameters hWndPic Window Handle. The handle (or name) of a picture.

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

2-120 Centura Builder Function Reference


nFormat Number. The resource type. If you specify zero, Centura determines the
resource type. Otherwise, specify one of these values: PIC_FormatBitmap
PIC_FormatIcon

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

See Also SalPicClear


SalPicSetFile
SalPicSetFit
SalPicSetString

Example Set bOk = SalPicSet ( hWndPic, tResource, nFormat )

SalPicSetFile
Syntax bOk = SalPicSetFile ( hWndPict, strFileName )

Description Inserts a file's contents into a picture.

Parameters hWndPict Window Handle. The handle (or name) of a picture.

strFileName String. The name of the file whose contents are to be inserted into hWndPict.

Centura derives a picture's file type from the file extension. The file extension of
a bitmap must be .BMP; the file extension of an icon must be .ICO.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

See Also SalPicClear


SalPicSet
SalPicSetFit
SalPicSetString

Example Set bOk = SalPicSetFile ( hWndPict, strFileName )

SalPicSetFit
Syntax bOk = SalPicSetFit ( hWndPict, nFit, nScaleWidth, nScaleHeight )

Description Sets the fit for a picture.

Parameters hWndPict Window Handle. The handle (or name) of a picture.

Centura Builder Function Reference 2-121


Chapter 2

nFit Number. The type of fit:

PIC_FitBestFit PIC_FitScale

PIC_FitSizeToFit

nScaleWidth Number. The width scaling percentage if nFit is PIC_FitScale.

nScaleHeight Number. The height scaling percentage if nFit is PIC_FitScale.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

See Also SalPicClear


SalPicSet
SalPicSetFile
SalPicSetString

Example Call SalPicSetFit ( hWndItem, PIC_FitBestFit, 0, 0 )

SalPicSetString
Syntax bOk = SalPicSetString ( hWnd, nFormat, strPicture )

Description Inserts the contents of a string into a picture.

Parameters hWnd Window Handle. The handle (or name) of a picture.

nFormat Number. The format of the picture contents:

PIC_FormatBitmap PIC_FormatIcon PIC_FormatObject

strPicture String. A memory image of a picture file. You can use SalFileRead to read
a bitmap file into a string. You can also SELECT a long varchar database
column that contains a bitmap or icon file into a string.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

See Also SalPicClear


SalPicSet
SalPicSetFile
SalPicSetFit

Example Call SalPicSetString ( hWndPicture, PIC_FormatBitmap,


strPicture )

2-122 Centura Builder Function Reference


SalPixelsToFormUnits
Syntax nFormUnits = SalPixelsToFormUnits ( hWnd, nNumPixels, bVertical )

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

Parameters hWnd Window Handle. The handle (or name) of a window whose form units you
want to compute.

nNumPixels Number. The number of pixels.

bVertical Boolean. If the pixels are on the X axis, set this parameter to FALSE. If the
pixels are on the Y axis, set this parameter to TRUE.

Return Value nFormUnits is the number of form units returned if the function call is successful.
nFormUnits is equal to zero (0) if hWnd is invalid.

See Also SalFormUnitsToPixels

Example Set nFormUnits = SalPixelsToFormUnits ( pbExample,


nPixels, FALSE )

SalPostMsg
Syntax bOk = SalPostMsg ( hWndReceiver, nMsg, nMywParam, nMylParam )

Description Posts the specified message to a window by adding nMsg to hWndReceiver's message queue.

Parameters hWndReceiver Window Handle. The handle (or name) of the window receiving the
message.

nMsg Number. The message number.

nMywParam Number. The wParam for the message.

nMylParam Number. The lParam for the message.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

See Also SalSendMsg


SalSendMsgToChildren

Example Set bOk = SalPostMsg ( hWndReceiver, nMsg, nMywParam,


nMylParam )

Centura Builder Function Reference 2-123


Chapter 2

SalPrtExtractRect
Syntax bOk = SalPrtExtractRect ( nMylParam, nLeft, nTop, nRight, nBottom )

Description Extracts the currently printing rectangle from the SAM_Print message's lParam parameter.

Parameters nMylParam Number. The SAM_Print message's lParam parameter.

nLeft Receive Number. The position on the X axis of the rectangle's left side.

nTop Receive Number. The position on the Y axis of the top of the rectangle.

nRight Receive Number. The position on the X axis of the rectangle's right side.

nBottom Receive Number. The position on the Y axis of the bottom of the rectangle.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

Example On SAM_Print
Call SalPrtExtractRect ( nMylParam, nLeft, nTop, nRight,
nBottom )

SalPrtGetDefault
Syntax bOk = SalPrtGetDefault ( strDevice, strDriver, strPort )

Description Returns the default device (printer), the default driver, and the default port.

Parameters strDevice Receive String. The default device.

strDriver Receive String. The default driver.

strPort Receive String. The default port.

Return Value bOk is TRUE if the function call is successful in getting the default values, and
FALSE otherwise.

See Also SalPrtSetDefault


SalPrtSetup

Example Message Actions


Call SalPrtGetDefault ( strDevice, strDriver, strPort )

2-124 Centura Builder Function Reference


SalPrtGetParmNum
Syntax bOk = SalPrtGetParmNum ( nParm, nValue )

Description Gets 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 SalPrtSetParmNum, retrieved using SalPrtGetParmNum or
reinitialized using SalPrtSetParmDefaults.

Parameters nParm Number. The print parameter whose value you want; one of the PRT_*
constants.

nValue Receive Number. The print parameter's value. For boolean parameters,
nValue is TRUE or FALSE.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

See Also SalPrtSetParmNum

Example On SAM_Create
Call SalPrtGetParmNum ( PRT_nDraftMode, nPrtValue) If nPrtValue

Set rbDraftMode = TRUE Else

Set rbProofMode = TRUE

SalPrtPrintForm
Syntax bOk = SalPrtPrintForm ( hWndForm )

Description Prints a form window, table window, or dialog box, including its contents and row header flags. 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. Centura 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.

Parameters hWndForm Window Handle. The handle (or name) of the window to print.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

Example Call SalPrtPrintForm ( hWndForm )

Centura Builder Function Reference 2-125


Chapter 2

SalPrtSetDefault
Syntax bOk = SalPrtSetDefault ( strDevice, strDriver, strPort )

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

Parameters strDevice String. The default device.

strDriver String. The default driver.

strPort String. The default port.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

See Also SalPrtGetDefault


SalPrtSetup

Example Set strDevice = 'PostScript Printer' Set

strDriver = 'PSCRIPT' Set strPort = 'LPT2'

Call SalPrtSetDefault

( strDevice, strDriver, strPort )

SalPrtSetParmDefaults
Syntax bOk = SalPrtSetParmDefaults ( )

Description Resets print parameters back to their default values. The print parameters are a set of global variables which

are initialized to default values and can be set using SalPrtSetParmNum, retrieved using SalPrtGetParmNum

or reinitialized using SalPrtSetParmDefaults. Number of copies: 1 Print in draft mode: FALSE Print all pages:

TRUE Print from page: 1 Print to page: 1 Left margin: 0 Top margin: 0

Draw a rectangle around the printed form: FALSE

Parameters No parameters.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

2-126 Centura Builder Function Reference


Example On SAM_Click
Call SalPrtSetParmDefaults ()

SalPrtSetParmNum
Syntax bOk = SalPrtSetParmNum ( nParm, nValue )

Description 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 SalPrtSetParmNum, retrieved using SalPrtGetParmNum or
reinitialized using SalPrtSetParmDefaults.

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

nValue Number. The parameter value.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

See Also SalPrtGetParmNum

Example If rbDraftMode
Call SalPrtSetParmNum ( PRT_nDraftMode,
TRUE)

SalPrtSetup
Syntax bOk = SalPrtSetup ( strDevice, strDriver, strPort, bActiveOnly )

Description Displays the Printer Setup dialog box that lets the user alter the printer setup. Initially, the current default
printer is displayed and the user may change the printer. SalPrtSetup returns the user's selections in the
Receive Strings.

Parameters strDevice Receive String. The device (printer).

strDriver Receive String. The driver.

strPort Receive String. The port.

bActiveOnly Boolean. Whether to display active and/or inactive printers: if TRUE, all
printers display and if FALSE, only active printers display.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

Example Message Actions


Call SalPrtSetup ( strDevice, strDriver, strPort, TRUE)

Centura Builder Function Reference 2-127


Chapter 2

SalQueryFieldEdit
Syntax bSet = SalQueryFieldEdit ( hWndField )

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

The field edit flag is set whenever the user changes the value of a data field, multiline text field, or table
window column. For a picture, the field edit flag is set whenever an OLE 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 hWndField.

Parameters hWndField Window Handle. The handle (or name) of a data field, multiline field,
combo box table window column, or picture.

Return Value bSet is TRUE if hWndField's field edit flag is set and FALSE otherwise.

See Also SalSendValidateMsg


SalSetFieldEdit

Example If SalQueryFieldEdit ( SalGetFocus () )


If SalSendValidateMsg ( ) = VALIDATE_Ok
! Process Save.

SalQuit
Syntax bOk = SalQuit ( )

Description Exits an application.

If you are in user mode, Centura returns you to design mode. If the application running from
SQLRUN.EXE, it exits.

Parameters No parameters.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

See Also SalAbort

Example On SAM_Click
Call SalQuit ()

2-128 Centura Builder Function Reference


SalReportClose
Syntax bOk = SalReportClose ( hWndReport )

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

Parameters hWndReport Window Handle. The handle (or name) of a report window.

Return Value bOk is TRUE if the function succeeds and FALSE if hWndReport is invalid.

Example If not SalReportClose ( hWndReport )


Call SalMessageBox ( 'Close Failed', 'SalReportClose',
MB_Ok )

SalReportCmd
Syntax bOk = SalReportCmd ( hWndReport, nCommand )

Description Sends a command to an open report window. Use SalReportCmd to control a window that displays a report.

When you call SalReportView, its second parameter contains the handle of the window in which the report
displays. The application creates that window. Use SalReportCmd to send commands that control the
window to ReportWindows. If SalReportView's second parameter is null, ReportWindows creates its own
window in which to display the report, and you cannot use SalReportCmd.

Parameters hWndReport Window Handle. The window handle (or name) of a report window.

nCommand Number. The command to send to the report. Possible values include any of
the RPT_Cmd* commands.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

Example Set bOk = SalReportCmd ( hWndReport, nCommand )

SalReportCreate
Syntax bOk = SalReportCreate ( strTemplate, strVariables, strInputs, bDefaultReport, nError )

Description Creates a report template.

Parameters strTemplate String. The name of the report template to create.

Centura Builder Function Reference 2-129


Chapter 2

strVariables String. A comma-separated list of Centura variables that contain data to


fetch. The data types of these variables must match the data types of the
input names in strInputs.

strInputs String. A comma-separated list of the report's input names.

bDefaultReport Boolean. If TRUE, Centura generates a quick report and nError is a


RPT_Err* value. If FALSE, Centura generates an empty report.

nError Receive Number. If an error occurs, this parameter is equal to one of the
RPT_Err* values.

If you call SalReportCreate ten times in a row, you will receive the following
error code: RPT_ErrMaxRps. In run mode at designtime, Centura always
displays a dialog box with an explanation if an error happens. For *.RUN and

* . EXE applications, Centura only displays an error dialog box if you set this
parameter to 1 before calling SalReportCreate.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails. If bOk is FALSE, nError
is a RPT_Err* value.

Example Call SalReportCreate ( 'quick.qrp',':nDiv,:nDept,:nSection,


:nEmplNum )

SalReportDlgOptions
Syntax bOk = SalReportDlgOptions ( hWndReport, strCaption, strLine1, strLine2, strDocName )

Description Sets the options for the report printing dialog box. Call this function after creating the report but before
printing begins. For example, you can call SalReportDlgOptions while processing the
SAM_ReportFetchInit message.

Parameters hWndReport Window Handle. The wParam of a SAM_Report* message that contains
the window handle.

strCaption String. The replacement text for the Print dialog box caption text.

strLine1 String. The replacement text for the first centered-text field.

strLine2 String. The replacement text for the second centered-text field.

strDocName String. The name of the document that Print Manager displays when the output
is spooled and waiting to print.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

2-130 Centura Builder Function Reference


Example Call SalReportDlgOptions ( SalNumberToWindowHandle
(wParam ), 'Sales Report', 'This is a long report', 'Hit
CANCEL to quit', 'sales.rpt' )

SalReportGetDateTimeVar
Syntax bOk = SalReportGetDateTimeVar ( hWndReport, strVariable, dtValue )

Description Returns the value of a date/time report variable.

Parameters hWndReport Window Handle. The handle (or name) of a report window.

strVariable String. The name of a date/time report variable.

dtValue Receive Date/Time. The value of strVariable.

Return Value bOk is TRUE if the function is successful, and FALSE otherwise.

See Also SalReportGetNumberVar


SalReportGetObjectVar
SalReportGetStringVar
SalReportSetDateTimeVar

Example Call SalReportGetDateTimeVar ( hWndReport,


strVariable, dtGet )

SalReportGetNumberVar
Syntax bOk = SalReportGetNumberVar ( hWndReport, strVariable, nValue )

Description Returns the value of a number report variable.

Parameters hWndReport Window Handle. The handle (or name) of a report window.

strVariable String. The name of a number report variable.

nValue Receive Number. The value of strVariable.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

See Also SalReportGetDateTimeVar


SalReportGetObjectVar
SalReportGetStringVar
SalReportSetNumberVar

Example Call bOk = SalReportGetNumberVar ( hWndToMove, nXOffset,


nYOffset )

Centura Builder Function Reference 2-131


Chapter 2

SalReportGetObjectVar
Syntax bOk = SalReportGetObjectVar ( hWndReport, strVariable, strValue )

Description Returns the value of an object report variable.

Parameters hWndReport Window Handle. The handle (or name) of a report window.

strVariable String. The name of an object report variable.

strValue Receive String. The value of strVariable.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

See Also SalReportGetDateTimeVar


SalReportGetNumberVar
SalReportGetStringVar
SalReportSetObjectVar

Example Set bOk = SalReportGetObjectVar ( hWndReport, strVariable,


strValue )

SalReportGetStringVar
Syntax bOk = SalReportGetStringVar ( hWndReport, strVariable, strValue )

Description Returns the value of a string report variable.

Parameters hWndReport Window Handle. The handle (or name) of a report window.

strVariable String. The name of a string report variable.

strValue Receive String. The value of strVariable.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

See Also
SalReportGetDateTimeVar
SalReportGetNumberVar
SalReportGetObjectVar
SalReportSetStringVar

Example Call SalReportGetStringVar ( hWndReport, 'strVariable',


strGet )

2-132 Centura Builder Function Reference


SalReportPrint
Syntax hWndRet = SalReportPrint ( hWndFrm, strTemplate, strVariables, strInputs, nCopies, nOptions,
nFirstPage, nLastPage, nErr )

Description Prints a report. This function is synchronous and does not return until the report has been formatted and
sent to Windows or Windows Print Manager for printing. SalReportPrint creates a minimized
ReportWindows window. A print status dialog box displays while printing. When this function completes,
ReportWindows automatically ends.

Note: This function establishes a dialog between ReportWindows and the application; the real work of reporting is in
processing the SAM_Report* messages which ReportWindows sends.

Centura sends data from an application to ReportWindows when the application returns TRUE in
SAM_ReportFetchNext processing. ReportWindows continues to send SAM_ReportFetchNext
messages until the application returns FALSE.

Parameters hWndFrm Window Handle. The handle (or name) of the application window that
processes SAM_Report* messages.

strTemplate String. The report template name.

strVariables String. A comma-separated list of Centura variables from which to fetch


data. The data types of these variables must match the data types of the
input names in strInputs.

strInputs String. A comma-separated list of the report's input names. The contents of
this string are case-sensitive and must match the case of the input names
declared in the report template.

nCopies Number. The number of copies. If you specify a zero or a negative


number, Centura prints one copy.

nOptions Number. You can combine two or more of these constants with the OR (|)
operator:

RPT_PrintAll
RPT_PrintDraft
RPT_PrintNoAbort
RPT_PrintNoErrors
RPT_PrintNoWarn
RPT_PrintRange

Centura Builder Function Reference 2-133


Chapter 2

nFirstPage Number. The first page of the report (if nOptions includes
RPT_PrintRange).

nLastPage Number. The last page of the report (if nOptions includes
RPT_PrintRange).

nErr Receive Number. If this function succeeds, this parameter is zero. If an error
occurs, this parameter is one of the RPT_Err* values.

Note: If you call SalReportPrint ten times in a row, you will receive the following error code: RPT_ErrMaxRps.

In run mode at designtime, Centura always displays a dialog box with an


explanation if an error happens. For *.RUN and
* . EXE applications, Centura only displays an error dialog box if you set this
parameter to 1 before calling SalReportPrint.

Return Value The return value is reserved for future use and can be ignored. To detect if the
function succeeded, check nErr which is a RPT_Err* value. If successful, nErr is zero.

If you want to interact with the report window, interrogate wParam at SAM_ReportStart
and save that into the hWndReport variable.

See Also SalReportPrintToFile

Example Call SalReportPrint ( frmMain, strReportFile,


strReportBinds, strReportInputs, nCopies, nOptions, nFirstPage,
nLastPage, nErr )

SalReportPrintToFile
Syntax hWndRet = SalReportPrintToFile ( hWndFrm, strTemplate, strDestFile, strVariables, strInputs, nCopies,
nOptions, nFirstPage, nLastPage, bFormat, nErr )

Description Prints a report to a file in RTF format or in ASCII text format.

This function is synchronous and does not return until the output report file is closed.

Parameters hWndFrm Window Handle. The handle (or name) of the application window that
processes the SAM_Report* messages.

strTemplate String. The report template name.

strDestFile String. The destination file name.

2-134 Centura Builder Function Reference


strVariables String. A comma-separated list of Centura variables from which to fetch
data. The data types of these variables must match the data types of the
input names in strInputs.

strInputs String. A comma-separated list of the report's input names. The contents of
this string are case-sensitive and must match the case of the input names
declared in the report template.

nCopies Number. The number of copies.

nOptions Number. You can combine two or more of these constants with the OR (|)
operator: RPT_PrintAll RPT_PrintDraft RPT_PrintNoAbort RPT_PrintNoErrors
RPT_PrintNoWarn RPT_PrintRange

nFirstPage Number. The first page of the report (if nOptions includes
RPT_PrintRange).

nLastPage Number. The last page of the report (if nOptions includes
RPT_PrintRange).

bFormat Boolean. Specify TRUE to write the report in RTF format;


specify FALSE to write the report in ASCII format.

nErr Receive Number. If this function succeeds, this parameter is zero. If an error
occurs, this parameter is one of the RPT_Err* values.

If you call SalReportPrintToFile ten times in a row, you will receive the
following error code: RPT_ErrMaxRps. In run mode at designtime, Centura
always displays a dialog box with an explanation if an error happens. For
*.RUN and
* . EXE applications, Centura only displays an error dialog box if you set this
parameter to 1 before calling SalReportPrintToFile.

Return Value The return value is reserved for future use and can be ignored. To detect if the
function succeeded, check nErr which is a RPT_Err* value. If successful, nErr is zero.

See Also SalReportPrint

Centura Builder Function Reference 2-135


Chapter 2

Example Set hWndRet = SalReportPrintToFile ( hWndFrm, strTemplate,


strDestFile, strVariables, strInputs, nCopies, nOptions, nFirstPage,
nLastPage, bFormat, nErr )

SalReportReset
Syntax bOk = SalReportReset ( hWndReport )

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

Parameters hWndReport Window Handle. The handle (or name) of the report window.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

Example If NOT SalReportReset ( hWndReport )


Call SalMessageBox ( 'Reset Failed', 'SalReportReset',
MB_Ok )

SalReportSetDateTimeVar
Syntax bOk = SalReportSetDateTimeVar ( hWndReport, strVariable, dtValue )

Description Sets the value of a date/time report variable.

Parameters hWndReport Window Handle. The handle (or name) of a report window.

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

dtValue Date/Time. The value of strVariable.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

See Also SalReportGetDateTimeVar


SalReportSetNumberVar
SalReportSetObjectVar
SalReportSetStringVar

Example If NOT SalReportSetDateTimeVar ( hWndReport,


'dtVariable', dtGDateTime[1] ) Call SalMessageBox (
'SetDateTimeError',
'RPT_BeforePageHeader-d', MB_Ok )

2-136 Centura Builder Function Reference


SalReportSetNumberVar
Syntax bOk = SalReportSetNumberVar ( hWndReport, strVariable, nValue )

Description Sets the value of a numeric report variable.

Parameters hWndReport Window Handle. The handle (or name) of a report window.

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

nValue Number. The value of strVariable.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

Related Function

SalReportGetNumberVar
SalReportSetDateTimeVar
SalReportSetObjectVar
SalReportSetStringVar

Example Call SalReportSetNumberVar ( hWndReport, 'strUnknown',


nVariable )

SalReportSetObjectVar
Syntax bOk = SalReportSetObjectVar ( hWndReport, strVariable, strValue )

Description Sets the value of an object report variable.

Parameters hWndReport Window Handle. The window of the report window handle.

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

strValue String. The value of strVariable.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

See Also SalReportGetObjectVar


SalReportSetDateTimeVar
SalReportSetNumberVar
SalReportSetStringVar

Example Set bOk = SalReportSetObjectVar ( hWndReport, strVariable,


strValue )

Centura Builder Function Reference 2-137


Chapter 2

SalReportSetStringVar
Syntax bOk = SalReportSetStringVar ( hWndReport, strVariable, strValue )

Description Sets the value of a string report variable.

Parameters hWndReport Window Handle. The handle (or name) of a report window.

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

strValue String. The value of strVariable.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

See Also SalReportGetStringVar


SalReportSetDateTimeVar
SalReportSetNumberVar
SalReportSetObjectVar

Example Call SalReportSetStringVar ( hWndReport, 'strUnknown',


strVariable )

SalReportTableCreate
Syntax bOk = SalReportTableCreate ( strReport, hWndTbl, nError )

Description Creates a report template from the specified table window. The table window column names are the input
names to the report and their titles are the column names on the report. For a top-level table window, the
report's title is the same as the table window's title; for a child table window, the report does not have a title.

Parameters strReport String. The name of the report.

hWndTbl Window Handle. The handle (or name) of a table window.

nError Receive Number. If an error occurs, this parameter is equal to one of the
RPT_Err* values.

Note: If you call SalReportTableCreate ten times in a row, you will receive the
following error code: RPT_ErrMaxRps. In run mode at designtime, Centura
always displays a dialog box with an explanation if an error happens. For
*.RUN and
* . EXE applications, Centura only displays an error dialog box if you set this
parameter to 1 before calling SalReportTableCreate.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

2-138 Centura Builder Function Reference


See Also SalReportTablePrint
SalReportTableView

Example Set bOk = SalReportTableCreate ( strReport, hWndTbl, nError )

SalReportTablePrint
Syntax hWnd = SalReportTablePrint ( hWndTbl, strReport, nParamArray, nError )

Description Prints a report created from the specified table window.

Parameters hWndTbl Window Handle. The handle (or name) of a table window.

strReport String. The name of the report.

nParamArray Number. An array you create containing information about the print job. The
array indexes are: RPT_PrintParamCopies RPT_PrintParamFirstPage
RPT_PrintParamLastPage RPT_PrintParamOptions

nError Receive Number. If an error occurs, this parameter is equal to one of the
RPT_Err* values.

If you call SalReportTablePrint ten times in a row, you will receive the
following error code: RPT_ErrMaxRps. In run mode at designtime, Centura
always displays a dialog box with an explanation if an error happens. For
*.RUN and
* . EXE applications, Centura only displays an error dialog box if you set this
parameter to 1 before calling SalReportTablePrint.

Return Value hWnd is the handle of the report window if the function succeeds.

See Also SalReportTableCreate


SalReportTableView

Example Set hWndReport = SalReportTablePrint ( hWndTbl, 'test.qrp',


nParamArray,nError )

Centura Builder Function Reference 2-139


Chapter 2

SalReportTableView
Syntax hWnd = SalReportTableView ( hWndTbl, hWndDisplay, strReport, nError )

Description Displays, in preview mode, a report created from the specified table window.

Parameters hWndTbl Window Handle. The handle (or name) of a table window.

hWndDisplay Window Handle. The handle (or name) of a report display window. If null,
Centura creates a window in which you can preview the report.

strReport String. The name of the report.

nError Receive Number. If an error occurs, this parameter is equal to one of the
RPT_Err* constants.

If you call SalReportTableView ten times in a row, you will receive the
following error code: RPT_ErrMaxRps. In run mode at designtime, Centura
always displays a dialog box with an explanation if an error happens. For
*.RUN and
* . EXE applications, Centura only displays an error dialog box if you set this
parameter to 1 before calling SalReportTableView.

Return Value hWnd is the handle of the report window if the function succeeds.

See Also SalReportTableCreate


SalReportTablePrint

Example Set hWnd = SalReportTableView ( hWndTbl, hWndDisplay,


strReport, nError )

SalReportView
Syntax hWndReport = SalReportView ( hWndFrm, hWndRptTemp, strTemplate, strVariables,
strInputs, nFlags )

Description Displays a report in preview mode. Report processing is asynchronous; SalReportView


returns after starting the report process.

Note: This function establishes a dialog between ReportWindows and the application; the real work of reporting is
done in trapping and handling the SAM_Report messages which ReportWindows sends.

If you are reporting on application variables, an array, or a file, your data is transmitted to the report
only if you return TRUE from the SAM_ReportFetchNext

2-140 Centura Builder Function Reference


message. ReportWindows does not receive any data until it issues the SAM_ReportFetchNext message
and the Centura application returns TRUE to that message. ReportWindows keeps sending
SAM_ReportFetchNext messages until Centura returns FALSE.

Parameters hWndFrm Window Handle. The handle (or name) of the application window that
processes SAM_Report* messages.

hWndRptTemp Window Handle. An optional window handle (or name) to a custom report
template. If null, ReportWindows creates its own window in which it displays
the report.

strTemplate String. The report template name.

strVariables String. A comma-separated list of Centura variables from which to fetch


data. The data types of these variables must match the data types of the
input names in strInputs. The contents of this string must match the order of
the input names declared in the report template.

strInputs String. A comma-separated list of the report's input names. The contents of
this string are case-sensitive and must match the case of the input names
declared in the report template.

nFlags Receive Number. Before you call this function, you can set this parameter to
one of the constants below to turn off the printer icon on the default report view
tool bar or turn off the tool bar completely:

RPT_NoPrint No print button on the tool bar.

RPT_NoToolBar No tool bar in the preview window.

If an error occurs, this parameter is one of the RPT_Err* constants.

If you call SalReportView ten times in a row, you will receive the following
error code: RPT_ErrMaxRps. In run mode at designtime, Centura always
displays a dialog box with an explanation if an error happens. For *.RUN and

* . EXE applications, Centura only displays an error dialog box if you set this
parameter to 1 before calling SalReportView.

Return Value hWndReport is the handle of the report window if the function succeeds. Centura
returns the window handle before ReportWindows displays the report.

Centura Builder Function Reference 2-141


Chapter 2

Example Set hWndReport = SalReportView ( frmMain, hWndNULL,


strReportFile, strReportBinds, strReportInputs, nError )

SalScrollGetPos
Syntax bOk = SalScrollGetPos ( hWndsb, nPos )

Description Returns the current scroll bar value.

Parameters hWndsb Window Handle. The handle (or name) of a vertical or horizontal
scroll bar.

nPos Receive Number. The scroll bar value.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

See Also SalScrollSetPos

Example Set bOk = SalScrollGetPos ( hWndsb, nPos )

SalScrollGetRange
Syntax bOk = SalScrollGetRange ( hWndsb, nMin, nMax, nLine, nPage )

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

Parameters hWndsb Window Handle. The handle (or name) of a vertical or horizontal
scroll bar.

nMin Receive Number. The minimum scroll bar position.

nMax Receive Number. The maximum scroll bar position.

nLine Receive Number. The line increment. The number of units the scroll bar
increments or decrements when the user clicks the scroll bar arrow.

nPage Receive Number. The page increment. The number of units the scroll bar
increments or decrements when the user clicks either side of the scroll bar's
scroll box.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

See Also SalScrollSetRange

Example Call SalScrollGetRange ( hWndsbCounter, nMin, nMax, nLine,


nPage )

2-142 Centura Builder Function Reference


SalScrollSetPos
Syntax bOk = SalScrollSetPos ( hWndsb, nPos )

Description Sets a scroll bar's position. This function is equivalent to using a Set statement to assign a value to the
scroll bar.

Parameters hWndsb Window Handle. The handle (or name) of a vertical or horizontal
scroll bar.

nPos Number. The scroll bar position. If this value is outside the scroll bar's range,
Centura sets the scroll bar position to the scroll range minimum or the scroll
range maximum, depending on whether nPos is below or above the range.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

See Also SalScrollGetPos

Example Call SalScrollSetPos ( hWndsbCounter, 0 )

SalScrollSetRange
Syntax bOk = SalScrollSetRange ( hWndsb, nMin, nMax, nLine, nPage )

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

bar is created, Centura assigns it these values:

Minimum scroll position0 Maximum


scroll position100 Line Increment1
Page Increment10

If the scroll bar's current position is outside the new range, its position changes to one within the new range.
The range of a scroll bar is -32,767 to 32,767.

Parameters hWndsb Window Handle. The handle (or name) of a vertical or horizontal
scroll bar.

nMin Number. The minimum position of the scroll bar.

nMax Number. The maximum position of the scroll bar.

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

nPage Number. The number of units to increment or decrement the scroll bar when
the user clicks either side of the scroll box.

Centura Builder Function Reference 2-143


Chapter 2

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

See Also SalScrollGetRange

Example Call SalScrollSetRange ( hWndsbCounter, 0, 50, 1, 5 )

SalSendClassMessage
Syntax nMsgReturn = SalSendClassMessage ( nMessage, nMywParam, nMylParam )

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

Parameters nMessage Number. The message number.

nMywParm Number. The wParam.

nMylParam Number. The lParam.

Return Value nMsgReturn is the message return value. If the message has no return, nMsgReturn is
zero (0).

See Also SalSendClassMessageNamed

Example Set nMsgReturn = SalSendClassMessage ( nMessage, nMywParam,


nMylParam )

SalSendClassMessageNamed
Syntax nMsgReturn = SalSendClassMessageNamed ( tClassName, nMsg, nMywParam,
nMylParam )

Description 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. Use this function instead of
SalSendClassMessage with a class that is the result of multiple inheritance. It lets you specify which base
class message action you want to execute.

tClassName must be a direct base class of the class from which this call is made.

Parameters tClassName Template. The ancestor's class name.

nMsg Number. The message number.

nMywParam Number. The wParam.

nMylParam Number. The lParam.

Return Value nMsgReturn is the message return value. If the message has no return, nMsgReturn is
zero (0).

2-144 Centura Builder Function Reference


See Also SalSendClassMessage

Example Set nMsgReturn = SalSendClassMessageNamed ( tClassName, nMsg,


nMywParam, nMylParam )

SalSendMsg
Syntax nMsgReturn = SalSendMsg ( hWnd, nMsg, nMywParam, nMylParam )

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

Parameters hWnd Window Handle. The window receiving the message.

nMsg Number. The message number.

nMywParam Number. The wParam.

nMylParam Number. The lParam.

Return Value nMsgReturn is the message return value. If the message has no return, nMsgReturn is
zero (0).

See Also SalPostMsg


SalSendMsgToChildren
SalSendValidateMsg

Example Set nMsgReturn = SalSendMsg ( hWnd, nMsg, nMywParam, nMylParam )

SalSendMsgToChildren
Syntax bSent = SalSendMsgToChildren ( hWnd, nMsg, nMywParam, nMylParam )

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

Parameters hWnd Window Handle. The handle (or name) of a form window, dialog box,
table window, or MDI window.

nMsg Number. The message number.

nMywParam Number. The wParam for the message.

nMylParam Number. The lParam for the message.

Return Value bSent is TRUE if the function succeeds and FALSE if it fails.

See Also SalPostMsg SalSendMsg


SalSendValidateMsg

Centura Builder Function Reference 2-145


Chapter 2

Example Call SalSendMsgToChildren ( hWndForm,CHM_DISABLE, 0, 0 )

SalSendValidateMsg
Syntax nStatus = SalSendValidateMsg ( )

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

Call this function to force field validation before processing a menu pick. Centura does not
automatically send SAM_Validate message on a menu pick.

Parameters Np parameters.

Return Value nStatus is returned by the object's message actions for the SAM_Validate message:

VALIDATE_Cancel
VALIDATE_Ok
VALIDATE_OkClearFlag

See Also SalSendMsg


SalSendMsgToChildren

Example Set nStatus = SalSendValidateMsg ()

SalSetDefButton
Syntax bOk = SalSetDefButton ( hWndButton )

Description Sets the default push button of a form window or dialog box. 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 SalSetDefButton.

Parameters hWndButton Window Handle. The handle (or name) of the default push button.

Return Value bOk is TRUE if the function succeeds and FALSE if hWndButton is not a valid
button.

See Also SalGetDefButton

Example Call SalSetDefButton ( frmMain.pb2 )

2-146 Centura Builder Function Reference


SalSetFieldEdit
Syntax bOk = SalSetFieldEdit ( hWndField, bSet )

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

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 an OLE 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.

Parameters hWndField Window Handle. The handle (or name) of a data field, multiline text
field, table window column, or picture.

bSet Boolean. TRUE sets the flag; FALSE clears it.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

See Also SalQueryFieldEdit

Example Call SalSetFieldEdit ( hWndChild, FALSE )

SalSetFocus
Syntax hWndFocus = SalSetFocus ( hWndToSet )

Description Sets the focus to a specified window.

Warning: You cannot call SalSetFocus in SAM_KillFocus processing because of a Windows limitation.

Parameters hWndToSet Window Handle. The handle (or name) of the window to receive the
focus.

Return Value hWndFocus is the handle of the window that previously had the focus.

See Also SalGetFocus

Example Call SalSetFocus ( hWndSave )

Centura Builder Function Reference 2-147


Chapter 2

SalSetMaxDataLength
Syntax bOk = SalSetMaxDataLength ( hWndField, nLength )

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

Parameters hWndField Window Handle. The handle (or name) of a data field, multiline text
field, or table window column.

nLength Number. The character limit.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

See Also SalGetMaxDataLength

Example Set bOk = SalSetMaxDataLength ( hWndField, nLength )

SalSetProfileString
Syntax bOk = SalSetProfileString ( strSection, strEntry, strValue, strFileName )

Description Set the value of an entry in the specified section of an initialization file or registry. All profile information is
stored as string, so if you want to store an integer it must be converted to a string first. Then it can be
retrieved as an integer using the SalGetProfileInt-Function .

Parameters strSection String. The section heading.

strEntry String. The entry whose associated value is being set.

strValue String. The value of strEntry.

strFileName String. The name of the initialization file or company name depending on the
settings made using the SalUseRegistry function. If you are searching for an
INI file and do not specify the full path, Centura searches for the file in the
Windows subdirectory.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

See Also SalGetProfileInt


SalGetProfileString
SalUseRegistry

Example Set bOk = SalSetProfileString ( strSection, strEntry, strValue,


strFileName )

2-148 Centura Builder Function Reference


SalSetWindowLabelText
Syntax bOk = SalSetWindowLabelText ( hWnd, sText )

Description Sets the background text of a window. To be associated with a specific window, background text
must immeditately precede the window in the Outliner.

Important: The background text does not require a mnemonic for the function to operate.

Parameters hWnd Window Handle. The handle (or name) of a window.

sText String. The window text.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

Example Set bOk = SalSetWindowLabelText ( hWnd, sText )

SalSetWindowLoc
Syntax bOk = SalSetWindowLoc ( hWnd, nX, nY )

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

Parameters hWnd Window Handle. The handle (or name) of the window to move.

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

nY Number. The position on the Y axis (expressed in form units).

Return Value bOk is TRUE if the function succeeds and FALSE if hWnd is not a valid window
handle.

See Also SalGetWindowLoc

Example Call SalSetWindowLoc ( pbExample, 0, 0 )

SalSetWindowSize
Syntax bOk = SalSetWindowSize ( hWnd, nWidth, nHeight )

Description Resizes a window.

Parameters hWnd Window Handle. The handle (or name) of the window to resize.

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

Centura Builder Function Reference 2-149


Chapter 2

nHeight Number. The new height of the window (expressed in form units).

Return Value bOk is TRUE if the window is successfully resized, and FALSE if hWnd is an invalid
window handle.

See Also SalGetWindowSize

Example Call SalSetWindowSize ( pbExample, nWidth+1, nHeight+1)

SalSetWindowText
Syntax bOk = SalSetWindowText ( hWnd, strTitle )

Description Sets the text of a window to a specified string.

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, Centura tries to set the list selection to the item that matches the specified string. This latter
statement is true for list boxes as well. The SalSetWindowText function clears the field edit flag.

Parameters hWnd Window Handle. The handle (or name) of a window.

strTitle String. The window text.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

See Also SalGetWindowText


SalTblSetColumnTitle

Example Call SalSetWindowText ( hWndForm, 'First National Bank' )

SalShowWindow
Syntax bOk = SalShowWindow ( hWndToShow )

Description Makes a window visible.

Parameters hWndToShoWindow Handle. The handle (or name) of a window to make visible.

Return Value bOk is 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

2-150 Centura Builder Function Reference


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.

See Also SalHideWindow

Example Call SalShowWindow ( hWndForm )

SalShowWindowAndLabel
Syntax bOk = SalShowWindowAndLabel ( hWndToShow )

Description Makes a window and its associated label visible.

A label is the background text that immediately precedes the window in the outline.

Parameters hWndToShow The handle (or name) of a window to make visible.

Return Value bOk is 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.

See Also SalHideWindowAndLabel


SalShowWindow

Example Set bOk = SalShowWindowAndLabel ( hWndToShow )

SalStatusGetText
Syntax nLength = SalStatusGetText ( hWnd, strText, nMaxLen )

Description Gets the text displayed in the status bar of a top-level or MDI window.

Parameters hWnd Window Handle. The handle (or name) of a top-level or MDI window.

strText Receive String. The text displayed in the status bar.

nMaxLen Number. The maximum length of the window text.

Return Value nLength is the length of strText. nLength is zero (0) if the window has no text.

See Also SalStatusSetText


SalStatusSetVisible

Example Set nLength = SalStatusGetText ( hWnd, strText, nMaxLen )

Centura Builder Function Reference 2-151


Chapter 2

SalStatusSetText
Syntax bOk = SalStatusSetText ( hWnd, strText )

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

Parameters hWnd Window Handle. The handle (or name) of a top-level or MDI window.

strText String. The text to display in the status bar.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

See Also SalStatusGetText


SalStatusSetVisible

Example Set bOk = SalStatusSetText ( hWnd, strText )

SalStatusSetVisible
Syntax bOk = SalStatusSetVisible ( hWnd, bShow )

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

Parameters hWnd Window Handle. The handle (or name) of a top-level or MDI window.

bShoBoolean. If TRUE, the status bar displays; if FALSE, the status bar hides.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

See Also SalStatusGetText


SalStatusSetText

Example Call SalStatusSetVisible ( hWndForm, TRUE )

SalStrCompress
Syntax bOk = SalStrCompress ( strString )

Description Compresses the specified string. Use this function to compress strings for storage on disk or in the
database. Use this function for long strings, or when storing images and so on.

Parameters strString Receive String. The string to compress.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

See Also SalStrUncompress

Example Set bOk = SalStrCompress ( strString )

2-152 Centura Builder Function Reference


SalStrFirstC
Syntax bOk = SalStrFirstC ( strString, nChar )

Description Extracts the first character of a string and returns its decimal value. You must use this function in place of
SalStrLop if the input string contains nonASCII (ANSI) or 16-bit characters. If the character returned is a
16-bit character, the leading byte of the character is in the high-order byte, and the trailing byte of the
character is in the low-order byte.

Use SalNumberHigh to get the leading byte and SalNumberLow to get the trailing byte.

Parameters strString Receive String. The string whose first character is lopped off.

nChar Receive Number. The first character of strString.

Return Value bOk is TRUE unless strString is empty or invalid.

See Also SalNumberHigh


SalNumberLow
SalNumberToChar
SalStrLop

Example On SAM_Click
Set dfString = 'ABC' Call SalStrFirstC

( dfString, dfNumChar )
! Now dfString = 'BC' and dfNumChar = 65

SalStrGetBufferLength
Syntax nLength = SalStrGetBufferLength ( strString )

Description Returns the current buffer length of a string.

Centura stores string variables in buffers. The length includes the string's null termination
character.

Parameters strString String. The string whose buffer length you want.

Return Value nLength is the length of strString's buffer.

See Also SalStrLength


SalStrSetBufferLength

Example Set nBufferLength = SalStrGetBufferLength


(strNumbers )

Centura Builder Function Reference 2-153


Chapter 2

SalStrIsValidCurrency
Syntax bOk = SalStrIsValidCurrency ( strMoney, nPrecision, nScale )

Description Verifies that an entire character string represents a valid currency value. Centura validates the string
based on the current settings for the keywords sDecimal ,
sThousands , sCurrency, iNegCurr, and iCurrency in the [INTL] section of WIN.INI.

Parameters strMoney String. A string that contains a currency value.

nPrecision Number. The number of digits to display.

nScale Number. The number of digits to the right of the decimal point.

Return Value bOk is TRUE if strMoney is a valid currency value and FALSE otherwise.

See Also SalStrIsValidDateTime


SalStrIsValidNumber

Example Set bOk1 = SalStrIsValidCurrency ( '$120.00' )

SalStrIsValidDateTime
Syntax bOk = SalStrIsValidDateTime ( strDateTime )

Description Verifies that an entire character string represents a valid date/time value. Centura validates the string
based on the current settings for the keywords sShortDate, sLongDate, s1159, s2359, and sTime in
the [INTL] section of WIN.INI.

Parameters strDateTime String. A string that contains a date/time value.

Return Value bOk is TRUE if strDateTime is a valid date/time value and FALSE otherwise.

See Also SalStrIsValidCurrency


SalStrIsValidNumber

Example Set bOk2 = SalStrIsValidDateTime ( '2/2/91' )

2-154 Centura Builder Function Reference


SalStrIsValidNumber
Syntax bOk = SalStrIsValidNumber ( strNumber )

Description Verifies that an entire character string represents a valid number value. Centura validates the string
based on the current settings for the keywords sDecimal and sThousands in the [INTL] section of
WIN.INI.

Parameters strNumber String. A string that contains a number value.

Return Value bOk is TRUE if strNumber is a valid number value and FALSE otherwise.

See Also SalStrIsValidCurrency


SalStrIsValidDateTime

Example Set bOk1 = SalStrIsValidNumber ( '120.00' )

SalStrLeft
Syntax nLength = SalStrLeft ( strSource, nExtract, strTarget )

Description Returns a substring of a specified length starting at position zero (0), the left-most character in the
string.

Parameters strSource String. The string from which to extract characters.

nExtract Number. The number of characters to extract from strSource.

strTarget Receive String. The substring.

You can specify the same string for both strSource and strTarget.

Return Value nLength is the length of the new string.

strTarget is the substring.

See Also SalStrMid


SalStrMidX
SalStrRight
SalStrLeftX

Examples Set nLength = SalStrLeft ( 'LEFT01234', 4, strTarget )

Centura Builder Function Reference 2-155


Chapter 2

SalStrLeftX
Syntax strTarget = SalStrLeftX ( strSource, nExtract)

Description Returns a substring of a specified length starting at position zero (0), the left-most character in the
string.

Parameters strSource String. The string from which to extract characters.

nExtract Number. The number of characters to extract from strSource.

strTarget Receive String. The substring.

You can specify the same string for both strSource and strTarget.

Return Value nLength is the length of the new string.

strTarget is the substring.

See Also SalStrMid


SalStrMidX
SalStrRight
SalStrLeft

Examples Set strTarget = SalStrLeftX ( 'LEFT01234', 4)

SalStrLength
Syntax nLength = SalStrLength ( strString )

Description Returns a string's length.

Strings are stored internally in Centura with a null termination character. The null terminator is not
included in the length.

Parameters strString String. The string whose length you want.

Return Value nLength is the length of strString.

See Also SalStrGetBufferLength

Example On SAM_Create
Set strNumbers = '1234567890' Set
nStringLength = SalStrLength ( strNumbers )

2-156 Centura Builder Function Reference


SalStrLop
Syntax nCharacter = SalStrLop ( strString )

Description Returns the ASCII numeric value of the first character of a string in decimal format. This function
removes the first character of the string.

Parameters strString Receive String. The input string without the first character.

Return Value nCharacter is the ASCII value of the first character of strString. When strString is
null, nCharacter is equal to zero (0).

See Also SalNumberToChar


SalStrFirstC

Example On SAM_Create
Set strString = 'ABC' Set
nCharacter = SalStrLop ( strString )

SalStrLower
Syntax nLength = SalStrLower ( strSource, strTarget )

or

strTarget = SalStrLowerX ( strSource )

Description Converts a string to lowercase.

Parameters strSource String. The string to convert .

strTarget Receive String. The lowercase string.

You can specify the same string for both strSource and strTarget.

Return Value nLength is the length of strTarget.

strTarget is the lowercase string.

See Also SalStrUpper


SalStrUpperX

Examples On SAM_Create
Set nLength = SalStrLower ( 'LOWERCASE', strTarget )
or
On SAM_Create
Set strTarget = SalStrLowerX ( 'LOWERCASE' )

Centura Builder Function Reference 2-157


Chapter 2

SalStrMid
Syntax nLength = SalStrMid ( strSource, nStartPos, nLength, strTarget )

or

strTarget = SalStrMidX ( strSource, nStartPos, nLength )

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

Parameters strSource String. The source string.

nStartPos Number. The starting position of the substring (zero is the first position) in
strSource.

nLength Number. The number of characters to put in the substring.

strTarget Receive String. The substring.

You can specify the same string for both strSource and strTarget.

Return Value nLength is the length of the substring.

strTarget is the substring.

See Also SalStrLeft


SalStrLeftX
SalStrRight

Examples Set nLength = SalStrMid (‘012ABC345’, 3, 3, strTarget) Or

Set strTarget = SalStrMidX ( '012ABC345', 3, 3 ) ! strTarget =


'ABC'

SalStrProper
Syntax nLength = SalStrProper ( strSource, strTarget )

or

strTarget = SalStrProperX ( strSource )

Description Converts a string to a proper name. In a proper name, the first letter of each word is uppercase; the
remaining letters are lowercase.

Parameters strSource String. The string to convert.

strTarget Receive String. The converted string.

You can specify the same string for both strSource and strTarget.

2-158 Centura Builder Function Reference


Return Value nLength is the length of strTarget.

strTarget is the converted string.

Examples Set nLength = SalStrProper ( 'JOHN L. SMITH',


strTarget ) or

Set strTarget = SalStrProperX ( 'JOHN L. SMITH')

SalStrRepeat and SalStrRepeatX


Syntax nLength = SalStrRepeat ( strSource, nTimes, strTarget )

or

strTarget = SalStrRepeatX ( strSource, nTimes )

Description Concatenates a string with itself a specified number of times.

Parameters strSource String. The source string.

nTimes Number. The number of times to concatenate strSource with itself.

strTarget Receive String. The new string.

You can specify the same string for both strSource and strTarget.

Return Value nLength is the length of strTarget.

strTarget is the new string.

Examples On SAM_Create
Set nLength = SalStrRepeat ( 'ABC*', 3, strTarget )

or

On SAM_Create
Set strTarget = SalStrRepeatX '( 'ABC*', 3)

SalStrReplace and SalStrReplaceX


Syntax nReturn = SalStrReplace ( strSource, nStartPos, nLength, strReplace, strTarget )

or

strTarget = SalStrReplaceX ( strSource, nStartPos, nLength, strReplace )

Description Replaces characters in one string with characters from another string.

Centura Builder Function Reference 2-159


Chapter 2

Parameters strSource String. The source string that contains characters to replace.

nStartPos Number. The position in strSource at which to begin replacing characters.

nLength Number. The number of characters to replace. If zero (0), strReplace


starts at nStartPos.

strReplace String. The replacement string.

strTarget Receive String. The new string.

Return Value nReturn is the length of strTarget.

strTarget is the new string.

Examples Set nReturn = SalStrReplace ( 'ABC1234', 3, 4, 'DEFG',


strTarget )

or

Set StrTarget = SalStrReplaceX ( 'ABC1234', 3, 4)

SalStrRight and SalStrRightX


Syntax nLength = SalStrRight ( strSource, nLength, strTarget )

or

strTarget = SalStrRightX ( strSource, nLength )

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

Parameters strSource String. The source string.

nLength Number. The number of characters to extract.

strTarget Receive String. The new string.

You can specify the same string for both strSource and strTarget.

Return Value nLength is the length of strTarget.

strTarget is the new string.

See Also SalStrLeft


SalStrLeftX
SalStrMid
SalStrMidX

2-160 Centura Builder Function Reference


Example On SAM_Create
Set nLength = SalStrRight ( '123RIGHT', 5, strTarget )

or

On SAM_Create
Set StrTarget = SalStrRightX ( '123RIGHT', 5 )

SalStrScan
Syntax nOffset = SalStrScan ( strString1, strString2 )

Description Searches for and 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.

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

strString2 String. The string to search for. Case is

disregarded in the search.

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: SalStrScan ( 'This is a \\', '\\\\' )

When searching for a percent character or an underscore character and


strString2 is a string literal, you need two backslashes:

SalStrScan ( 'This is a %', '\\%' )

SalStrScan ( 'This is an _', '\\_' )

Even if strString2 is not a string literal, you need a single backslash to search
for a percent character or an underscore.

Centura Builder Function Reference 2-161


Chapter 2

Return Value nOffset is a number that indicates the offset (0 origin) of strString2 in strString1. If
Centura does not find strString2 in strString1, SalStrScan returns a -1.

Example Set nOffset = SalStrScan ( ' 012AbC345', 'ABC' )

SalStrSetBufferLength
Syntax bOk = SalStrSetBufferLength ( strString, nLength )

Description Sets the buffer string length to the length plus 1 for the terminator and allocates memory. This is only
needed if you want to pass a Receive String to an external function.

Parameters strString Receive String. The string whose buffer length you want to set.

nLength Number. The length of strString.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

See Also SalSetMaxDataLength

SalStrGetBufferLength

Example Set bOk = SalStrSetBufferLength ( recvString, 10 ) ! 11 chars

SalStrToDate
Syntax dtDateTime = SalStrToDate ( strString )

Description 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 SalDateConstruct.

Parameters strString String. The string to convert.

Return Value dtDateTime is the date/time value converted from strString.

See Also SalDateToStr

Example Set dtDateTime = SalStrToDate ( strDateTime )

2-162 Centura Builder Function Reference


SalStrTokenize
Syntax nNumTokens = SalStrTokenize ( strSource, strStartDel, strEndDel, strTokenArray )

Description Parses a string into substrings (tokens) based on specified start and end delimiters. Centura uses delimiters
to recognize the beginning and end of each substring. Centura 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, Centura interprets it as a null substring. This is
useful for comma-separated data where ',' is an end delimiter. Centura recognizes that the records
'data1,data2,,data4' and ',data2,data3,data4' have four tokens each, one of which is null. Once Centura finds
the beginning of a substring, 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, Centura correctly
interprets them as elements of the substring.

Parameters strSource String. The string to parse.

strStartDel String. A string that contains the start delimiter characters. Pass an empty

string ('') to specify the lack of a start delimiter.

strEndDel String. A string that contains the end delimiter characters. Pass an empty

string ('') to specify the lack of an end delimiter.

strTokenArray String Array. The handle (or name) of an array of substrings created from
strSource.

Return Value nNumTokens is the number of substrings created. nNumTokens is zero (0) if no
substrings are created, or if an error occurs.

Example Set dfNumTokens = SalStrTokenize ( dfSource1, '', ',',


astrToken1 )

SalStrToNumber
Syntax nNumber = SalStrToNumber ( strString )

Description Converts a string to a number.

Parameters strString String. The string to convert.

Return Value nNumber is the number resulting from the conversion.

Centura Builder Function Reference 2-163


Chapter 2

See Also SalNumberToStr

Example Set nNumber = SalStrToNumber ( '100.22' )

SalStrTrim
Syntax nNewLength = SalStrTrim ( strSource, strTarget )

or

strTarget = SalStrTrimX ( strSource )

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

Parameters strSource String. The original string.

strTarget Receive String. The new string.

You can specify the same string for both strSource and strTarget.

Return Value nNewLength is the length of strTarget.

strTarget is the new string.

Example Set nLength = SalStrTrim ( ' 1 2 3 ', strTarget )

SalStrTrimX
Syntax strTarget = SalStrTrimX ( strSource)

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

Parameters strSource String. The original string.

strTarget Receive String. The new string.

You can specify the same string for both strSource and strTarget.

Return Value nNewLength is the length of strTarget.

strTarget is the new string.

Example On SAM_Create
Set nLength = SalStrTrim ( ' 1 2 3 ', strTarget )

2-164 Centura Builder Function Reference


SalStrUncompress
Syntax bOk = SalStrUncompress ( strString )

Description Decompresses the specified string. Use this function to decompress a string that you compressed with
SalStrCompress.

Parameters strString Receive String. The string to decompress.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

See Also SalStrCompress

Example Set bOk = SalStrUncompress ( strString )

SalStrUpper
Syntax nLength = SalStrUpper ( strSource, str Target )

Description Converts a string to uppercase.

Parameters strSource String. The string to convert.

strTarget Receive String. The uppercase string.

You can specify the same string for both strSource and strTarget.

Return Value nLength is the length of strTarget.

strTarget is the uppercase string.

See Also SalStrLower

Example Set nLength = SalStrUpper ( 'uppercase', strTarget )

SalStrUpperX
Syntax strTarget = SalStrUpperX ( strSource )

Description Converts a string to uppercase.

Parameters strSource String. The string to convert.

You can specify the same string for both strSource and strTarget.

Return Value This function returns the uppercase string in strTarget.

See Also SalStrLower

Example On SAM_Create
Set strTarget = SalStrUpperX ( ' uppercase' )

Centura Builder Function Reference 2-165


Chapter 2

SalTBarSetVisible
Syntax bOk = SalTBarSetVisible ( hWind, bShw)

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

Parameters hWnd Window Handle. The handle (or name) of a top-level or MDI window.

bShow Boolean. If TRUE, displays the tool bar; if FALSE, hides the tool bar.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

See Also SalStatusSetVisible

Example Set bOk = SalTBarSetVisible (hWind, bShw)

SalTblAnyRows
Syntax bAny = SalTblAnyRows ( hWndTbl, nFlagsOn, nFlagsOff )

Description Determines whether any rows in the specified table window match certain flags. If you set nFlagsOn to
zero (0) and nFlagsOff to zero (0), SalTblAnyRows returns TRUE if the table window contains any rows
at all, regardless of their flags.

Parameters hWndTbl Window Handle. The handle (or name) of a table window.

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

nFlagsOff Number. The flags that the row should not have. You can combine
ROW_* flags using the OR (|) operator.

Return Value bAny is TRUE if any of the table window's rows have any of the nFlagsOn flags and
none of the nFlagsOff flags.

See Also SalTblFindNextRow


SalTblFindPrevRow

Example Menu Settings


Enabled When: SalTblAnyRows ( tblTable,
ROW_Selected, 0 )

2-166 Centura Builder Function Reference


SalTblClearSelection
Syntax bOk = SalTblClearSelection ( hWndTbl )

Description Deselects all rows of a table window.

Parameters hWndTbl Window Handle. The handle (or name) of a table window.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

See Also SalTblSetRowFlags

Example Call SalTblClearSelection ( hWndForm )

SalTblColumnAverage
Syntax nAverage = SalTblColumnAverage ( hWndTbl, nColumnID, nFlagsOn, nFlagsOff )

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

Use Centura row flag constants to specify the rows to use in the computation. For example, you can
choose to average only the values of modified rows.

Parameters hWndTbl Window Handle. The handle (or name) of a table window.

nColumnID Number. The Column Identifier.

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

nFlagsOff Number. The flags that the row should not have. You can combine
ROW_* flags using the OR (|) operator:

Return Value nAverage is the average of all column values or only specified column values in a
table window. nAverage is equal to zero (0) if an error occurs.

See Also SalTblColumnSum

Example Set nAverage = SalTblColumnAverage ( hWndTbl, nColumnID,


nFlagsOn, nFlagsOff )

SalTblColumnSum
Syntax nSum = SalTblColumnSum ( hWndTbl, nColumnID, nFlagsOn, nFlagsOff )

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

Use Centura 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.

Centura Builder Function Reference 2-167


Chapter 2

Parameters hWndTbl Window Handle. The handle (or name) of a table window.

nColumnID Number. The Column Identifier

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

nFlagsOff Number. The flags that the row should not have. You can combine
ROW_* flags using the OR (|) operator.

Return Value nSum is the sum of all column values or only specified column values in a table
window. nSum is equal to zero (0) if an error occurs.

See Also SalTblColumnAverage

Example Set nSum = SalTblColumnSum ( hWndTbl, nColumnID, nFlagsOn,


nFlagsOff )

SalTblCopyRows
Syntax bOk = SalTblCopyRows ( hWndTbl, nFlagsOn, nFlagsOff )

Description Copies the contents of the specified table window rows to the Clipboard in text format. In the
Clipboard, columns are delimited by TAB characters and rows are delimited by end-of-line
characters.

Set nFlagsOn to zero (0) and nFlagsOff to zero (0) to copy the entire table. The copy stops, without
indicating a failure, after copying 64 Kbytes of text.

Parameters hWndTbl Window Handle. The handle (or name) of a table window.

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

nFlagsOff Number. The flags that the row should not have. You can combine
ROW_* flags using the OR (|) operator.

Return Value bOk is TRUE if any of the table window's 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.

See Also SalTblPasteRows

Example Call SalTblCopyRows ( tblTable, ROW_Selected, 0 )

2-168 Centura Builder Function Reference


Centura Builder Function Reference

SalTblCreateColumn
Syntax nColId = SalTblCreateColumn ( hWndTbl, nColumnPos, nDispWidth, nMaxChars, strTitle )

Description Creates a table window column of string data type at r untime.

When you return to design mode, Centura destroys the column.

Parameters hWndTbl Window Handle. The handle (or name) of a table window.

nColumnPos Number. The Column Position

nDispWidth Number. The display width of the column in inches.

nMaxChars Number. The maximum number of characters that the column can contain.

strTitle String. The column title.

Return Value nColId is the Column Identifier of the new column. nColld is zero (0) if an error
occurs.

Example Set nColId = SalTblCreateColumn ( hWndTbl, nColumnPos,


nDispWidth, nMaxChars, strTitle )

SalTblDefineCheckBoxColumn
Syntax bOk = SalTblDefineCheckBoxColumn( hWnd, hWndCol, nFlags, sCheckedValue, sUncheckedValue )

Description Define a column as a check box.

Parameters hWnd Window Handle. The handle (or name) of a table window.

HWndCol Window Handle. The handle (or name) of a table window column.

nFlags Number. nFlags is a combination of the following flags using the '|' operator:

COL_CheckBox_IgnoreCase = 0x0001
sCheckedValue String. sCheckedValue is the value that a cell will get when the check box is
checked.

sUncheckedValue String. The value when a check box is unchecked.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

Example Set bOk = SalTblDefineCheckBoxColumn ( hWnd, hWndCol, nFlags,


sCheckedValue, sUncheckedValue )

Centura Builder Function Reference 2-169


Chapter 2

SalTblDefineDropDownListColumn
Syntax bOk = SalTblDefineDropDownListColumn( hWnd, hWndCol, nFlags, nLines )

Description Define a column as a drop down list.

Parameters hWnd Window Handle. The handle (or name) of a table window.

HWndCol Window Handle. The handle (or name) of a table window column.

nFlags Number. nFlags is a combination of the following flags using the '|' operator:

COL_DropDownList_Sorted=0x0001
COL_DropDownList_VScroll=0x0002
COL_DropDownList_Auto=0x0004
COL_DropDownList_Editabel=0x0008
nLines Number. nLines indicates the maximum number of lines to display in the
list.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

Example Set bOk = SalTblDefineDropDownListColumn ( hWnd, hWndCol,


nFlags, nLines )

SalTblDefinePopupEditColumn
Syntax bOk = SalTblDefinePopupEditColumn( hWnd, hWndCol, nFlags, nLines )

Description Define a column as a popup edit window. nLines indicates the maximum number of lines to display in the
control.

Parameters hWnd Window Handle. The handle (or name) of a table window.

HWndCol Window Handle. The handle (or name) of a table window column.

nFlags Number. nFlags is always 0 (zero).

nLines Number. nLines indicates the maximum number of lines to display in the
list.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

Example Set bOk = SalTblDefinePopupEditColumn ( hWnd, hWndCol, nFlags,


nLines )

2-170 Centura Builder Function Reference


SalTblDefineRowHeader
Syntax bOk = SalTblDefineRowHeader ( hWndTable, strTitle, nWidth, nFlags, hWndCol )

Description Defines the appearance and behavior of a table window's row header. The row header is a non-editable area
on the left edge of a table window 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.

Parameters hWndTable Window Handle. The handle (or name) of a table window.

strTitle String. The title of the row header column.

nWidth Number. The width of the row header in pixels.

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

TBL_RowHdr_MarkEdits
TBL_RowHdr_ShareColor
TBL_RowHdr_Sizable
TBL_RowHdr_Visible

hWndCol Window Handle. The column that the row header mirrors. Whatever
displays in hWndCol displays in the row header. If hWndCol equals
hWndNULL, the row header is blank.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

Example Call SalTblDefineRowHeader ( tbl1, strTitle,


nWidth,TBL_RowHdr_Visible | TBL_RowHdr_ShareColor, colRowHeader
)

SalTblDefineSplitWindow
Syntax bOk = SalTblDefineSplitWindow ( hWndTable, nRowsLowerHalf, bDragAdjust )

Description Splits a table window horizontally.

You can insert rows into the lower half of a split table window. This is convenient when the scroll range is
dynamic because you can insert rows without knowing the number of rows in the table window. You can
also use the lower half of a split table window to display summary data.

Parameters hWndTable Window Handle. The handle (or name) of a table window to split.

Centura Builder Function Reference 2-171


Chapter 2

nRowsLowerHalf Number. 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.

bDragAdjust Boolean. Specify whether (TRUE) or not (FALSE) to let the user
drag-adjust the visible rows in both halves of a split window.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

Example Set bAnyFlag = SalTblDefineSplitWindow ( hWndTbl, 3,


TBL_Split_Adjustable )

SalTblDeleteRow
Syntax bOk = SalTblDeleteRow ( hWndTbl, nRow, nFlag )

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

Parameters hWndTbl Window Handle. The handle (or name) of a table window.

nRoNumber. The number of the row to delete. nFlag

Number. A constant used to coordinate a delete from the table window with a
delete from a SQLBase result set. This parameter can be one of these values:

TBL_Adjust
TBL_NoAdjust

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

Example Call SalTblDeleteRow ( hWndForm, nCurrentRow, TBL_NoAdjust)

SalTblDeleteSelected
Syntax bOk = SalTblDeleteSelected ( hWndTbl, hSql )

Description Applies a SQL DELETE statement to all table window rows with the ROW_Selected flag set. You must
prepare or retrieve the SQL DELETE statement before calling this function.

As each row is deleted from the database, Centura deletes it from the table window 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.

Parameters hWndTbl Window Handle. The handle (or name) of a table window.

hSql Sql Handle. The handle of a DELETE statement.

2-172 Centura Builder Function Reference


Return Value bOk is TRUE if the function succeeds and FALSE if hWndTbl or hSql is invalid.

See Also SalTblDoDeletes


SalTblDoInserts
SalTblDoUpdates
SalTblPopulate

Example Call SalTblDeleteSelected ( tblExample, hSql )

SalTblDestroyColumns
Syntax bOk = SalTblDestroyColumns ( hWndTbl )

Description Destroys all automatic columns created by SalTblCreateColumn or SalTblPopulate at runtime.

This function only works on table windows that contain only automatic columns.

Parameters hWndTbl Window Handle. The handle (or name) of a table window.

Return Value bOk is TRUE if the function succeeds and FALSE if hWndTbl is invalid or the table
window contains non-automatic columns (columns created at design time).

See Also SalTblCreateColumn


SalTblPopulate

Example Set bOk = SalTblDestroyColumns ( hWndTbl )

SalTblDoDeletes
Syntax bOk = SalTblDoDeletes ( hWndTbl, hSql, nFlagsOn )

Description Applies a SQL DELETE statement to all table window rows that have nFlagsOn flags set. You must
prepare the SQL DELETE statement before calling this function. As each row is deleted from the database,
Centura deletes it from the table window 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.

Parameters hWndTbl Window Handle. The handle (or name) of a table window.

hSql Sql Handle. The handle of a DELETE statement.

nFlagsOn Number. Centura uses row flags to determine which rows to delete. You can
specify either of these flags:

ROW_MarkDeleted
ROW_Selected

Centura Builder Function Reference 2-173


Chapter 2

Return Value bOk is TRUE if any rows are deleted and FALSE otherwise. bOk is FALSE if
hWndTbl or hSql is invalid.

See Also SalTblDeleteSelected


SalTblDoInserts
SalTblDoUpdates

Example Call SalTblDoDeletes ( tblExample, hSql, ROW_MarkDeleted )

SalTblDoInserts
Syntax bOk = SalTblDoInserts ( hWndTbl, hSql, bClearFlags )

Description Applies a SQL INSERT statement to all the rows in a table window that have the ROW_New flag set. 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.

Parameters hWndTbl Window Handle. The handle (or name) of a table window.

hSql Sql Handle. The handle of an INSERT statement.

bClearFlags Boolean. Whether to reset the ROW_New flag. If TRUE, Centura clears the
ROW_New flag of each inserted row; if FALSE, Centura does not clear the
ROW_New flag of each inserted row. This is useful for error handling; if an
error occurs, you can rollback the transaction and try again.

Return Value bOk is TRUE if the function succeeds and FALSE if hWndTbl or hSql is invalid.

See Also SalTblDeleteSelected


SalTblDoDeletes
SalTblDoUpdates
SalTblPopulate

Example Call SalTblDoInserts ( tblExample, hSql, FALSE )

2-174 Centura Builder Function Reference


SalTblDoUpdates
Syntax bOk = SalTblDoUpdates ( hWndTbl, hSql, bClearFlags )

Description Applies a SQL UPDATE statement to all table window rows with the ROW_Edited flag set. You must
prepare the SQL UPDATE statement before calling this function. This function does not perform a
COMMIT. You must perform a COMMIT to ensure that the updates are not lost in the case of a rollback.

Parameters hWndTbl Window Handle. The handle (or name) of a table window.

hSql Sql Handle. The handle of an UPDATE statement.

bClearFlags Boolean. Whether to reset the ROW_Edited flag. If TRUE, Centura clears the
ROW_Edited flag of each changed row; if FALSE, Centura does not clear the
ROW_Edited flag of each changed row. This is useful for error handling; if an
error occurs, you can roll back the transaction and try again.

Return Value bOk is TRUE if the function succeeds and FALSE if hWndTbl or hSql is invalid.

See Also SalTblDeleteSelected


SalTblDoDeletes
SalTblDoInserts
SalTblPopulate

Example Call SalTblDoUpdates ( tblExample, hSql, FALSE )

SalTblFetchRow
Syntax nResult = SalTblFetchRow ( hWndTbl, nRow )

Description Sends a SAM_FetchRow message to a table window if the row you specify is not currently in the table
window cache. To process the SAM_FetchRow message, fetch the row from the database or another data
source.

The SAM_FetchRow message sets the context row to the row you specify before the table window
receives the message.

Parameters hWndTbl Window Handle. The handle (or name) of the table window that owns the
row being retrieved.

nRoNumber. The row number.

Return Value nResult is one of these values: TBL_RowDeleted, TBL_RowFetched,


TBL_NoMoreRows.

Centura Builder Function Reference 2-175


Chapter 2

See Also SalTblQueryContext


SalTblSetContext

Example Call SalTblFetchRow ( hWndtblTelephone, nMaxRange )

SalTblFindNextRow
Syntax bOk = SalTblFindNextRow ( hWndTbl, nRow, nFlagsOn, nFlagsOff )

Description Scans forward in a table looking for a row whose flags match those specified. The search stops at the
first row that has any of the nFlagsOn flags set, and none of the nFlagsOff flags set
.

Use this function in a loop to find all the table window rows that match specified conditions. You do not
need to increment the row number; Centura continues the search starting at the next row. To begin the
search at the first row, set nRow to TBL_MinRow.

Note: You cannot use TBL_MinRow without first assigning its value to a variable. This is because TBL_MinRow is a
Centura constant, and nRow is a receive parameter whose value the function can change.

Parameters hWndTbl Window Handle. The handle of the table window to search.

nRow Receive Number. The row at which to begin the search; the search starts on
nRow + 1. If Centura finds a row, it returns its row number in this parameter.

nFlagsOn Number. The flags the row should have.

nFlagsOff Number. The flags the row should not have. Specify zero (0)
for no flags.

You can specify any of the ROW_* flags for nFlagsOn and nFlagsOff. If
you want to specify more than one, combine them using the OR (|)
operator.

Return Value bOk is TRUE if Centura finds a row and FALSE if there are no matches.

See Also SalTblFindPrevRow


SalTblSetFlagsAnyRows

2-176 Centura Builder Function Reference


Example If SalTblFindNextRow ( hWndForm, nCurrentRow,
ROW_Selected, 0 )

SalTblFindPrevRow
Syntax bOk = SalTblFindPrevRow ( hWndTbl, nRow, nFlagsOn, nFlagsOff )

Description Scans backward in a table looking for a row whose flags match those specified. The search stops at the
first row that has any of the nFlagsOn flags set, and none of the nFlagsOff flags set.

Use this function in a loop to find all the table window rows that match specified conditions. You do not
need to decrement the row number; Centura continues the search starting at the next row. To begin the
search at the last row, set nRow to TBL_MaxRow.

Note: You cannot use TBL_MaxRow without first assigning its value to a variable. This is because TBL_MaxRow is a
Centura constant, and nRow is a receive parameter whose value the function can change.

Parameters hWndTbl Window Handle. The handle of the table window to search.

nRoReceive Number The row at which to begin the search; the search starts on
nRow - 1. If Centura finds a row, it returns its row number in this parameter.

nFlagsOn Number. The flags the row should have.

nFlagsOff Number. The flags the row should not have. Specify zero (0)
for no flags.

You can specify any of the ROW_* flags for nFlagsOn and nFlagsOff. If you
want to specify more than one, combine them using the OR (|) operator.

Return Value bOk is TRUE if Centura finds a row and FALSE if there are no matches.

See Also SalTblFindNextRow


SalTblSetFlagsAnyRows

Example If SalTblFindPrevRow ( hWndForm, nCurrentRow,


ROW_Selected, 0 )

Centura Builder Function Reference 2-177


Chapter 2

SalTblGetColumnText
Syntax bOk = SalTblGetColumnText ( hWndTbl, nColumnID, strText )

Description Gets data from a column of a table window's context row.

Parameters hWndTbl Window Handle. The handle (or name) of a table window.

nColumnID Number. The Column Identifier

strText Receive string. The column data.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

See Also SalTblSetColumnText

Example Set bOk = SalTblGetColumnText ( hWndTbl, nColumnID, strText )

SalTblGetColumnTitle
Syntax nLength = SalTblGetColumnTitle ( hWndCol, strText, nMaxLen )

Description Gets the title of a table window column.

Parameters hWndCol Window Handle. The handle (or name) of a table window column.

strText Receive String. The title.

nMaxLen Number. The maximum length of the title.

Return Value nLength is the length of the column title returned in strText.

See Also SalTblSetColumnTitle

Example Call SalTblGetColumnTitle ( colRowHeader, strTitle, 100 )

SalTblGetColumnWindow
Syntax hWndCol = SalTblGetColumnWindow ( hWndTbl, nCol, nFlags )

Description Gets the handle of a table window column.

Parameters hWndTbl Window Handle. The handle (or name) of the table window that contains
the column whose window handle you want.

nCol Number. A column position or a column identifier.

nFlags Number. A constant that identifies whether nCol's value is a column


identifier or a column position. Specify either:

COL_GetID

2-178 Centura Builder Function Reference


COL_GetPos
Return Value hWndCol is the handle of a table window column. hWndCol is equal to hWndNULL
if Centura cannot find the table window column.

Example Set hWndCol = SalTblGetColumnWindow ( tbl1, nColID,


COL_GetID )

SalTblInsertRow
Syntax nNewRow = SalTblInsertRow ( hWndTbl, nRow )

Description Inserts a new blank row into a table window.

Parameters hWndTbl Window Handle. The handle (or name) of a table window.

nRowNumber The row number of the new row.

If this value is a valid row number within the table window range, then
Centura inserts a blank row at that location. If you specify TBL_MaxRow,
Centura appends the row to the end of the table window.

If the table window is split and you specify TBL_MinSplitRow, Centura


appends the row to the top of the lower half of the table window.

Return Value nNewRow is the number of the new row if the function succeeds. It is equal to
TBL_Error if an error occurs.

Example Set nNewRow = SalTblInsertRow ( hWndTbl,


TBL_MinSplitRow )

SalTblKillEdit
Syntax bOk = SalTblKillEdit ( hWndTbl )

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

Parameters hWndTbl Window Handle. The handle (or name) of the table window that contains
the row just inserted or modified.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

Example Set bOk = SalTblKillEdit ( hWndTbl )

Centura Builder Function Reference 2-179


Chapter 2

SalTblKillFocus
Syntax bOk = SalTblKillFocus ( hWndTbl )

Description Turns off the table window's focus frame. This is useful when the user chooses a menu item from a table
window menu; in this case, the focus cannot leave the table window.

Parameters hWndTbl Window Handle. The handle (or name) of a table window.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

Example Call SalTblKillFocus ( hWndForm )

SalTblPasteRows
Syntax bOk = SalTblPasteRows ( hWndTbl )

Description Pastes the contents of the Clipboard to the specified table window. Centura assumes the Clipboard data is
in text format with cells delimited by tab characters and rows delimited by end-of-line characters. Centura
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.

Parameters hWndTbl Window Handle. The handle (or name) of the table window receiving the
data from the Clipboard.

Return Value bOk is TRUE if the Clipboard contains text that is successfully inserted into the table
window, and FALSE otherwise, and if none of the columns are editable.

See Also SalTblCopyRows

Example Call SalTblPasteRows ( tblPhoneList )

SalTblPopulate
Syntax bOk = SalTblPopulate( hWndTbl, hSql, strSelect, nMethod )

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

This function also works with table windows that do not have columns. Centura creates columns at runtime
based on the SQL statement's SELECT list, and uses the database column names as table window column
titles. If you call SalTblPopulate again during the same runtime session, Centura destroys the automatic
table window columns created by the last SELECT statement and creates new columns.

2-180 Centura Builder Function Reference


SalTblPopulate also works with S ELECT statements that do not include INTO
clauses. The table window must have the same number of columns as the SQL statement's
SELECT list, and their data types must match the data types of the columns in the SELECT list.

If you process and Return from the SAM_FetchRow message, SalTblPopulate does not fetch that row into
the table window. If you process but do not Return from the
SAM_FetchRow message, SalTblPopulate fetches the row into the table window. The SAM_FetchRow
message is sent before the row is actually fetched from the result set so in processing this message, you
cannot refer to the row being fetched. However, the SAM_FetchRowDone message is sent after the row is
fetched, enabling you to refer to the row just fetched.

Parameters hWndTbl Window Handle. The handle (or name) of the table window to populate.

hSql Sql Handle. The handle of the SELECT statement. Do not use the Sql Handle
passed to SalTblPopulate by other functions while the table window is in use.

strSelect String. The SELECT statement. If the string is null (“), Centura uses the
previously prepared SELECT statement associated with hSql. This avoids
re-preparing the statement each time SalTblPopulate executes.

nMethod Number. How to populate the table window. Specify one of these values:
TBL_FillAll TBL_FillAllBackground TBL_FillNormal

Return Value bOk is TRUE if the function succeeds and FALSE if either hWndTbl or hSql is
invalid.

See Also SalTblDeleteSelected


SalTblDoDeletes
SalTblDoInserts
SalTblDoUpdates

Example Call SalTblPopulate ( tblExample, hSql, strSql,


TBL_FillAllBackground )

Centura Builder Function Reference 2-181


Chapter 2

SalTblQueryCheckBoxColumn
Syntax bOk = SalTblQueryCheckBoxColumn( hWnd, hWndCol, nFlags, sCheckedValue, sUncheckedValue )

Description If the column is defined as a check box, this function retrieves information about the check box and
returns TRUE. If it is not a check box, this function returns FALSE.

Parameters hWnd Window Handle. The handle (or name) of a table window.

HWndCol Window Handle. The handle (or name) of a table window column.

nFlags Receive Number. nFlags is a combination of the following flags using the
'|' operator: COL_CheckBox_IgnoreCase = 0x0001

sCheckedValue Receive String. sCheckedValue is the value that a cell will get when the check
box is checked.

sUncheckedValue Receive String. The value when a check box is unchecked.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

Example bOk = SalTblQueryCheckBoxColumn ( hWnd, hWndCol, nFlags,


sCheckedValue, sUncheckedValue )

SalTblQueryColumnCellType
Syntax bOk = SalTblQueryColumnCellType( hWnd, hWndCol, nType )

Description Indicates whether a column is a checkbox, drop down list, popup edit, or standard column.

Parameters hWnd Window Handle. The handle (or name) of a table window.

hWindCol Window Handle. The handle (or name) of a table window column.

nType Receive Number. Receives one of the following values.

COL_CellType_Standard=1 COL_CellType_CheckBox=2

COL_CellType_DropDownList=3 COL_CellType_PopupEdit=4

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

Example Set bOk = SalTblQueryColumnCellType ( hWnd, hWndCol, nType )

2-182 Centura Builder Function Reference


SalTblQueryColumnFlags
Syntax bSet = SalTblQueryColumnFlags ( hWndCol, nFlags )

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

Parameters hWndCol Window Handle. The handle (or name) of a table window column.

nFlags Number. The column flags to test. You can combine COL_* flags using the
OR (|) operator.

Return Value bSet is TRUE if any of the flags indicated by nFlags are set and FALSE otherwise.

See Also SalTblSetColumnFlags

Example If SalTblQueryColumnFlags ( col1, COL_CenterJustify )


Set rbCenter = TRUE Else

Set rbLeft = TRUE

SalTblQueryColumnID
Syntax nColID = SalTblQueryColumnID ( hWndCol )

Description Gets a table window column's identifier.

Parameters hWndCol Window Handle. The handle of a table window column.

Return Value nColID is the Column Identifier. nColID is -1 if hWndCol is not a valid column.

Example Set nColID = SalTblQueryColumnID ( hWndCol )


Call SalTblSetColumnWidth ( hWndCol, nWidths[ nColID ] )

SalTblQueryColumnPos
Syntax nPos = SalTblQueryColumnPos ( hWndCol )

Description Gets a table window column's relative position.

Parameters hWndCol Window Handle. The handle of a table window column.

Return Value nPos is the Column Position. nPos is -1 if hWndCol is not a valid handle for a table
window column.

See Also SalTblSetColumnPos

Example Set nPos = SalTblQueryColumnPos ( hWndCol )

Centura Builder Function Reference 2-183


Chapter 2

SalTblQueryColumnWidth
Syntax bOk = SalTblQueryColumnWidth ( hWndTbl, nFormUnits )

Description Returns the width (in form units) of a table window column.

Parameters hWndTbl Window Handle. The handle (or name) of a table window column.

nInches Receive Number. The width of the table window column.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

See Also SalTblSetColumnWidth

Example Call SalTblQueryColumnWidth ( colRowHeader, nWidth )

SalTblQueryContext
Syntax nContext = SalTblQueryContext ( hWndTbl )

Description Returns a table window's current context row.

Before sending a SAM_FetchRow message, Centura automatically sets the context row so that
assignments made while processing the message reference the correct row.

Parameters hWndTbl Window Handle. The handle (or name) of a table window.

Return Value nContext is the current context row number.

See Also SalTblFetchRow


SalTblSetContext

Example Set nContext = SalTblQueryContext ( hWndTbl )

SalTblQueryDropDownListColumn
Syntax bOk = SalTblQueryDropDownListColumn( hWnd, hWndCol, nFlags, nLines )

Description If the column is defined as a drop down list, this function retrieves information about the list and returns
TRUE. If it is not a drop down list, this function returns FALSE.

Parameters hWnd Window Handle. The handle (or name) of a table window.

HWndCol Window Handle. The handle (or name) of a table window column.

2-184 Centura Builder Function Reference


nFlags Receive Number. nFlags is a combination of the following flags using the
'|' operator: COL_DropDownList_Sorted=0x0001
COL_DropDownList_VScroll=0x0002 COL_DropDownList_Auto=0x0004
COL_DropDownList_Editable=0x0008

nLines Receive Number. nLines indicates the maximum number of lines to display
in the list.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

Example Set bOk = SalTblQueryDropDownListColumn ( hWnd, hWndCol,


nFlags, nLines )

SalTblQueryFocus
Syntax bOk = SalTblQueryFocus ( hWndTbl, nRow, hWndCol )

Description Identifies the cell in a table window with the focus.

Parameters hWndTbl Window Handle. The handle (or name) of a table window.

nRoReceive Number. The row number of the focus row. hWndCol

Receive Window Handle. The handle of the column with the focus.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

See Also SalTblSetFocusCell


SalTblSetFocusRow

Example On SAM_Click
Call SalTblQueryFocus ( hWndtblTelephone,
nRow,hWndColumn )

SalTblQueryLinesPerRow
Syntax bOk = SalTblQueryLinesPerRow( hWndTbl, nLines )

Description Retrieves the height of a row in lines.

Parameters HWndTbl Window Handle. The handle (or name) of a table window.

nLines Receive Number. The number of lines.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

Centura Builder Function Reference 2-185


Chapter 2

Example Set bOk = SalTblQueryLinesPerRow ( hWndTbl, nLines )

SalTblQueryLockedColumns
Syntax nLockedColumns = SalTblQueryLockedColumns ( hWndTbl )

Description Retrieves the number of locked table window columns.

Locked table window columns do not scroll horizontally; they are fixed to the left side of the table
window. All other columns appear to scroll under the locked columns.

Parameters hWndTbl Window Handle. The handle (or name) of a table window.

Return Value nLockedColumns is the number of locked columns. If there are no locked columns,
nLockedColumns is zero (0).

See Also SalTblSetLockedColumns

Example Set nLockedColumns = SalTblQueryLockedColumns ( hWndTbl )

SalTblQueryPopupEditColumn
Syntax bOk = SalTblQueryPopupEditColumn( hWnd, hWndCol, nFlags, Lines )

Description If the column is defined as a popup edit, this function retrieves information about the popup edit and
returns TRUE. If it is not a popup edit, this function returns FALSE.

Parameters hWnd Window Handle. The handle (or name) of a table window.

HWndCol Window Handle. The handle (or name) of a table window column.

nFlags Receive Number. nFlags is a combination of the following flags using the
'|' operator: COL_DropDownList_Sorted =0x0001
COL_DropDownList_VScroll =0x0002 COL_DropDownList_Auto=0x0004
COL_DropDownList_Editable=0x0008

nLines Receive Number. nLines indicates the maximum number of lines to display
in the list.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

Example Set bOk = SalTblQueryPopupEditColumn ( hWnd, hWndCol, nFlags,


Lines )

2-186 Centura Builder Function Reference


SalTblQueryRowFlags
Syntax bOk = SalTblQueryRowFlags ( hWndTbl, nRow, nFlags )

Description Queries a row's flags.

Parameters hWndTbl Window Handle. The handle (or name) of a table window.

nRoNumber. The row number of the row whose flags you want to test. nFlags

Number. The row flags to test for. You can combine ROW_* flags using the
OR (|) operator.

Return Value bOk is TRUE if any of the specified flags are set and FALSE if none of the specified
flags are set.

See Also SalTblSetFlagsAnyRows


SalTblSetRowFlags

Example On SAM_SetFocus
If SalTblQueryRowFlags ( hWndForm, lParam, ROW_New )

SalTblQueryRowHeader
Syntax bOk = SalTblQueryRowHeader ( hWndTbl, strTitle, nMaxTitle, nWidth,
nFlags, hWndCol )

Description Gets a table window's row header definition. The row header is a non-editable area on the left edge of a
table window that displays information that you do not want to scroll off the screen as the user scrolls
horizontally. A typical use is the display of row numbers.

Parameters hWndTbl Window Handle. The handle (or name) of a table window.

strTitle Receive String. The title of the row header.

nMaxTitle Number. The maximum length of the title.

nWidth Receive Number. The width of the row header in pixels.

nFlags Receive Number. Row header attributes. Specify one of these:

TBL_RowHdr_MarkEdits
TBL_RowHdr_ShareColor
TBL_RowHdr_Sizable
TBL_RowHdr_Visible

Centura Builder Function Reference 2-187


Chapter 2

hWndCol Receive Window Handle. The column that the row header mirrors. Whatever
displays in hWndCol displays in the row header. If hWndCol is equal to
hWndNULL, the row header is blank.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

Example Call SalTblQueryRowHeader ( tbl1, strTitle, 100, nWidth,


nFlags, colRowHeader )

SalTblQueryScroll
Syntax bOk = SalTblQueryScroll ( hWndTbl, nPosition, nMinRange, nMaxRange )

Description Returns a table window's current scroll position and range.

The scroll position is the row number of the row that is currently at the top of the window. You set the table
window range with SalTblSetRange and Centura changes it when you insert or delete rows from the table
window.

Parameters hWndTbl Window Handle. The handle (or name) of a table window.

nPosition Receive Number. The scroll position.

nMinRange Receive Number. The minimum table range.

nMaxRange Receive Number. The maximum table range.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

Example Call SalTblQueryScroll ( hWndTbl, nPosRow, nMinRow, nMaxRow )

SalTblQuerySplitWindow
Syntax bOk = SalTblQuerySplitWindow ( hWndTbl, nRowsLowerHalf,Syntax
bDragAdjust )

Description Specifies how a table window is split horizontally.

Parameters hWndTbl Window Handle. The handle (or name) of a split table window.

nRowLowerHalf Receive Number. The number of visible rows in the lower half of the split
window. If zero (0), the table is not split.

bDragAdjust Receive Number Boolean. Specify whether (TRUE) or not (FALSE) the
user can drag-adjust the visible rows in both halves of a split window.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

2-188 Centura Builder Function Reference


Example Set bOk = SalTblQuerySplitWindow ( hWndTbl,
nRowsLowerHalf,Syntax,bDragAdjust )

SalTblQueryTableFlags
Syntax bSet = SalTblQueryTableFlags ( hWndTbl, nFlags )

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

Parameters hWndTbl Window Handle. The handle (or name) of a table window.

nFlags Number. The table flags to test. You can combine TBL_* flags
using the OR (|) operator.

Return Value bSet is TRUE if any of the flags indicated by nFlags are set and FALSE otherwise.

See Also SalTblSetTableFlags

Example If SalTblQueryTableFlags ( tbl1, TBL_Flag_MoveableCols )


Set rbColsMovable = TRUE

SalTblQueryVisibleRange
Syntax bOk = SalTblQueryVisibleRange ( hWndTbl, nRangeMin, nRangeMax )

Description Returns the current range of visible rows in a table window.

Parameters hWndTbl Window Handle. The handle (or name) of a table window.

nRangeMin Receive Number. The first visible row.

nRangeMax Receive Number. The last visible row.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

Example Set bOk = SalTblQueryVisibleRange ( hWndTbl, nRangeMin,


nRangeMax )

SalTblReset
Syntax bOk = SalTblReset ( hWndTbl )

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

Parameters hWndTbl Window Handle. The handle (or name) of a table window.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

See Also SalTblSetRange

Centura Builder Function Reference 2-189


Chapter 2

Example If nRowCount > 0


Call SalTblReset ( hWndForm )

SalTblScroll
Syntax bOk = SalTblScroll ( hWndTbl, nRow, hWndColumn, nTBLScroll )

Description Scrolls a table window to the specified row and column.

Parameters hWndTbl Window Handle. The handle (or name) of a table window.

nRoWNumber The number of the row to scroll to. If you specify -1, only the column scrolls
into view.

hWndColumn Window Handle. The table window column to scroll into view. If you specify
hWndNULL, only the row scrolls into view.

nTBLScroll Number. The position of the scroll row. Specify one of these:

TBL_AutoScroll
TBL_ScrollBottom
TBL_ScrollTop

Return Value bOk is TRUE if the function succeeds and FALSE if Centura cannot scroll the row.
This function fails if either nRow or nTBLScroll are invalid values.

See Also SalTblQueryScroll


SalTblQueryVisibleRange

Example Set bOk = SalTblScroll ( hWndTbl, nRow, hWndColumn,


nTBLScroll )

SalTblSetCellTextColor
Syntax bOk = SalTblSetCellTextColor ( hWndCol, nColor, bDiscardable )

Description Changes a table window cell's text color.

Parameters hWndCol Window Handle. The handle (or name) of a table window column.

nColor Number. The cell text color. Specify one of the predefined windows
colors.

bDiscardable Boolean. Determines whether Centura discards the cell text color if and
when the user re-fetches the row. If TRUE, Centura discards the cell text color
when the user refetches the row. If FALSE, Centura keeps the cell text color.
This requires additional resources to keep the row in memory.

2-190 Centura Builder Function Reference


Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

Example On SAM_FetchRow Call SalTblSetCellTextColor

( Col1, COLOR_Red, TRUE )


Return TBL_RowFetched

SalTblSetColumnFlags
Syntax bOk = SalTblSetColumnFlags ( hWndCol, nFlags, bSet )

Description Sets or clears a table window column's flags.

Parameters hWndCol Window Handle. The handle (or name) of a table window column.

nFlags Number. The column flags to change. You can combine COL_* flags
using the OR (|) operator.

bSet Boolean. If TRUE, Centura sets the flags; if FALSE, Centura clears the
flags.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails. To define a column a
column as multiline use the flag:

COL_MultilineCell = 0x00800000

See Also SalTblQueryColumnFlags

Example Call SalTblSetColumnFlags ( col1, COL_CenterJustify, TRUE )

SalTblSetColumnPos
Syntax bOk = SalTblSetColumnPos ( hWndCol, nPos )

Description Moves a table window column to a new position.

Parameters hWndCol Window Handle. The handle (or name) of a table window column to
move.

nPos Number. The new position of the table window column. 1 is the first (left-most)
position, 2 is the second position, and so on.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

See Also SalTblQueryColumnPos

Example Call SalTblSetColumnPos ( col3, nPos + 1 )

Centura Builder Function Reference 2-191


Chapter 2

SalTblSetColumnText
Syntax bOk = SalTblSetColumnText ( hWndTbl, nColumnID, strText )

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

Parameters hWndTbl Window Handle. The handle (or name) of a table window.

nColumnID Number. The Column Identifiers

strText String. The data to assign.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

See Also SalTblGetColumnText

Example Set bOk = SalTblSetColumnText ( hWndTbl, nColumnID, strText )

SalTblSetColumnTitle
Syntax bOk = SalTblSetColumnTitle ( hWndCol, strTitle )

Description Sets the title of a table window column.

Parameters hWndCol Window Handle. The handle (or name) of a table window column.

strTitle String. The title of the table window column.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

See Also SalTblGetColumnTitle

Example Set bOk = SalTblSetColumnTitle ( hWndCol, strTitle )

SalTblSetColumnWidth
Syntax bOk = SalTblSetColumnWidth ( hWndTbl, nFormUnits )

Description Sets a table window column's display width.

Parameters hWndTbl Window Handle. The handle (or name) of a table window column.

nFormUnits Number. The table window column's display width in form units.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

See Also SalTblQueryColumnWidth

2-192 Centura Builder Function Reference


Example Set nColID = SalTblQueryColumnID ( hWndCol ) Call SalTblSetColumnWidth

( hWndCol, nWidths[ nColID ] )

SalTblSetContext
Syntax bOk = SalTblSetContext ( hWndTbl, nRow )

Description 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,
Centura creates a new row in memory and sets its cell values to null.

Parameters hWndTbl Window Handle. The handle (or name) of a table window whose context
row you want to set.

nRoNumber. The row number of the new context row.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

See Also SalTblQueryContext

Example Set bOk = SalTblSetContext ( hWndTbl, nRow

SalTblSetFlagsAnyRows
Syntax bAny = SalTblSetFlagsAnyRows ( hWndTbl, nFlags, bSet,
nFlagsOn, nFlagsOff )

Description Sets or clears row flags.

Parameters hWndTbl Window Handle. The handle (or name) of a table window whose row
flags you want to set or clear.

nFlags Number. The flags to change. You can combine flag values using the OR
(|) operator.

bSet Boolean. Whether to set (TRUE) or clear (FALSE) the specified


flags.

nFlagsOn Number. The flags that the rows should have. You can combine flag values
using the OR (|) operator.

Set nFlagsOn to zero (0) and nFlagsOff to zero (0) to specify all rows.

nFlagsOff Number. The flags that the rows should not have. You can combine flag
values using the OR (|) operator.

Centura Builder Function Reference 2-193


Chapter 2

Set nFlagsOn to zero (0) and nFlagsOff to zero (0) to specify all rows.

Return Value bAny is TRUE if any of the table window's rows have any of the nFlagsOn flags and
none of the nFlagsOff flags.

See Also SalTblFindNextRow


SalTblFindPrevRow

Example Call SalTblSetFlagsAnyRows ( tblExample, ROW_MarkDeleted, TRUE,


ROW_Selected, 0 )

SalTblSetFocusCell
Syntax bOk = SalTblSetFocusCell ( hWndTbl, nRow, hWndCol, nEditMin, nEditMax )

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

Parameters hWndTbl Window Handle. The handle (or name) of a table window.

nRowNumbe The row that receives the edit focus.

hWndCol Window Handle. The handle (or name) of the column that receives the
edit focus.

nEditMin Number. The position of the left-most character. When used with nEditMax,
this parameter lets the user select a portion of the cell text.

nEditMin must be less than or equal to nEditMax. To select all the


characters in a cell, specify zero (0) for this parameter and -1 for nEditMax.

nEditMax Number. The position of the right-most character. When used with nEditMin,
this parameter lets the user select a portion of the cell text.

nEditMax must be greater than or equal to nEditMin. To select all


the characters in a cell, specify -1 for this parameter and zero (0) for
nEditMin.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

See Also SalTblQueryFocus

Example Call SalTblSetFocusCell ( hWndForm, lParam,


hWndItem, 0, 1 )

2-194 Centura Builder Function Reference


SalTblSetFocusRow
Syntax bOk = SalTblSetFocusRow ( hWndTbl, nRow )

Description Sets a table window's focus frame row.

Parameters hWndTbl Window Handle. The handle (or name) of a table window.

nRoNumber. The row number of the row to which to apply the focus frame.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

See Also SalTblQueryFocus

Example Set bOk = SalTblSetFocusRow ( hWndTbl, nRow

SalTblSetLinesPerRow
Syntax bOk = SalTblSetLinesPerRow( hWndTbl, nLines )

Description Sets the height of a row in lines. Multirow lines are useful when a column is defined as multiline. The text
in each cell will wrap. To define a column a column as multiline use the function SalTblSetColumnFlags
with the flag: COL_MultilineCell = 0x00800000

Parameters HWndTbl Window Handle. The handle (or name) of a table window.

nLines Number. The number of lines.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

Example Set bOk = SalTblSetLinesPerRow ( hWndTbl, nLines )

SalTblSetLockedColumns
Syntax bOk = SalTblSetLockedColumns ( hWndTbl, nLockedColumns )

Description Sets the number of locked table window columns. Table window columns that you lock do not scroll
horizontally; they are fixed to the left side of the table window. All other columns appear to scroll under the
locked columns. This function locks zero (0) or more of the left-most visible columns of a table window.

Parameters hWndTbl Window Handle. The handle (or name) of a table window.

nLockedColumns Number. The number of table window columns to lock.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

See Also SalTblQueryLockedColumns

Centura Builder Function Reference 2-195


Chapter 2

Example Call SalTblSetLockedColumns ( tbl1, 2 )

SalTblSetRange
Syntax bOk = SalTblSetRange ( hWndTbl, nMin, nMax )

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

Parameters hWndTbl The handle (or name) of a table window.

nMin Number. The lower boundary of the table window.

nMax Number. The upper boundary of the table window. Setting nMin

and nMax:

nMin must be less than or equal to nMax.

You can specify an empty table with the range 0, -1. You can specify a
dynamic range with the values zero (0), TBL_MaxRow. Centura determines
the higher boundary when the application returns TBL_NoMoreRows from a
SAM_FetchRow me ssa ge, o r fro m the return of the SAM_FetchDone
message.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

See Also SalTblReset

Example Call SalTblSetRange ( hWndForm, 0, nRowCount - 1 )

SalTblSetRow
Syntax nRowNum = SalTblSetRow ( hWnd, nRowPos )

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

Parameters tName Window Handle. The handle (or name) of the window whose current focus
row you want to change.

nRowPos Number. The position of the focus row. Specify one of these values:
TBL_SetFirstRow TBL_SetLastRow TBL_SetNextRow TBL_SetPrevRow

Return Value nRowNum is the row number of the new focus row.

2-196 Centura Builder Function Reference


Example Set = nRowNum = SalTblSetRow ( hWnd, nRowPos )

SalTblSetRowFlags
Syntax bOk = SalTblSetRowFlags ( hWndTbl, nRow, nFlags, bSet )

Description Sets or clears a table window row's flags.

Parameters hWndTbl Window Handle. The handle (or name) of a table window.

nRoNumber. The row number of the row whose flags you want to set or clear.

nFlags Number. The row flags. You can combine any of the ROW_* flags using the
OR (|) operator.

bSet Boolean. Whether to set (TRUE) or clear (FALSE) the specified


flags.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

See Also SalTblQueryRowFlags


SalTblSetFlagsAnyRows

Example Call SalTblSetRowFlags ( hWndTbl, nRow, ROW_Selected, TRUE )

SalTblSetTableFlags
Syntax bOk = SalTblSetTableFlags ( hWndTbl, nFlags, bSet )

Description Sets or clears a table window's flags.

Parameters hWndTbl Window Handle. The handle (or name) of a table window.

nFlags Number. The table flags. You can combine any of the TBL_* flags using the
OR (|) operator.

bSet Boolean. Whether to set (TRUE) or clear (FALSE) the specified


flags.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

See Also SalTblQueryTableFlags

Example Call SalTblSetTableFlags ( tbl1, TBL_Flag_MoveableCols, FALSE)

Centura Builder Function Reference 2-197


Chapter 2

SalTblSortRows
Syntax bRet = SalTblSortRows ( hWndTbl, nColumnID, nOrder )

Description Sorts the rows of a non-discardable table window based on the values in one of the table window's
columns. You must create this column at design time; it cannot be an automatic column such as a column
created by SalTblPopulate. or SalTblCreateColumn.

Important: The table window cache must not be discardable and the setting of maximum rows in memory
must be large enough to hold the rows that you are sorting.

Parameters hWndTbl Window Handle. The handle (or name) of a table window.

nColumnID Number. The Column Identifier of the column by which to sort.

nOrder Number. The direction of the sort. Specify either:

TBL_SortDecreasing
TBL_SortIncreasing

Return Value bRet is TRUE if the function succeeds and FALSE if nColumnID is not a valid
identifier.

Example Set bRet = SalTblSortRows ( hWndTbl, nColumnID, nOrder )

SalTimerKill
Syntax bOk = SalTimerKill ( hWnd, nIDEvent )

Description Destroys an object's system timer. Centura removes any pending SAM_Timer messages from the
message queue of hWnd. Set a system timer with the SalTimerSet function.

Parameters hWnd Window Handle. The handle (or name) of an object.

nIDEvent Number. The timer ID to kill.

Return Value bOk is TRUE if Centura successfully kills the event and FALSE if Centura cannot
find the specified timer.

See Also SalTimerSet

Example On SAM_Destroy
Call SalTimerKill ( dfClock, 1 )

2-198 Centura Builder Function Reference


SalTimerSet
Syntax bOk = SalTimerSet ( hWnd, nIDEvent, nElapseMilliSec )

Description Creates a system timer for a given object. When a timer event occurs, Centura 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.

Parameters hWnd Window Handle. The handle (or name) of an object associated with a system
timer.

nIDEvent Number. The timer ID number.

nElapseMilliSec Number. The elapsed time between each SAM_Timer message.

The maximum value is 65535 (approximately 65 seconds). If you set this


parameter to a higher value, it wraps.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

See Also SalTimerKill

Example On SAM_Create
Set bOk = SalTimerSet ( hWndItem, 1, 1000 )

SalTrackPopupMenu
Syntax bOk = SalTrackPopupMenu ( hWndProcMsgs, strMenuName, nFlags, nX, nY )

Description Creates pop-up menus at runtime.

Parameters hWndProcMsgs Window Handle. The handle (or name) of the top-level window that processes
messages generated by the pop-up menu.

strMenuName String. The name of a pop-up menu accessible to hWndProcMsgs. For


example, a menu defined by hWndProcMsgs or its MDI window parent, or a
global menu.

nFlags Number. Specifies how the pop-up menu displays. You can combine flag
values using the OR (|) operator.

nX Number. 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 nFlags.

Centura Builder Function Reference 2-199


Chapter 2

nY Number. The position of the pop-up menu on the Y axis. The value of this
parameter is ignored if you set the TPM_CursorY flag in nFlags.

The nX and nY Parameters together represent a point (the top left, top middle, or top right) of the pop-up
menu, depending on the nFlags value.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

Example On SAM_Click
Call SalTrackPopupMenu ( hWndForm, 'menuEdit', TPM_CursorX |
TPM_CursorY | TPM_CenterAlign, 0, 0 )

SalUpdateWindow
Syntax bOk = SalUpdateWindow ( hWndUpdate )

Description Forces Centura to update a window.

Painting is a low priority in Microsoft Windows. Windows sends WM_Paint messages to the end of an
object's message queue and processes them only after it processes all other messages in the queue. If,
during the development phase of your application, you find that painting is being delayed, you can force
Centura to update a window.

For example, if you call SalListClear to delete all the entries in a list box and follow this call with a loop,
Centura delays repainting the list box until it completes processing the loop. To force Centura to repaint
the list box before processing the
loop, call SalUpdateWindow.

Parameters hWndUpdate Window Handle. The handle (or name) of the window to update.

Return Value bOk is TRUE if the function succeeds and FALSE if hWndUpdate is not a valid
window handle.

See Also SalInvalidateWindow

Example Message Actions


On SAM_FieldEdit
Call SalUpdateWindow ( ml1 )

2-200 Centura Builder Function Reference


SalUseRegistry
Syntax bOk = SalUseRegistry( bUseRegistry, sCompanyName )

Description This function is used to re-direct all SalProfile* functions to use the Registry. All values for the SalProfile*
functions are saved as strings. The INI file name used as the last parameter of the SalProfile* functions will
be used as the application name. The resulting path will be:

\\HKEY_CURRENT_USER\Software\<company name>\<application
name>\<section>\<setting>\
Parameters bUseRegistry - TRUE if registry is to be used, FALSE if INI files are to be used.

sCompanyName - Name of company to be used under the registry.

Return Value bOk is TRUE if the function succeeds and FALSE if function fails.

Example Set bOk = SalUseRegistry ( bUseRegistry, sCompanyName )

SalValidateSet
Syntax bOk = SalValidateSet ( hWndCC, bValState, lParam )

Description You call SalValidateSet when the user tries to move the focus to the custom control. In Centura, changes
in focus trigger validation. SalValidateSet tells Centura that the focus is changing to a custom control so
that Centura can perform validation as needed.

Important: You must set the Tab stop item in the Customizer to Tab or Group so that the custom control
can receive the focus.

Parameters hWndCC Handle of the custom control.

bValState Validates this custom control when it loses the focus.

lParam Centura passes the value you specify in the lParam of


SAM_Validate.

Return Value bOk is TRUE Centura sends SAM_Validate when the custom control loses the focus
and FALSE if Centura does not send SAM_Validate when the custom control loses the focus.

Specify TRUE in bValState for controls that behave like editable objects. When bValState is TRUE,
Centura sends SAM_Validate to the object losing the focus:

Centura Builder Function Reference 2-201


Chapter 2

• If validation succeeds, SalValidateSet returns TRUE and Centura moves the focus to the
custom control. Later, when the user moves the focus off the custom control, Centura sends it
SAM_Validate if its field edit flag is set to TRUE.

• If validation fails, SalValidateSet returns FALSE and Centura sets the focus to the invalid
object.

For an editable custom control, you want Centura to send SAM_Validate if the user changes the value. Call
SalSetFieldEdit( hWndItem, TRUE ) when the user changes the value so that Centura sends SAM_Validate
if the user tries to change the focus to another object.

Example Call SalValidateSet ( hWndItem, TRUE, 0 )

SalWaitCursor
Syntax bOk = SalWaitCursor ( bOn )

Description Displays or removes the hourglass cursor. 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.

Parameters bOn Boolean. Whether to turn the hourglass on (TRUE) or off (FALSE).

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

Example Call SalWaitCursor ( TRUE )

SalWindowClassName
Syntax sClassName = SalWindowClassName( hWnd )

Description Return the name of a window's class as a string.

Parameters hWnd Window Handle. The window handle of an instance of a Window Class
object.

Return Value Returns an empty string if the window is not a class object.

Example Set sClassName = SalWindowClassName ( hWnd )

2-202 Centura Builder Function Reference


SalWindowGetProperty
Syntax bOk = SalWindowGetProperty( hWndQO, strPropName, strPropValue )

Description Gets the value of a named property for an instance of a QuickObject. The property must have been
created at designtime with the QuickObject Editor.

Parameters hWndQO Window Handle. The window handle of an instance of a QuickObject.

strPropName String. The name of the property.

strPropValue Receive String. The value of the property.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

Example This example gets a window name property:

Set bOk = SalWindowGetProperty ( hWndItem, 'WindowName',


strWindowName )

SalWindowHandleToNumber
Syntax nWnd = SalWindowHandleToNumber ( hWnd )

Description Converts a window handle to a number.

For example, you can pass a window handle as a SalSendMsg wParam parameter as follows:

nWnd = SalWindowHandleToNumber ( hWndParm ) Call

SalSendMsg ( hWndDest, nMsg, nWnd, 0 )

Parameters hWnd Window Handle. The handle to convert.

Return Value nWnd is the number converted from hWnd.

See Also SalNumberToWindowHandle

Example Set ntblCustomer = SalWindowHandleToNumber


( hWndtblCustomer )

SalWindowIsDerivedFromClass
Syntax bOk = SalWindowIsDerivedFromClass( hWnd, ClassName )

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

Centura Builder Function Reference 2-203


Chapter 2

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

Parameters hWnd Window Handle. The handle (or name) of the window.

ClassName Symbol. The ClassName parameter is a symbol, not a string. Type the class
name without single quotes.

Return Value bOk is TRUE if the window is an instance of the named class or an instance of a class
that is derived from the named class.

Example Set bOk = SalWindowIsDerivedFromClass ( hWnd, ClassName )

SalWinHelp
Syntax bOk = SalWinHelp( hWnd, strFile, nCommand, nData,
strData )

Description Starts the Windows help system.

Use SalWinHelp to start a help system you created with the Microsoft Windows SDK. Centura sends a
SAM_Help message to the top-level object when the user presses the F1 key. Process this message
by calling SalWinHelp.

Parameters hWnd Window Handle. The handle (or name) of the window requesting
help.

strFile String. The file name of the help system file.

nCommand Number. The type of help requested; any HELP_* value.

nData Number. Specify zero (0) unless:

• nCommand is HELP_Context and nData is a context identifier


number.

• nCommand is HELP_SetIndex and nData specifies the current help


index.

strData String. The context or keyword string of the requested help topic. This
parameter is null unless nCommand is equal to HELP_Key.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

Example Call SalWinHelp ( hWndForm, 'CONTROL.HLP', HELP_Index, 0, '')

2-204 Centura Builder Function Reference


SalYieldEnable
Syntax bOk = SalYieldEnable ( bSet )

Description Enables or disables application yielding.

Parameters bSet Boolean. If TRUE, enable yielding; if FALSE, disable yielding.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

See Also SalYieldQueryState


SalYieldStartMessages
SalYieldStopMessages

Example Call SalYieldEnable ( FALSE )

SalYieldQueryState
Syntax bEnabled = SalYieldQueryState ( )

Determines whether application yielding is enabled or disabled.

Parameters No parameters.

Return Value bEnabled is TRUE if yielding is enabled, and FALSE if it is not.

See Also SalYieldEnable


SalYieldStartMessages
SalYieldStopMessages

Example Set bEnabled = SalYieldQueryState ()

SalYieldStartMessages
Syntax bOk = SalYieldStartMessages ( hWnd )

Description Enables yielding and the sending of messages to a window.

Enable yielding to give the user enough control to stop long operations. For example, if it takes a long time
to populate a table window, allow the user access to a Cancel push button to stop the query.

Parameters hWnd Window Handle. The handle (or name) of a window.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

See Also SalYieldEnable


SalYieldQueryState
SalYieldStopMessages

Centura Builder Function Reference 2-205


Chapter 2

Example Call SalYieldStartMessages ( pbCancel )

SalYieldStopMessages
Syntax bOk = SalYieldStopMessages ( )

Description Stops yielding and the sending of messages to the window specified in a prior call to
SalYieldStartMessages.

Parameters No parameters.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

See Also SalYieldEnable


SalYieldQueryState
SalYieldStartMessages

Example Call SalYieldStopMessages ()

SqlClearImmediate
Syntax bOk = SqlClearImmediate ( )

Description Disconnects the internal Sql Handle from a database.

You connect the internal handle to a database by calling SqlImmediate and it remains connected until the
application terminates or you explicitly disconnect it with SqlClearImmediate.

SqlClearImmediate causes an implicit COMMIT if it is the last cursor you disconnect from the database.

Parameters No parameters.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

See Also SqlImmediate

Example Set bOk = SqlClearImmediate ()

SqlClose
Syntax bOk = SqlClose ( hSql )

Description Invalidates a SQL command and/or frees the cursor name associated with the specified cursor,
making it available for re-use.

If you create a named cursor by calling SqlOpen and then instead of closing it, call SqlOpen or SqlExecute
again, you get an error that the name has already been used.

2-206 Centura Builder Function Reference


Parameters hSql Sql Handle. A handle that identifies a database connection.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

See Also SqlOpen

Example Set bOk = SqlClose ( hSql )

SqlCommit
Syntax bOk = SqlCommit ( hSql )

Description Commits all of the SQL transaction's cursors that are connected to the same database. NOTE: To prevent
destroying a cursor's result set when a COMMIT is performed, turn on cursor context preservation by calling
SqlSetParameter and setting the DBP_PRESERVE parameter to TRUE.

Parameters hSql Sql Handle. A handle that identifies a database connection.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

Example Call SqlCommit ( hSql )

SqlConnect
Syntax bOk = SqlConnect ( hSql )

Description Connects to a database.

Centura uses the values in the SqlDatabase, SqlUser, and SqlPassword variables. The default values for
these variables are DEMO, SYSADM, and SYSADM. The value of other system variables such as
SqlNoRecovery, SqlInMessage, and SqlOutMessage take effect after this function executes.

Parameters hSql Receive Sql Handle. A handle that identifies a database connection.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

See Also SqlDisconnect

Example Call SqlConnect ( hSqlPrimary )

Centura Builder Function Reference 2-207


Chapter 2

SqlContextClear
Syntax bOk = SqlContextClear ( hSql )

Description Clears the context set by SqlContextSet. Centura evaluates the bind and INTO variables associated
with the specified Sql Handle in the local context. For new applications, call SqlVarSetup instead of
this function.

Parameters hSql Sql Handle. A handle that identifies a database connection.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

See Also SqlContextSet


SqlContextSetTo Form

Example Set bOk = SqlContextClear ( hSql )

SqlContextSet
Syntax bOk = SqlContextSet ( hSql )

Description Sets the context for future processing (for example, calls to SqlPrepare, SqlFetchNext,
SqlFetchPrevious, and SqlFetchRow). Sql* functions you call after SqlContextSet behave as if they
are in the window identified by hWndForm. Call this function in a class to perform SQL processing for
the current window without fully qualifying bind and INTO variables. This function is also useful for
global functions.

Important: After you call SqlContextSet, the context for bind variables and INTO variables is always hWndForm.
If you call a Sql* function in an internal function, window function, or class function after calling
SqlContextSet, Centura does not recognize local variables or
Parameters that you use as bind variables and INTO
variables.

For new applications, call SqlVarSetup instead of this function.

Parameters hSql Sql Handle. A handle that identifies a database connection.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

See Also SqlContextClear


SqlContextSetTo Form

Example Set bOk = SqlContextSet ( hSql )

2-208 Centura Builder Function Reference


SqlContextSetToForm
Syntax bOk = SqlContextSetToForm ( hSql, hWndMyForm)

Description This function is like SqlContextSet, except for an additional parameter: SqlContextSet sets the context of
the Sql Handle to the window identified by hWndForm; SqlContextSetToForm sets the context of the Sql
Handle to the window you specify in the second parameter.

Call this function from a child table window when you want to set the context to the parent form window;
in this situation hWndForm refers to the child table window, not to the parent form window.

For new applications, call SqlVarSetup instead of this function.

See Also SqlContextClear


SqlContextSet

Example Set bOk = SqlContextSetToForm ( hSql, hWndMyForm)

SqlDirectoryByName
Syntax bOk = SqlDirectoryByName ( strServerName,
strArrayNames )

Description Returns the database names on the specified server.

Parameters strServerName String. The name of a server.

strArrayNames String Array. The name of an array of strings containing database


names.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

Example On SAM_AppStartup
Call SqlDirectoryByName ( 'server1', strDatabaseNames )

SqlDisconnect
Syntax bOk = SqlDisconnect ( hSql )

Description Disconnects from a database.

Disconnecting the last Sql Handle from a database causes an implicit COMMIT of the database.
Disconnect all Sql Handles before the application exits.

Parameters hSql Sql Handle. The handle that identifies the database connection to disconnect.

Centura Builder Function Reference 2-209


Chapter 2

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

See Also SqlConnect

Example On SAM_AppExit
Call SqlDisconnect ( hSqlPrimary )

SqlDropStoredCmd
Syntax bOk = SqlDropStoredCmd ( hSql, strName )

Description Deletes a stored command from a SQLBase database.

Parameters hSql Sql Handle. A handle that identifies a database connection.

strName String. The name of the stored command to delete.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

See Also SqlRetrieve


SqlStore

Example Call SqlDropStoredCmd ( hSqlPrimary, 'PRODUCTS )

SqlError
Syntax nError = SqlError ( hSql )

Description Returns the most recent error code for the specified Sql Handle. SqlError is not useful after a call to
SqlImmediate because SqlImmediate does not return a handle that you can use as the parameter for
SqlError.

Parameters hSql Sql Handle. The handle on which an error occurred.

Return Value nError is the error code returned. It is equal to zero (0) if no error occurred.

See Also SqlExtractArgs

Example Set nSqlError = SqlError ( hSqlPrimary )

SqlErrorText
Syntax bOk = SqlErrorText ( nError, nType, strError, nLength, nRealLength )

Description Gets the error reason or remedy for the specified error code from ERROR.SQL. Call SqlError to get the
most recent error code. When your application detects an error condition, you can use the error code
returned by SqlError to look up the error reason and remedy with SqlErrorText.

2-210 Centura Builder Function Reference


Parameters nError Number. A SQLBase error code.

nType Number. Specify one or both (by combining them with the OR (|) operator) of
these constants:

Constant Description

SQLERROR_Reason Retrieve error code reason.

SQLERROR_Remedy Retrieve error message remedy.

strError Receive String. The reason or remedy explanation.

nLength Number. The maximum length of strError.

nRealLength Receive Number. The actual length of strError.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

See Also SqlError


SqlGetErrorText
SqlGetErrorTextX

Example Set bOk = SqlErrorText ( nError, nType, strError, nLength,


nRealLength )

SqlExecute
Syntax bOk = SqlExecute ( hSql )

Description Executes a SQL statement that was prepared with SqlPrepare or retrieved with SqlRetrieve.

SqlExecute does not fetch data. To fetch data, call one of the SqlFetch* functions: SqlFetchNext,
SqlFetchPrevious, or SqlFetchRow. Bind variables are sent to the database when you call SqlExecute.
You can use SqlExecute just like SqlOpen, but you can never address rows in the result set by a cursor
name. That is, you cannot use the 'CURRENT OF <cursor_name>' and 'ADJUSTING <cursor_name>'
clauses to UPDATE, DELETE or INSERT result set rows.

Parameters hSql Sql Handle. The handle associated with a SQL statement.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

See Also SqlOpen

Example Call SqlExecute ( hSqlPrimary )

Centura Builder Function Reference 2-211


Chapter 2

SqlExecutionPlan
Syntax bOk = SqlExecutionPlan ( hSql, strString, nLength )

Description Gets the execution plan for a compiled SQL statement. An execution plan shows the tables, views, indexes,
and optimizations for the SQL statement. Tables and views are listed in the order in which they are
processed.

Parameters hSql Sql Handle. The handle associated with a compiled SQL statement.

strString String. The execution plan.

nLength Number. The maximum length of the execution plan.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

Example Set bOk = SqlExecutionPlan ( hSql, strString, nLength )

SqlExists
Syntax bOk = SqlExists ( strSelect, bExists )

Description Determines whether a row exists.

SqlExists uses the values of the SqlDatabase, SqlUser, and SqlPassword variables to connect to a
database, and uses an internal Sql Handle to execute the specified query.

Parameters strSelect String. The S ELECT statement that establishes the existence
of a row.

bExists Receive Boolean. TRUE if the row exists and FALSE if it does not.

Return Value bOk is TRUE if strSelect is correct and executable and FALSE otherwise.

Example Call SqlExists ( 'SELECT * FROM ' || strTable ||


'WHERE ' || strExistsColumn || ' = ' || '\'' ||
strExistsObject || '\'', bExists )

SqlExtractArgs
Syntax bOk = SqlExtractArgs ( wParam, lParam, hSql, nError,
nPos )

Description Extracts information from the SAM_SqlError wParam and lParam arguments. Call this function only while
processing a SAM_SqlError message which is sent when an error occurs while executing a SQL function.

2-212 Centura Builder Function Reference


Parameters wParam Number. The value of the wParam argument of the
SAM_SqlError message.

lParam Number. The value of the lParam argument of the


SAM_SqlError message.

hSql Receive Sql Handle. The handle of the function that got an error. Centura
extracts this value from the wParam argument.

nError Receive Number. The error code. Centura extracts this value from the
low-order word of the lParam argument.

nPos Receive number. The error position, if relevant to the function call. Centura
extracts this value from the high-order word of the lParam argument.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

See Also SqlError


SqlGetErrorPosition

Example Call SqlExtractArgs ( wParam, lParam, hSqlError, nSqlError,


nErrorPos )

SqlFetchNext
Syntax bOk = SqlFetchNext ( hSql, nInd )

Description Fetches the next row in a result set. You must have prepared the SELECT statement with SqlPrepare and
executed it with SqlExecute, or opened it with SqlOpen.

Parameters hSql Sql Handle. The handle of a SELECT statement.

nInd Receive Number. The fetch return code is one of the FETCH_* values.

Return Value bOk is TRUE if another row was fetched and FALSE if no row was fetched.
SqlFetchNext does not return FALSE and Fetch indicatior does not show EOF until you attempt to fetch
past the last row.

See Also SqlFetchPrevious


SqlFetchRow

Example Call SqlFetchNext ( hSqlPrimary, nRetVal )

Centura Builder Function Reference 2-213


Chapter 2

SqlFetchPrevious
Syntax bOk = SqlFetchPrevious ( hSql, nInd )

Description Fetches the previous row in a result set. You must have prepared the SELECT statement with
SqlPrepare and executed it with SqlExecute, or opened it with SqlOpen.

Parameters hSql Sql Handle. The handle of a SELECT statement.

nInd Receive Number. The fetch return code is one of the FETCH_* values.

Return Value bOk is TRUE if there is another row to fetch and FALSE otherwise.

See Also SqlFetchNext

SqlFetchRow

Example Call SqlFetchPrevious ( hSqlPrimary, nRetVal)

SqlFetchRow
Syntax bOk = SqlFetchRow ( hSql, nRow, nInd )

Description Fetches a row according to an absolute row position. You must have prepared the SELECT statement
with SqlPrepare and executed it with SqlExecute, or opened it with SqlOpen.

Parameters hSql Sql Handle. The handle of a SELECT statement.

nRoNumber. The row number of the row to fetch. nInd

Receive Number. The fetch return code is one of the FETCH_* values.

Return Value bOk is TRUE if nRow could be fetched and FALSE otherwise.

See Also SqlFetchNext


SqlFetchPrevious

Example Call SqlFetchRow ( hSqlPrimary, lParam, nRetVal )

SqlGetError
Syntax bOk = SqlGetError ( hSql, nError, strErrorString )

Description Turns off backend error mapping and reports real backend errors.

2-214 Centura Builder Function Reference


Parameters hSql Sql Handle. The handle of a SELECT statement.

nError Number. The error number.

strErrorString String. The error text.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

You specify the Sql Handle in hSql and SqlGetError returns the last error number and error text in nError
and strErrorString.

If the backend is SQLBase, this function does the same thing as calling SqlError and SqlGetErrorText.

Example Set bOk = SqlGetError ( hSql, nError, strErrorString )

SqlGetErrorPosition
Syntax bOk = SqlGetErrorPosition ( hSql, nPos )

Description Returns the offset of the error position within a SQL statement. After a SqlPrepare, the error position
points to the place in the SQL statement where Centura detected aSyntax error. The first character
position in the SQL statement is zero (0).

Parameters hSql Sql Handle. The handle of a SELECT statement.

nPos Receive Number. The position in the SQL statement where aSyntax error
occurred.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

See Also SqlExtractArgs

Example Call SqlGetErrorPosition ( hSqlPrimary, nErrorPos )

SqlGetErrorText
Syntax bOk = SqlGetErrorText ( nError, strText )

or

strText = SqlGetErrorTextX ( nError )

Description Gets the message text for a SQL error number from ERROR.SQL.

Parameters nError Number. The error number.

strText Receive String. The error text.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

strText is the message text for nError.

Centura Builder Function Reference 2-215


Chapter 2

See Also SqlErrorText


SqlExtractArgs

Example Call SqlGetErrorText ( nError, strText )

or

Set strText = SqlGetErrorTextX ( nError )

SqlGetErrorTextX
Syntax strText = SqlGetErrorTextX ( nError )
Description When the user chooses the Insert menu item, this example compiles a SQL statement
for execution. To process any invalid SQL statements and trap the error (bypassing the default error
processing), add the “When SqlError” statement with a FALSE return before the SqlPrepare. When
SqlPrepare returns FALSE, call SqlError to get the error number, call SqlGetErrorTextX to get the error
description, and call SqlGetErrorPosition to get the character position where theSyntax error was detected.

Example Set strErrorText = SqlGetErrorTextX ( nSqlError )

SqlGetLastStatement
Syntax sSqlStatement = SqlGetLastStatement ()

Description Returns the last SQL statement passed to a SqlXxxx function for any cursor. The statement returned is
the same statement that would be shown in the default SQL Error dialog box.

Note: The statement is global for all cursors, therefore, if you get a SQL error after another cursor has had a statement
prepared the statement returned may not be the one prepared for the handle.

Parameters No parameters.

Return Value sSqlStatement contains the last SQL statement.

Example When SqlError


Set sStatement = SqlGetLastStatement ()

2-216 Centura Builder Function Reference


SqlGetModifiedRows
Syntax bOk = SqlGetModifiedRows ( hSql, nCount )

Description Returns the number of rows affected by the most recent INSERT, UPDATE, or DELETE statement.

Parameters hSql Sql Handle. The handle of a SQL statement.

nCount Receive Number. The number of rows affected.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

Example Set bOk = SqlGetModifiedRows ( hSql, nCount )

SqlGetParameter
Syntax bOk = SqlGetParameter ( hSql, nParameter, nNumber,
strString )

Description Gets the value of a database parameter. This function returns the parameter value in nNumber or strString
as appropriate for the data type of the parameter.

Parameters hSql Sql Handle. A handle that identifies a database connection.

nParameter Number. The database parameter. Specify one of the DBP_* constants.

nNumber Receive number. The value (TRUE or FALSE) of the parameter.

If nParameter is DBP_BRAND, nNumber is one of the


DBV_BRAND_* values.

strString Receive string. If you specify DBP_VERSION in nParameter, this is the


version number.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

See Also SqlGetParameterAll


SqlSetParameter
SqlSetParameterAll

Example On SAM_AppStartup
Call SqlGetParameter ( hSqlPrimary, DBP_LOCKWAITTIMEOUT,
nTimeout, strNull )

Centura Builder Function Reference 2-217


Chapter 2

SqlGetParameterAll
Syntax bOk = SqlGetParameterAll ( hSql, nParameter, nNumber, strString, bNumber )

Description Gets the value of a database parameter identified by a SQLP* constant value defined in SQL.H. This
function returns the parameter value in nNumber or strString as appropriate for the data type of the
parameter.

Important: A set of the SQLP* constants in SQL.H have the same values as the DBP_* constants, but
the values identify different parameters. Be sure to specify the correct number.

Parameters hSql Sql Handle. A handle that identifies a database connection.

nParameter Number. The database parameter. Specify the value of one of the SQLP*
constants defined in SQL.H.

nNumber Receive number. The value of nparameter it it is a number. Receive string.

The value of nParameter if it is a string.

bNumber Boolean. If TRUE, the parameter value is returned in nNumber. If


FALSE, the parameter value is returned in strString.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

See Also SqlGetParameter


SqlSetParameter
SqlSetParameterAll

Example Set bOk = SqlGetParameterAll ( hSql, nParameter, nNumber,


strString, bNumber )

SqlGetResultSetCount
Syntax bOk = SqlGetResultSetCount ( hSql, nCount )

Description Counts the rows in a result set by building the result set. Centura fetches each row that has not already been
fetched, returns a count of the rows, and positions the cursor back to its original position. Warning: this can
be time-consuming if the result set is large.

INSERTs into the result set increase the result set row count, but D ELETEs — which
display as blank rows in result set mode — do not decrease the row count. However, the deleted blank
rows disappear on the next SELECT. You must be in Result Set mode.

2-218 Centura Builder Function Reference


You must call SqlExecute before SqlGetResultSetCount.

Parameters hSql Sql Handle. A handle associated with a result set.

nCount Receive Number. The number of rows in the result set.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

Example Actions
Call SqlPrepare ( hSqlPrimary, strSqlTblWindow ) Call
SqlExecute ( hSqlPrimary ) Call SqlGetResultSetCount
( hSqlPrimary, nRowCount )

SqlGetRollbackFlag
Syntax bOk = SqlGetRollbackFlag ( hSql, bRollbackFlag )

Description Returns the database rollback flag. Use this function after an error to find out if a transaction rolled
back.

Centura sets the rollback flag when a system-initiated rollback occurs as the result of a deadlock or system
failure. Centura does not set the rollback flag on a user-initiated rollback.

Parameters hSql Sql Handle. The handle associated with the function call that got an error.

bRollbackFlag Receive Boolean. TRUE if a rollback occurred and FALSE otherwise.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

Example Call SqlGetRollbackFlag ( hSqlError, bRollbackFlag )


If bRollbackFlag
! Execute code to handle rolled back !
transaction

SqlImmediate
Syntax bOk = SqlImmediate ( strSqlCommand )

Description Prepares and executes a SQL statement.

SqlImmediate actually performs a SqlConnect, a SqlPrepare, a SqlExecute, and for SELECT statements,
a SqlFetchNext. The first time you call SqlImmediate, Centura performs all of these functions. On later
calls, SqlConnect is not performed if not needed.

Centura Builder Function Reference 2-219


Chapter 2

Use SqlImmediate with INSERT, UPDATE, DELETE, and other non-query SQL commands. You
can use SqlImmediate with a SELECT statement if you expect that
the statement only returns one row.

SqlImmediate manages Centura' internal handle. It uses the values of the SqlDatabase, SqlUser, and
SqlPassword system variables to connect to a database. Any command that you execute with
SqlImmediate, you can also execute with explicit calls to SqlConnect, SqlPrepare, SqlExecute or SqlOpen,
and SqlFetchNext, for SELECTs.

Parameters strSqlCommand String. The SQL statement to prepare and execute. This statement cannot
have more than 128 bind variables and more than 128 INTO variables.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

See Also SqlClearImmediate

Example Call SqlImmediate ( 'INSERT INTO COMPANY ( COMPANY )' ||'VALUES


( :frmMain dfCompany )' )

SqlImmediateContext
Syntax bOk = SqlImmediateContext ( strSqlStatement )

Description Prepares and executes a SQL statement, and evaluates any bind or INTO variables in the context of the
window identified by hWndForm.

Call this function in a class to perform SQL processing for the current window without fully
qualifying bind and INTO variables. This function is also useful for global functions.

Important: When you call SqlImmediateContext, the context for bind variables and INTO variables is
always hWndForm. If you call SqlImmediateContext in an internal function, window function, or class
function, Centura does not recognize local variables or parameters that you use as bind variables and
INTO variables.

Parameters strSqlStatement String. A SQL statement.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

See Also SqlContextClear


SqlContextSet

Example Set bOk = SqlImmediateContext ( strSqlStatement )

2-220 Centura Builder Function Reference


SqlOpen
Syntax bOk = SqlOpen ( hSql, strCursorName )

Description Names a cursor and executes a SQL statement. Use this function to perform INSERTs,
UPDATEs, and DELETEs on the current row. Call SqlOpen after SqlPrepare and before any of
the SqlFetch* commands.

Parameters hSql Sql Handle. The handle associated with the SqlPrepare.

strCursorName String. A string containing the cursor name. Specify this name in the
'CURRENT OF <cursor_name>' or 'ADJUSTING <cursor_name>' clause of
an INSERT, UPDATE, or DELETE statement.

The value of this parameter is case insensitive. You can set it to null using the
empty string ('').

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

See Also SqlClose


SqlExecute

Example Set bOk = SqlOpen ( hSql, strCursorName )

SqlPLSQLCommand
Syntax bOk = SqlPLSQLCommand ( hSqlHandle, strCommand )

Description Use this function to execute PL/SQL stored procedures in Centura. Call it once for each invocation of
PL/SQL.

The first argument identifies the SQL Handle to the database. The second parameter is a command string
used to invoke a PL/SQL stored procedure. Like a stored procedure call, this command string must have a
name.

You can use PL/SQL IN variables the same way you use any other parameter in SAL function calls.

PL/SQL OUT or IN/OUT variables must be valid SAL receive parameters and, like SAL receive
parameters, are set when the call returns. You can use arrays for IN, OUT, and IN/OUT parameters.

IN/OUT parameters can be made to pass data to the PL/SQL stored procedure and to receive data from a
PL/SQL stored procedure in the same parameter.

Centura Builder Function Reference 2-221


Chapter 2

Note: The SqlPLSQLCommand supports Centura dynamic arrays as input, output and input/ output arguments to
Oracle7 PL/SQL stored procedures. Dynamic arrays of type NUMBER, STRING and DATE/TIME are supported.

Dynamic Arrays as INPUT arguments

Dynamic arrays grow to the size of the largest index value used in an assignment statement using the
dynamic array variables. For example: nDynvar[0] = 0 nnDynVar[1]= 1 nDynvar[9] = 9

causes nDynVar to be a dynamic array of 10 elements.

When a dynamic array is passed as an INPUT argument to a PL/SQL stored procedure via
SqlPLSQLCommand the number of elements created on the front-end are available on the backend. Thus
in the backend stored procedure:

“insert into foo values(nDynVar(9))” will insert the value 9 into the table, while the statement
“insert into foo values(nDynVar(10))” will cause an error “Attempting to fetch beyond
end of result set”.

Uninitialized values

Dynamic array values are not initialized on the front-end, but falling within the range of a dynamic array
created on the front-end are passed as NULL for datatypes STRING and DATE/TIME and as zero for
datatype NUMBER. To pass NUMBER as a NULL, the user must explicitly assign them as NUMBER_Null
on the front-end;

Dynamic Arrays as OUTPUT arguments

The size of output arguments of type dynamic array is determined in the backend stored procedure .

For example: sOutVar(1):= ‘abc’; sOutVar(10) := ‘def’;

returns an array of size 10 to the front-end program.

Uninitialized values

Values for output arguments are not initialized on the backend, but are returned as NULL values.

2-222 Centura Builder Function Reference


Dynamic Arrays as INPUT/OUTPUT arguments

INPUT / OUTPUT dynamic arrays behave as INPUT dynamic arrays on input and as OUTPUT dynamic
arrays on OUTPUT.

Parameters hSqlHandle Sql Handle. The connected SQL Handle to an Oracle database.

strCommand String. Command string used to invoke a PL/SQL procedure.

Return Value bOK is TRUE if the function succeeds and FALSE if it fails.

Example If NOT SqlPLSQLCommand( hSql, 'INVOICES.INSERT_INVOICE


(ninv_id, strClient, dt_inv_dt, nitem_No, nQnty, nAmt,
nNum)' )
Set nSqlError = SqlError ( hSql ! See ORACLE DOCUMENTATION ! for Error
Listings

Note: If SqlPLSQLCommand receives an ‘Invalid Object’ error from ORACLE when


executing a stored procedure, this means that a table referenced by the procedure was modified. To fix this problem, you
need to force a recompile of that procedure. SqlPlSQLCommand does not automatically do this.

SqlPrepare
Syntax bOk = SqlPrepare ( hSql, strSqlStatement )

Description Compiles a SQL statement for execution. Compiling includes:

• Checking theSyntax of the SQL statement.

• Checking the system catalog.

• Processing a SELECT statement's INTO clause.

An INTO clause names where data is placed when it is fetched. These variables are
sometimes called INTO variables. You can specify up to 255 INTO variables per SQL
statement.

• Identifying bind variables in the SQL statement. Bind variables contain input data for the
statement. You can specify up to 2558 bind variables per SQL statement.

Follow this function with a SqlOpen, SqlExecute, SalTblDoInserts,


SalTblDoUpdates , or SalTblDoDeletes , or fetches.

Parameters hSql Sql Handle. A handle that identifies a database connection.

strSqlStatement String. The SQL statement to compile.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

Centura Builder Function Reference 2-223


Chapter 2

See Also SqlExecute

Example Call SqlPrepare ( hSqlPrimary, 'INSERT INTO CUSTOMER '


|| ' ( CUSTOMER ) VALUES ' ||'(
:frmCustomer.dfCustomer )' )

SqlPrepareAndExecute
Syntax bOk = SqlPrepareAndExecute ( hSql, strSqlStatement )

Description Compiles and executes a SQL statement. Compiling includes:

• Checking theSyntax of the SQL statement.

• Checking the system catalog.

• Processing a SELECT statement's INTO clause.

An INTO clause names where data is placed when it is fetched. These variables are
sometimes called INTO variables. You can specify up to 128 INTO variables per SQL
statement.

• Identifying bind variables in the SQL statement. Bind variables contain input data for the
statement. You can specify up to 128 bind variables per SQL statement.

Parameters hSql Sql Handle. A handle that identifies a database connection.

strSqlStatement String. The SQL statement to compile and execute.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

See Also SqlExecute


SqlPrepare

Example Set bOk = SqlPrepareAndExecute ( hSql, 'Select name from' || '


employees into :df1' )
If bOk
Call SqlFetchNext ( hSql, nInd )

2-224 Centura Builder Function Reference


SqlRetrieve
Syntax bOk = SqlRetrieve ( hSql, strName, strBindList, strIntoList )

Description Retrieves a SQLBase compiled command.

To execute the command, you need only call SqlExecute. You do not need to compile the command with
SqlPrepare because the command is compiled when it is stored with SqlStore.

Parameters hSql Sql Handle. A handle that identifies a database connection.

strName String. The name of the compiled command.

strBindList String. A comma-separated list of up to 128 Centura bind variables. This


list has the same number of variables as the compiled command. This
string can be null.

strIntoList String. A comma-separated list of up to 128 Centura INTO variables. This list
has the same (or less) number of INTO variables as named in the SELECT
list of the compiled command. This string can be null (''), and should be null if
the next command being executed is SalListPopulate.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

See Also SqlDropStoredCmd


SqlStore

Example Call SqlRetrieve ( hSqlPrimary, 'PRODUCTS', ':nPrice',


':strLBItem' )

SqlSetInMessage
Syntax bOk = SqlSetInMessage ( hSql, nSize )

Description Sets the size (in bytes) of the input message buffer for the specified Sql Handle. The input message buffer
holds input for the application (such as the result of a query). There is one input message buffer per
connected Sql Handle on the client computer. The database server (or gateway) maintains one input
message buffer that is the size of the largest input message buffer on the client computer.

When fetching data, as many rows as possible are compacted into one input message buffer. Each FETCH
reads the next row from the input message buffer until they are exhausted. At this point, if you are accessing
a SQLBase database, SQLBase transparently fetches the next input buffer of rows depending on the
isolation level.

Centura Builder Function Reference 2-225


Chapter 2

A large input message buffer can improve performance because it reduces the number of network messages
between the client and server. A large input message buffer can have a negative impact on concurrency,
however, because any row currently in the buffer can have a shared lock on it (depending on the isolation
level) which prevents other users from changing that row.

Parameters hSql Sql Handle. A handle that identifies a database connection.

nSize Number. The size (in bytes) of the input message buffer that you want to set.
The default is 1 Kbyte and the maximum is 32 Kbtyes.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

See Also SqlSetOutMessage

Example On SAM_AppStartup
Call SqlConnect ( hSqlPrimary ) Call SqlSetInMessage

( hSqlPrimary, 10000 )

SqlSetIsolationLevel
Syntax bOk = SqlSetIsolationLevel ( hSql, strIsolation )

Description Sets SQLBase's isolation level for all the application's cursors. Read

Repeatability is the default setting for Centura.

Changing isolation levels causes an implicit commit of the database. The isolation level you set applies
to all the Sql Handles for that user name that the application connects to the database.

Parameters hSql Sql Handle. A handle that identifies a database connection.

strIsolation String. The isolation level to set. Specify one of these values: CS Cursor
Stability RL Release Locks RO Read Only RR Read Repeatability

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

Example On SAM_AppStartup
Call SqlSetIsolationLevel ( hSqlPrimary, 'RL' )

2-226 Centura Builder Function Reference


Centura Builder Function Reference

SqlSetLockTimeout
Syntax bOk = SqlSetLockTimeout ( hSql, nTimeout )

Description Specifies the maximum time to wait to acquire a lock. After the specified time elapses, a timeout
occurs and the transaction rolls back.

Parameters hSql Sql Handle. A handle that identifies a database connection; the cursor on which
you want to set a lock timeout value.

nTimeout Number. The timeout period in seconds. Valid values include 1 (wait forever),
0 (never wait), and values up to and including 1800 (30 minutes). The default
is 300.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

Example On SAM_AppStartup Call SqlSetLockTimeout

( hSqlPrimary, 10 )

SqlSetLongBindDatatype
Syntax bOk = SqlSetLongBindDatatype( nBindVarNumber, nDatatype )

Description Sets the type of column (text or binary) that a Long String binds to. By default, Centura binds Long Strings
to text columns. However, when you write or update a long binary column, call SqlSetLongBindDatatype
and set the nDatatype parameter to binary (value = 23). Later you can set the type back to text by calling
this function and setting nDatatype to text (value = 22). Value = 24 is for Informix and Ingres specific
routers.

Call this function before executing the SQL statement (implicitly or explicitly) because Centura
compiles bind variables at execute time.

Use this function until Centura Software Corporation implements a native SAL binary long data type.

Parameters nBindVarNumber Number. The bind variable to set. The first bind variable in the SQL statement
is 1, the second is 2, and so on.

nDatatype Number. The data type: 22 =

text 23 = binary

24 = char \ long varchar > 254


Return Value bOk is TRUE if this function succeeds and FALSE if it fails.

Example Call SqlSetLongBindDatatype ( 1, DT_Binary )

Centura Builder Function Reference 2-227


Chapter 2

SqlSetOutMessage
Syntax bOk = SqlSetOutMessage ( hSql, nSize )

Description Sets the size (in bytes) of the output message buffer for a specified Sql Handle. The output message buffer
holds output from the application (such as a SQL command to compile or rows of data to insert into a
database).

There is an output message buffer for each connected Sql Handle on the client computer. At the same time,
the database server (or gateway) maintains an output message buffer that is the size of the largest of its
clients' output message buffers. A large output message buffer does not necessarily improve performance
because the buffer only needs to be large enough to hold the largest SQL command to compile or the largest
row of data to insert. (Rows are always sent to the database and inserted individually.) A large output
message buffer can allocate space unnecessarily on both the client and the server, and it does not reduce
network traffic.

Parameters hSql Sql Handle. A handle that identifies a database connection.

nSize Number. The size (in bytes) of the output message buffer. The default is 1
Kbyte and the maximum is 32 Kbytes.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

See Also SqlSetInMessage

Example On SAM_AppStartup
Call SqlConnect ( hSqlPrimary ) Call SqlSetOutMessage ( hSqlPrimary,

1500 )

SqlSetParameter
Syntax bOk = SqlSetParameter ( hSql, nParameter, nNumber, strString )

Description Sets the value of a database parameter. Use the number (nNumber) and string (strString)
arguments as appropriate for the data type of the parameter.

Parameters hSql Sql Handle. A handle that identifies a database connection.

nParameter Number. The database parameter to set. Specify one of the DBP_*
constants.

nNumber Number. The value of nParameter. Specify TRUE or FALSE for all but
DBP_LOCKWAITTIMEOUT, for which you must specify a value in seconds.

strString String. The value of nParameter.

2-228 Centura Builder Function Reference


Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

See Also SqlGetParameter


SqlGetParameterAll
SqlSetParameterAll

Example Call SqlSetParameter ( hSqlPrimary, DBP_PRESERVE, TRUE,


strNull )

SqlSetParameterAll
Syntax bOk = SqlSetParameterAll ( hSql, nParameter, nNumber, strString, bNumber )

Description Sets the value of a database parameter identified by a SQLP* constant value defined in SQL.H. This
function uses the number (nNumber) and string (strString) parameters as appropriate depending on the
data type of the value of the parameter.

Parameters hSql Sql Handle. The handle that identifies a database connection.

nParameter Number. The database parameter to set. Specify the value of one of the
SQLP* constants defined in SQL.H.

nNumber Number. The value of nParameter if it is a number.

strString String. The value of nParameter if it is a string.

bNumber If TRUE, the parameter value is in nNumber. If FALSE, the parameter


value is in strString.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

See Also SqlGetParameter


SqlGetParameterAll
SqlSetParameter

Example Set bOk = SqlSetParameterAll ( hSql, nParameter, nNumber,


strString, bNumber )

SqlSetResultSet
Syntax bOk = SqlSetResultSet ( hSql, bSet )

Description Turns result set mode on or off. Result set mode is on

by default in Centura.

Parameters hSql Sql Handle. A handle that identifies a database connection.

bSet Boolean. Turns result set mode on (TRUE) or off (FALSE).

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

Centura Builder Function Reference 2-229


Chapter 2

Example Call SqlSetResultSet ( hSqlPrimary, FALSE )

SqlStore
Syntax bOk = SqlStore ( hSql, strName, strSqlCommand )

Description Stores and names a SQLBase compiled SQL statement.

You do not need to call SqlPrepare before calling SqlStore. SqlStore compiles the SQL statement.

You can specify up to 128 bind variables. Use numeric bind variables in the SQL statement, not
variable names. For example: "SELECT * FROM PRESIDENT WHERE LASTNAME = :1 AND AGE >
:2;".

When you retrieve the stored command with SqlRetrieve, you specify the bind variable names in the INTO
clause. For example, specify ‘:dfLastName’ and ‘:dfAge’ where dfLastName and dfAge are data fields on a
form window. Before Centura performs a SQL execute or fetch operation, it compiles the bind and into
variables which is looking up the symbols and generating the code that gets the values (for bind variables)
or that fetches the values (for an into variable). By default, Centura compiles:

• Bind variables at execute time

• Into variables at fetch time

You can change this default behavior by calling SqlVarSetup which saves the current execution context.
When you execute or fetch later, Centura uses that execution context to resolve references to bind variables
and into variables. This means that you can use bind and into variables in a different context than where you
call Sql* functions. You must call SqlPrepare for the Sql Handle before you call SqlVarSetup. Use this
function to write:

• Global functions that store bind and into variables in local variables

• A hierarchy of classes where a base class can prepare and fetch and a derived class can specify
the into variables

This function does not affect the lifetime of the bind and into variables and does not guarantee that the
variables will exist when you execute or fetch. You must ensure that the variables are still valid when you
use them.

Parameters hSql Sql Handle. A handle that identifies a database connection.

strName String. The name of the stored command.

strSqlCommand String. The SQL statement to compile and store.

Return Value bOk is TRUE if the function succeeds and FALSE if it fails.

2-230 Centura Builder Function Reference


See Also SqlDropStoredCmd
SqlRetrieve

Example Set bOk = SqlStore ( hSql, strName, strSqlCommand )

VisArrayAppend
Syntax nNumItems = VisArrayAppend ( hArySource, hAryTarget, nDataType) Number | String |
Date/Time: hArySource[*] Number | String | Date/Time: hAryTarget[*] Number:
nDataType

Description Appends one array onto the end of another array. The source and target arrays must be defined as dynamic
arrays, must be the same data type, and cannot be multidimensional arrays.

Parameters hArySource Source array to append onto the end of the target.

hAryTarget Target array, source array will be appended onto this array.

nDataType Data type of both arrays. Options are:


DT_Boolean DT_DateTime DT_Number
DT_String DT_Handle

Return Number: The number of total items in the target array after the append operation, if successful, or
negative if an error occurs.

Example Variables:
String: sSource[*]
String: sTarget[*]
... Actions

Set sSource[0] = "Source #1" Set

sSource[1] = "Source #2" Set

sTarget[0] = "Target #1" Call VisArrayAppend

(sSource, sTarget, DT_String)


! sTarget contains 'Target #1' !
'Source #1' ! 'Source #2'

Centura Builder Function Reference 2-231


Chapter 2

VisArrayCopy
Syntax nNumItems = VisArrayCopy ( hArySource, hAryTarget, nDataType) Number | String |
Date/Time: hArySource[*] Number | String | Date/Time: hAryTarget[*] Number:
nDataType

Description Copies one array into another. After this call the two arrays will be identical. The source and target arrays
must be defined as dynamic arrays, must be the same data type, and cannot be multi-dimensional arrays.

Parameters hArySource Source array to copy into the target.

hAryTarget Target array, source array will be copied into this array, replacing its
current contents.

nDataType Data type of both arrays. Options are:


DT_Boolean DT_DateTime DT_Number
DT_String DT_Handle

Return Number: The number of items in the target array, if successful, or negative if an error occurs.

Example Variables:
String: sSource[*]
String: sTarget[*]
... Actions

Set sSource[0] = "Source #1" Set

sSource[1] = "Source #2" Set

sTarget[0] = "Target #1" Call VisArrayCopy

(sSource, sTarget, DT_String)


! sTarget contains 'Source #1' !
'Source #2'

2-232 Centura Builder Function Reference


VisArrayDeleteItem
Syntax nNumItems = VisArrayDeleteItem ( hAry, nIndex, nDataType) Number | String
| Date/Time: hAry[*] Number: nIndex Number: nDataType

Description Deletes an item from an array. All subsequent items will be moved up in the array. The array cannot be
a multi-dimensional array.

Parameters hAry Array to delete item from.

nIndex Index of item to delete.

nDataType Data type of the array. Options are:


DT_Boolean DT_DateTime DT_Number
DT_String DT_Handle

Return Number: The number of items in the array after the deletion, if successful, or negative if an error occurs.

Example Variables
String: sString[*]
... Actions

Call VisArrayDeleteItem (sString, 3, DT_String)

VisArrayFillDateTime
Syntax bOk = VisArrayFillDateTime ( dtDateTimes, dtValue, nCount) Date/Time:
dtDateTimes[*] Date/Time: dtValue Number: nCount

Description Fills a Date/Time array with a specified date/time value. This function is useful for initializing an array.
The array cannot be a multi-dimensional array.

Parameters dtDateTimes Date/Time array to fill.

dtValue Value to fill in each element of array.

nCount Number of items to fill.

Return Boolean: TRUE if successful, or FALSE if an error occurs.

Centura Builder Function Reference 2-233


Chapter 2

Example Variables
Date/Time: dtSample[*]
... Actions

Call VisArrayFillDateTime (dtSample, DATETIME_Null, 5)

VisArrayFillNumber
Syntax bOk = VisArrayFillNumber ( nNumbers, nValue, nCount) Number:
nNumbers[*] Number: nValue Number: nCount

Description Fills a number array with a specified value. This function is useful for initializing an array. The array
cannot be a multi-dimensional array.

Parameters nNumbers Number array to fill.

nValue Value to fill in each element of array.

nCount Number of items to fill.

Return Boolean: TRUE if successful, or FALSE if an error occurs.

Example Variables
Number: nSample[*]
... Actions

Call VisArrayFillNumber (nSample, NUMBER_Null, 5)

VisArrayFillString
Syntax bOk = VisArrayFillString ( sStrings, sValue, nCount) String:
sStrings[*] String: sValue Number: nCount

Description Fills a string array with a specified string. This function is useful for initializing an array. The array
cannot be a multi-dimensional array.

Parameters sStrings String array to fill.

sValue String value to fill in each element of array.

nCount Number of items to fill.

Return Boolean: TRUE if successful, or FALSE if an error occurs.

2-234 Centura Builder Function Reference


Related Functions

Example Variables
String: sSample[*]
... Actions

Call VisArrayFillString (sSample, '', 5)

VisArrayFindDateTime
Syntax nIndex = VisArrayFindDateTime ( dtDateTimes, dtSearchFor) Date/Time:
dtDateTimes[*] Date/Time: dtSearchFor

Description Locates a date/time value within an array. The array cannot be a multi-dimensional array.

Parameters dtDateTimes Date/Time array to search.

dtSearchFor Date/Time value to search for.

Return Number: The index of the item found, if successful, or negative if not found.

Variables
Date/Time: dtMyDates[*]
Number: nIndex
... Actions

! Populate Array Set


nIndex = VisArrayFindDateTime (dtMyDates, 10/10/88)
If nIndex >= 0 !

Item found Else

! Item not found

VisArrayFindNumber
Syntax nIndex = VisArrayFindNumber ( nNumbers, nSearchFor) Number:
nNumbers[*] Number: nSearchFor

Description Locates a number within an array. The array cannot be a multi-dimensional array.

Parameters nNumbers Number array to search.

Centura Builder Function Reference 2-235


Chapter 2

nSearchFor Number to search for.

Return Number: The index of the item found, if successful, or negative if not found.

Variables
Number: nMyNumbers[*]
Number: nIndex
... Actions

! Populate Array Set


nIndex = VisArrayFindNumber (nMyNumbers, 76)
If nIndex >= 0
! Item found

Else

! Item not found

VisArrayFindString
Syntax nIndex = VisArrayFindString ( sStrings, sSearchFor) String:
sStrings[*] String: sSearchFor

Description Locates a string within an array. The entire specified string is compared to each array item. The array
cannot be a multi-dimensional array.

Parameters sStrings String array to search.

sSearchFor String to search for.

Return Number: The index of the item found, if successful, or negative if not found.

Example Variables
Number: nMyString[*]
Number: nIndex
... Actions

! Populate Array Set


nIndex = VisArrayFindString (nMyNumbers, 'Marc')
If nIndex >= 0
! Item found

Else

! Item not found

2-236 Centura Builder Function Reference


VisArrayInsertItem
Syntax nNumItems = VisArrayInsertItem ( hAry, nIndex, nDataType) Number | String
| Date/Time: hAry[*] Number: nIndex Number: nDataType

Description Inserts an item into an array. All subsequent items will be moved down in the array. The inserted item is
initialized to a null value. The array cannot be a multidimensional array.

Parameters hAry Array to insert item into.

nIndex Index number where item should be inserted.

nDataType Data type of the array. Options are:


DT_Boolean DT_DateTime DT_Number
DT_String DT_Handle

Return Number: The number of items in the array after the insertion, if successful, or negative if an error
occurs.

Related Functions

VisArrayDeleteItem

Example Variables
String: sString[*]
... Actions

! Populate Array Call VisArrayInsertItem

(sString, 3, DT_String)

VisArraySort
Syntax nNumItems = VisArraySort ( hAry, nSortOrder, nDataType) Number |
String | Date/Time: hAry[*] Number: nSortOrder Number: nDataType

Description Sorts an array in either ascending or descending order. The array cannot be a multidimensional array.

Parameters hAry Array to sort.

Centura Builder Function Reference 2-237


Chapter 2

nSortOrder Flag indicating sort order.

SORT_Ascending

SORT_Descending
nDataType Indicates the data type for the array.

Return Number: The number of items in the array, if successful, or negative if an error occurs.

Example Variables
String: sDirs[*]
... Actions

Call VisArraySort (sDirs, SORT_Ascending, DT_String)

VisDebugAssert
Syntax bOk = VisDebugAssert ( bExpression, sDebugString) Boolean:
bExpression String: sDebugString

Description Asserts that a condition is true. If expression is FALSE, the debug message specified will be displayed in a
message box. This function is typically used in a development environment to provide an indication that an
internal, potentially fatal, error occurred.

Parameters bExpression Condition to be tested. The condition may be a constant, expression, or


variable.

sDebugString Debug message to display if condition is FALSE. The Centura name of the
current window will be prepended to sDebugString before displaying.

Return Boolean: Always returns TRUE.

Example Variables
Window Handle: hWnd
... Actions

Set hWnd = SalCreateWindow (dbTest, dbParent) Call VisDebugAssert

(hWnd, 'dbTest not created')

2-238 Centura Builder Function Reference


VisDebugBeginTime
Syntax bOk = VisDebugBeginTime ()

Description Begins timing an operation. VisDebugBeginTime must be called before


VisDebugSetTime or VisDebugEndTime.

Parameters No parameters.

Return Boolean: Always returns TRUE.

Related Functions

VisDebugEndTime, VisDebugSetTime

Example Actions
Call VisDebugBeginTime ()
Call SqlPrepare (hSql, 'Select...') Call
VisDebugSetTime ('SqlPrepare') Call
SqlExecute (hSql)
Call VisDebugSetTime ('SqlExecute')

VisDebugEndTime
Syntax bOk = VisDebugEndTime ( sContext, nDebugLevel) String: sContext Number:
nDebugLevel

Description Stops recording the time and displays all incremental times and the total time. All times are displayed in
the debug application window (DBWIN.EXE) or in a message box depending on the current debug flags.

Parameters sContext Context string describing the total time.

nDebugLevel Minimum debug level before performance time will be displayed. Specify zero
to always display the message. Typically, the higher the debug level, the
greater the number of debug messages displayed.

Return Boolean: Always returns TRUE.

Related Functions

VisDebugBeginTime, VisDebugSetTime

Example Actions
Call VisDebugBeginTime () Call
SqlPrepare (hSql, 'Select...')

Centura Builder Function Reference 2-239


Chapter 2

Call VisDebugSetTime ('SqlPrepare') Call


SqlExecute (hSql)
Call VisDebugSetTime ('SqlExecute') Set nRow
=0
While SqlFetchRow (hSql, nRow)
...
Call VisDebugSetTime ('SqlFetchRow') Call VisDebugEndTime

(' Query #1', 0)

VisDebugGetFlags
Syntax nDebugFlags = VisDebugGetFlags ()

Description Retrieves the current debug flags.

Parameters No parameters.

Return Number: The current debug bit flags. To test a bit flag, use the bitwise AND (&) operator.

DBF_IncrementalTime
DBF_RealTime
DBF_MessageBox

Related Functions

VisDebugSetFlags

Example Variables
Number: nDebugFlags
... Actions

Set nDebugFlags = VisDebugGetFlags ()


If nDebugFlags & DBF_MessageBox
...

VisDebugSetFlags
Syntax bOk = VisDebugSetFlags ( nDebugFlags, bMode) Number: nDebugFlags Boolean: bMode

Description Sets debug flags.

Parameters nDebugFlags Bit flags to set or clear. May be any of the following:

DBF_IncrementalTime

2-240 Centura Builder Function Reference


DBF_RealTime
DBF_MessageBox
bMode TRUE to set the flags, FALSE to clear the flags.

Return Boolean: Always returns TRUE.

Related Functions

VisDebugGetFlags

Example Actions
Call VisDebugSetFlags (DBF_MessageBox, TRUE)

VisDebugSetLevel
Syntax bOk = VisDebugSetLevel ( nDebugLevel) Number: nDebugLevel

Description Sets the current debug level. The debug level allows selective debug messages to be displayed.

Parameters nDebugLevel Current debug level. Debug messages must be equal or greater than the current
debug level to be displayed.

Return Boolean: Always returns TRUE.

Example Actions
Call VisDebugSetLevel (0)

VisDebugSetTime
Syntax bOk = VisDebugSetTime ( sContext) String:
sContext

Description Records the time since the last VisDebugSetTime or VisDebugBeginTime call. This
function records an incremental time. The time will not be displayed in the debug application until a VisDebugEndTime
call is made. The context string will be displayed to the left of the time.

Parameters sContext Context string describing the time interval.

Return Boolean: Always returns TRUE.

Related Functions

VisDebugBeginTime, VisDebugEndTime

Example Set bOk = VisDebugSetTime (sContext)

Centura Builder Function Reference 2-241


Chapter 2

VisDebugString
Syntax bOk = VisDebugString ( sDebugString, nDebugLevel) String:
sDebugString Number: nDebugLevel

Description Writes a string to the debug application window. If the debug application is not
running, this function performs no action. If the DBF_MessageBox flag is set, a message box will be
displayed.

Parameters sString String to write to debugging terminal.

nDebugLevel Debug level. Specify zero to always display the message. Typically, the higher
the debug level, the greater the number of debug messages displayed.

Return Boolean: Always returns TRUE.

Related Functions

VisDebugSetLevel

Example Pushbutton: pbOk


...
Message Actions On SAM_Click

Call VisDebugString

('SAM_Click in pbOk', 0)

VisDosBuildFullName
Syntax sFullName = VisDosBuildFullName ( sModuleName, sFileName) String:
sModuleName String: sFileName

Description Builds a file name with drive and full directory based on the location of a running executable. The path of
the result file is the location of the executable when Windows loaded it into memory. The directory structure
on disk is not used in any way to build the path. This function may be used to locate supplemental files (i.e.
INI files, etc.) without a DOS PATH established to the application. This function does not check for the
existence of the full file name returned.

Parameters sModuleName Module name to use for building the full file name. Specify just the base
name, no drive, path, or extension. This name must be the base name of a
loaded EXE or DLL file.

2-242 Centura Builder Function Reference


sFileName File name to concatenate with path of module name. Specify just the base
name and extension, no drive or directory. Any drive or directory specified is
ignored.

Return String: A string containing the full file name (drive, path, and file name), or a null string if an error
occurs.

Example Variables
String: sFileName
... Actions

Set sFileName = VisDosBuildFullName ('swinapp',


'options.ini')
Call VisFileOpen (sFileName, OF_Read)

VisDosEnumDirInfo
Syntax nNumDirs = VisDosEnumDirInfo ( sDirSpec, sDirs, dtDateTimes, nAttributes) String: sDirSpec
Receive String: sDirs[*] Receive Date/Time: dtDateTimes[*] Receive Number: nAttributes[*]

Description Retrieves all subdirectories for a given directory into a Centura array, also returns the date/time the
directory was created and the attributes of the directory.

Parameters sDirSpec Directory to search, must include wildcard characters.

sDirs Array to contain the subdirectories.

dtDateTimes Array to contain the date/time each subdirectory was created.

nAttributes Array to contain the attributes of each subdirectory.

Returns Number: The number of items returned in sDirs, dtDateTimes and nAttributes, or
negative if an error occurs.

Related Functions

VisDosEnumFileInfo

Example Variables
String: sDirs[*]
Date/Time: dtDateTimes[*]
Number: nAttributes[*]
...
Actions

Centura Builder Function Reference 2-243


Chapter 2

Set nCount = VisDosEnumDirInfo ('c:\\windows\\*.*', sDirs,


dtDateTimes, nAttributes If
nCount >0

VisDosEnumDirs
Syntax nNumDirs = VisDosEnumDirs ( sDirSpec, sDirs) String:
sDirSpec Receive String: sDirs[*]

Description Retrieves all subdirectories within a given directory into a Centura array.

Parameters sDirSpec Directory to search, may include wildcard characters (? and *). It must be a
valid DOS path. If no drive or directory is specified, the current drive and/or
directory is used. Use a double backslash (\\) to represent a single backslash.

sDirs Array to contain the subdirectories. Note that only directory names are
returned, no leading or trailing backslashes.

Return Number: The number of subdirectories returned into the specified array, or negative if an error occurs.

Related Functions

VisDosEnumDrives, VisDosEnumFiles

Example Variables
Number: nCount
String: sDirs[*]
...
Actions
Set nCount = VisDosEnumDirs (' c:\\windows\\*.*', sDirs)

If nCount > 0
Call VisListArrayPopulate (lbDirs, sDirs)

VisDosEnumDrives
Syntax nNumDrives = VisDosEnumDrives ( sDrives) Receive
String: sDrives[*]

Description Retrieves all available drives into a Centura array, including floppy drives, hard disks, CD-ROM, network
and RAM drives. To determine the type of each drive, call
VisDosGetDriveType.

2-244 Centura Builder Function Reference


Parameters sDrives Array to contain the available drive letters (A:-Z:). The colon is always
included.

Return Number: The number of available drives returned in the specified array.

Related Functions

VisDosEnumDirs, VisDosEnumFiles

Example Variables
Number: nCount
String: sDrives[*]
... Actions

Set nCount = VisDosEnumDrives ( sDrives)

If nCount > 0
Call VisListArrayPopulate (lbDrives)

VisDosEnumFileInfo
Syntax nNumFiles = VisDosEnumFileInfo ( sDirSpec, nAttribute, sFiles, nSizes, dtDateTimes,
nAttributes) String: sDirSpec Number: nAttribute

Receive String: sFiles[*] Receive Number: nSizes[*] Receive


Date/Time: dtDateTimes[*] Receive Number: nAttributes[*]

Description Retrieves all files in a given directory into a Centura array, and returns each file's size, date/time, and
attributes. If the source drive supports long file names, then the long name will be returned.

Parameters sDirSpec Directory to search, must include wildcard characters.

nAttribute Attribute bits to match. See the table below for a list of attributes.

sFiles Array to contain the file names.

nSizes Array to contain the size of each file.

dtDateTimes Array to contain the date/time each file was created.

nAttributes Array to contain the attributes of each file. May be one or more of the following
values: FA_Standard

Centura Builder Function Reference 2-245


Chapter 2

FA_ReadOnly
FA_Hidden
FA_System
FA_Archive
Returns Number: The number of subdirectories returned in the specified array, or negative if an error occurs.

Related Functions

VisDosEnumDirInfo

Example Variables
String: sFiles[*] Number: Sizes[*]
Date/Time: dtDateTimes[*]

ν umber: nAttributes[*]
...
Actions
Set nCount = VisDosEnumFileInfo ('c:\\windows\\*.*',
FA_Standard, sFiles, nSizes, dtDateTimes, nAttributes) If nCount >0

...

VisDosEnumFiles
Syntax nNumFiles = VisDosEnumFiles ( sFileSpec, nAttributes, sFiles) String:
sFileSpec Number: nAttributes Receive String: sFiles[*]

Description Retrieves all file names from a given directory into a Centura array. If the drive supports long file
names, then the long name will be returned.

Parameters sFileSpec Directory to search, may include wildcard characters (? and *). It must be a
valid DOS path. If no drive or directory is specified, the current drive and/or
directory is used. Use a double backslash (\\) to represent a single
backslash.

nAttributes Attributes bits to match. This parameter may be one or more of the following
values: FA_Standard FA_ReadOnly FA_Hidden

2-246 Centura Builder Function Reference


FA_System
FA_Archive
sFiles Array to contain the file names. Note that only file names are returned, no
drive or paths.

Return Number: The number of files returned in the specified array, or negative if an error occurs.

Related Functions

VisDosEnumDirs, VisDosEnumFiles

Example Variables
Number: nCount
String: sFiles[*]
... Actions

Set nCount = VisDosEnumFiles ('c:\\windows\\*.*',


FA_ReadOnly | FA_Archive, sFiles) If nCount
>0
Call VisListArrayPopulate (lbFiles, sFiles)

VisDosEnumNetConnections
Syntax nNumLinks = VisDosEnumNetConnections ( sDevices, sNetNames) Receive String:
sDevices[*] Receive String: sNetNames[*]

Description Retrieves all current network connections. Both sDevices and sNetNames will contain
the same number of elements. The network name consists of a computer name and a share name, and may
also include a path. The computer name uniquely identifies the network server, while the share name
identifies the resource. If a path is given, it uniquely identifies a directory or file. For example,
\\server\data\path, \\servers\laser. This follows the standard DOS naming convention for network devices.

Parameters sDevices Array to contain the connected devices (A:-Z:, LPT1:-LPT3:).

sNetNames Array to contain the network names.

Return Number: The number of devices connected, or negative if an error occurs.

Related Functions

VisDosNetConnect, VisDosNetDisconnect

Centura Builder Function Reference 2-247


Chapter 2

Example Variables
Number: nCount String:
sDevices[*] String:
sNetPaths[*]
... Actions

Set nCount = VisDosEnumNetConnections (sDevices, sNetNames)


If nCount > 0
Call VisListArrayPopulate (lbDevices, sDevice)

VisDosEnumPath
Syntax nNumPaths = VisDosEnumPath ( sDirs) Receive
String: sDirs[*]

Description Returns each directory in the DOS PATH environment string. Any nonexistent directories on the path are not
returned. DOS does not support directories on the path with trailing backslashes. If a path directory contains
a trailing backslash, it is not returned.

A trailing backslash is added to each directory returned. This trailing backslash is helpful for scanning
all path directories for a particular file. To scan, simply concatenate *.* onto the end of each directory
returned and call VisDosEnumFiles.

Parameters sDirs Array to contain the PATH directories.

Return Number: The number of valid directories found.

Related Functions

VisDosEnumFiles

Example Variables
String: sDirs[*]
... Actions

Set nCount = VisDosEnumPath ( sDirs)

If nCount > 0
Call VisListArrayPopulate (lbPath, sDirs)

2-248 Centura Builder Function Reference


VisDosEnumsShortDirInfo
Syntax nSubDirNum = VisDosEnumsShortDirInfo ( sDirName, arrLongDirNames, arrShortDirNames,
arrDateTime, arrAttribs )

Description Retrieves all long and short subdirectory names for a given directory into a Centura array, also returns the
date/time the directory was created and the attributes for that directory.

Parameters sDirName Parent Directory to retrieve subdirectory information from. Must include
wildcard characters.

arrLongDirNames Handle to array of long name subdirectories arrShortDirNames

Handle to array of short name directories arrDateTime

Handle to array of Date/Times when each subdirectory was created.

arrAttribs Handle to array of attributes for each subdirectory.

Return Returns the number of subdirectories in the arrays or negative if an error occured.

Related Functions

VisDosEnumsShortDirs
VisDosEnumsShortFileInfo
VisDosEnumsShortFiles
VisDosIsParent

Example Set nSubDirNum = VisDosEnumsShortDirInfo (sDirName,


arrLongDirNames, arrShortDirNames, arrDateTime, arrAttribs )

VisDosEnumsShortDirs
Syntax nSubDirNum = VisDosEnumsShortDirInfo ( sDirName, arrLongDirNames, arrShortDirNames )

Description Retrieves all long and short subdirectory names for a given directory into a Centura array.

Parameters sDirName Parent Directory to retrieve subdirectory information from. Must include
wildcard characters.

arrLongDirNames Handle to array of long name subdirectories arrShortDirNames

Handle to array of short name directories

Return Returns the number of subdirectories in the arrays or negative if an error occured.

Centura Builder Function Reference 2-249


Chapter 2

Related Functions

VisDosEnumsShortDirInfo
VisDosEnumsShortFileInfo
VisDosEnumsShortFiles
VisDosIsParent

Example Set nSubDirNum = VisDosEnumsShortDirInfo (sDirName,


arrLongDirNames, arrShortDirNames )

VisDosEnumsShortFileInfo
Syntax nSubFileNum = VisDosEnumsShortFileInfo ( sDirName, nAttribBits, arrLongFileNames,
arrShortFileNames, arrSizes, arrDateTime, arrAttribs )

Description Retrieves all long and short file names for a given directory into a Centura array, also returns each of the
files sizes, date/time and attributes.

Parameters sDirName Directory to retrieve file information from. Must include wildcard
characters.

nAttribBits Attribute bits to match.

arrLongFileNames Handle to array of long file names arrShortFileNames Handle

to array of short file names arrSizes

Handle to array of file sizes.

arrDateTime Handle to array of Date/Times for each file.

arrAttribs Handle to array of attributes for each file.

Return Returns the number of files in the arrays or negative if an error occured.

Related Functions

VisDosEnumsShortDirInfo
VisDosEnumsShortDirs
VisDosEnumsShortFiles
VisDosIsParent

Example Set nSubFileNum = VisDosEnumsShortFileInfo (sDirName,


nAttribBits, arrLongFileNames, arrShortFileNames, arrSizes,
arrDateTime, arrAttribs)

2-250 Centura Builder Function Reference


VisDosEnumsShortFiles
Syntax nSubFileNum = VisDosEnumsShortFiles ( sDirName, nAttribBits,
arrLongFileNames, arrShortFileNames )

Description Retrieves all long and short file names for a given directory into a Centura array.

Parameters sDirName Directory to retrieve file information from. Must include wildcard
characters.

nAttribBits Attribute bits to match.

arrLongFileNames Handle to array of long file names

arrShortFileNames Handle to array of short file names

Return Returns the number of files in the arrays or negative if an error occured.

Related Functions

VisDosEnumsShortDirInfo
VisDosEnumsShortDirs
VisDosEnumsShortFileInfo
VisDosIsParent

Example Set nSubFileNum = VisDosEnumsShortFiles (sDirName, nAttribBits,


arrLongFileNames, arrShortFileNames )

VisDosExist
Syntax bOk = VisDosExist ( sFileSpec) String: sFileSpec

Description Tests for existence of a drive, directory, or file. If a directory is tested, any trailing backslash is
ignored. If wildcards are used, files and directories are searched.

Parameters sFileSpec Drive, directory, or file to test. It may contain a drive letter, directory, file
name, full path or wildcard characters (? and *).

Return Boolean: TRUE if sFileSpec exists and FALSE if it does not.

Example If VisDosExist ('c:')


... If VisDosExist
('c:\\dos')
... If VisDosExist
('c:\\dos\\')
... If VisDosExist
('c:\\dos\\command.com')
... If VisDosExist
('c:\\dos\\*.exe')

Centura Builder Function Reference 2-251


Chapter 2

VisDosGetCurDir
Syntax sDir = VisDosGetCurDir ( sDrive)String: sDrive

Description Returns the current directory of a specified drive.

Parameters sDrive Drive letter (A:-Z:) to retrieve the current directory for.

Return String: The current directory of the drive specified. If the drive is invalid, a null string is returned. The
returned directory always contains the drive letter, path and a trailing backslash.

Example Variables
String: sCurDir
...
Actions
Set sCurDir = VisDosGetCurDir (VisDosGetCurDrive())
If VisDosEnumFiles (sCurDir || '*.*',FA_Standard, sFiles)
VisListArrayPopulate (lbFiles, sFiles)

VisDosGetDriveSize
Syntax nErrCode = VisDosGetDriveSize ( sDrive, nTotalSpace, nFreeSpace) String: sDrive

Receive Number: nTotalSpace


Receive Number: nFreeSpace

Description Returns total space and available space on a drive.

Parameters sDrive Drive letter to retrieve space information for, may include both a drive letter
and colon.

nTotalSpace Total space on specified drive.

nFreeSpace Total available space on specified drive.

Return Number: VTERR_Ok if successful, or negative if an error occurs.

Related Functions

VisDosEnumDrives, , VisDosGetDriveType

Example Variables
Number: nTotalSpace Number:
nAvailableSpace
... Actions

2-252 Centura Builder Function Reference


Call VisDosGetDriveSize ('c:', nTotalSpace,
nAvailableSpace)

VisDosGetDriveType
Syntax nTypeFlags = VisDosGetDriveType ( sDrive) String:
sDrive

Description Gets the type of drive specified.

Parameters sDrive Drive letter to retrieve space information for, may include both a drive letter
and colon.

Return Number A flag indicating the drive type, or negative if an error occurs. DRIVE_Floppy
DRIVE_Fixed DRIVE_Network DRIVE_CDROM DRIVE_RAM

Related Functions

VisDosEnumDrives, VisDosGetDriveSize

Example Variables Number:

nType

...
Actions Set nType = VisDosGetDriveType

('c:')
Select Case nType Case
DRIVE_Floppy
...
Break Case
DRIVE_Fixed
...
Break

Centura Builder Function Reference 2-253


Chapter 2

VisDosGetEnvString
Syntax sEnvString = VisDosGetEnvString ( sKeyName) String:
sKeyName

Description Returns an environment string based on a keyword. The keyword is the text before the = sign in the
environment. For example, PATH = C:\DOS.

Parameters sKeyName String to search for.

Return String: The environment variable contents. If the keyword cannot be found, a null string is returned.

Example Variables
String: sTempDir
...
Actions
Set sTempDir = VisDosGetEnvString ('TEMP')

VisDosGetFlags
Syntax nFlags = VisDosGetFlags ()

Description Returns the state of DOS flags.

Parameters No parameters.

Return Number Any of the following bit flags. To test a bit value, use the bitwise AND
(&) operator.

Related Functions
VisDosSetFlags

Example Variables Number:

nFlags

...
Actions Set nFlags =

VisDosGetFlags ()
If nFlags & DOS_VerifyFlag
...
If nFlags & DOS_BreakFlag

2-254 Centura Builder Function Reference


VisDosGetNetName
Syntax sNetName = VisDosGetNetName ( sDevice) String:
sDevice

Description Retrieves the network name for the specified device. The network name consists of a computer name and a
share name, and may also include a path. The computer name uniquely identifies the network server, while
the share name identifies the resource. If a path is given, it uniquely identifies a directory or file. For
example, \\server\data\path, \\servers\laser. This follows the standard DOS naming convention for network
devices.

Parameters sDevice Pointer to device name (A:-Z:, LPT1:-LPT3:).

Return String: The network name, if successful, or a null string if an error occurs.

Related Functions
VisDosEnumNetConnections, VisDosNetConnect, VisDosNetDisconnect

Example Variables
String: sNetName
...
Actions
Set sNetName = VisDosGetNetName (' f:')

VisDosGetVersion
Syntax nVersionNum = VisDosGetVersion ()

Description Returns the MS-DOS version number.

Parameters None.

Return Number: Both the major and minor (3.31) DOS version number.

Example Variables
Number: nVersion
...
Actions
Set nVersion = VisDosGetVersion ()

Centura Builder Function Reference 2-255


Chapter 2

VisDosGetVolumeLabel
Syntax sLabel = VisDosGetVolumeLabel ( sDrive) String:
sDrive

Description Returns the volume label of a specified drive.

Parameters sDrive Drive to retrieve volume label for.

Return String: The volume label of the specified drive, or negative if an error occurs.

Related Functions

VisDosSetVolumeLabel

Example Variables String:

sLabel

...
Actions Set sLabel =

VisDosGetVolumeLabel ('c:')

VisDosIsParent
Syntax bOk = VisDosIsParent ( sDirSpec) String:
sDirSpec

Description Return indicator if directory contains subdirectories.

Parameters sDirSpec Directory to test.

Return Boolean. TRUE if directory contains subdirectories, FALSE if not.

Related Functions

VisDosEnumsShortDirInfo
VisDosEnumsShortDirs
VisDosEnumsShortFileInfo
VisDosEnumsShortFiles

Example Set bOk = VisDosIsParent (sDirSpec)

2-256 Centura Builder Function Reference


VisDosMakeAllDir
Syntax nErrCode = VisDosMakeAllDir ( sDir) String: sDir

Description Creates all directories along the full path specified. For example, if c:\stuff\junk\newone is
specified, the stuff, junk and newone directories are all created, if necessary.

Parameters sDir Directory name to create, may contain a drive letter and/or full path. If path not
specified, directory will be created on the current drive under the current
directory. If sDir contains a
trailing backslash, it is ignored.

Returns Number: VTERR_Ok if successful, or negative if an error occurs.

Example Actions If VisDosMakeAllDir

('c:\\stuff\\junk\\newone') != VTERR_Ok
Call SalMessageBox ('Cannot create directory', 'Error',
MB_Ok)

VisDosMakePath
Syntax sFileSpec = VisDosMakePath ( sDrive, sDir, sBase, sExt) String: sDrive
String: sDir String: sBase String: sExt

Description Builds a full path from a drive, directory or file name. No existence check is performed on the
result string.

Parameters sDrive Drive letter.

sDir Directory.

sBase Base portion of file name (8 characters before period).

sEx t File extension (must include period).

Return String: The path after concatenating the drive, directory, and file name.

Related Functions

VisDosSplitPath

Example Actions
Set sFullName = VisDosMakePath (' c:', '\\dos\\', 'command',
'.com')

Centura Builder Function Reference 2-257


Chapter 2

VisDosNetConnect
Syntax nErrCode = VisDosNetConnect ( sDevice, sNetName, sPassword) String: sDevice
String: sNetName String: sPassword

Description Connects to a network device. The network name consists of a computer name and a share name, and may
also include a path. The computer name uniquely identifies the network server, while the share name
identifies the resource. If a path is given, it uniquely identifies a directory or file. For example,
\\server\data\path, \\servers\laser. This follows the standard DOS naming convention for network devices.

Parameters sDevice Device name (A:-Z:, LPT1:-LPT3:).

sNetName Network device (\\server\directory).

sPassword Password to network device (optional).

Return Number: VTERR_Ok if successful, or negative if an error occurs.

Related Functions

VisDosEnumNetConnections, VisDosNetDisconnect

Example Actions If VisDosNetConnect

('f:','\\\\server\\data', 'cubswin')
!= VTERR_Ok

VisDosNetDisconnect
Syntax nErrCode = VisDosNetDisconnect ( sDevice, bForce) String:
sDevice Boolean: bForce

Description Cancels a network connection.

Parameters sDevice Device name (A:-Z:, LPT1:-LPT3:).

bForce TRUE to force open files and print jobs to be closed.

Return Number: VTERR_Ok if successful, or negative if an error occurs.

Related Functions

VisDosNetConnect

Example Actions Call VisDosNetDisconnect

('f:', TRUE)

2-258 Centura Builder Function Reference


VisDosSetFlags
Syntax nErrCode = VisDosSetFlags ( nFlags, bState) Number:
nFlags Boolean: bState

Description Sets verify, break, or error mode flags.

Parameters nFlags Bits indicating flags to set. May be any combination of the following values. To
combine bit values, use the bitwise OR (|) operator.

bState TRUE to turn the flag on, FALSE to turn the flag off.

Return Number: Always returns zero.

Related Functions

VisDosGetFlags

Example Actions Call VisDosSetFlags

(DOS_VerifyFlag, TRUE)

VisDosSetVolumeLabel
Syntax nErrCode = VisDosSetVolumeLabel ( sDrive, sLabel) String: sDrive
String: sLabel

Description Sets the volume label on a disk drive.

Parameters sDrive Drive to set volume label for.

sLabel Volume label to set. Limited to 11 characters

Return Number: VTERR_Ok if successful, or negative if an error occurs.

Related Functions

VisDosGetVolumeLabel

Example If VisDosSetVolumeLabel ('c:', 'my_disk') != VTERR_Ok

Centura Builder Function Reference 2-259


Chapter 2

VisDosSplitPath
Syntax Void VisDosSplitPath ( sFileSpec, sDrive, sDir, sBase, sExt) String:
sFileSpec Receive String: sDrive Receive String: sDir Receive String:
sBase Receive String: sExt

Description Splits a full path specification into drive, directory, and file name. The end of the directory is located by
searching backward for the last backslash. For example, c:\dos will be split into c:, \, and dos.

Parameters sFileSpec Full path specification to split.

sDrive Drive letter including colon.

sDir Directory always contains a leading and a trailing backslash (\DOS\).

sBase Base portion of file name (8 characters before period).

sExt File extension (always includes period).

Return No return value

Related Functions

VisDosMakePath

Example Variables String:

sDrive String: sDir

String: sFile

...
Actions Call VisDosSplitPath

('c:\\windows\\user.exe', sDrive,
‘ sDir, sFile, sExt) !

sDrive = 'c:' ! sDir = '\windows\' !

sFile = 'user' ! sExt = '.exe'

2-260 Centura Builder Function Reference


VisErrorRecovery
Syntax nErrCode = VisErrorRecovery ( sCaption) String:
sCaption

Description Displays an error message and allows the user to free resources and retry the operation. This function
should be called when a recoverable error has occurred. A recoverable error is caused by a temporary lack
of resources, such as memory or disk space.

Parameters sCaption Caption of error recovery dialog.

Return Number: An action code depending on whether the user choose Retry or Abort pushbuttons:

Example If VisErrorRecovery ('Error') = ACTION_Abort


Call SalQuit()

VisFileAppend
Syntax nErrCode = VisFileAppend ( sSourceFile, sTargetFile) String:
sSourceFile String: sTargetFile

Description Appends one or more files to another. Wildcard characters are supported in the source file name. If wildcard
character(s) are used, all matching files will be appended onto the target file.

Parameters sSourceFile Source file specification to append.

sTargetFile Target file name. If this file does not exist, an error is returned. File name
specified may be in long format or in DOS 8.3 format.

Return Number: The number of files appended, or negative if an error occurs.

Related Function s

VisFileCopy, VisFileRename

Example Actions If VisFileAppend

('*.txt', 'all.txt') <0


Call SalMessageBox ('Error Occurred', 'Error', MB_Ok)

Centura Builder Function Reference 2-261


Chapter 2

VisFileClose
Syntax nErrCode = VisFileClose ( hFile) File
Handle: hFile

Description Closes a file opened with the VisFileOpen call. Cannot be used with a file handle
returned from SalFileOpen.

Parameters hFile Handle to file returned from VisFileOpen.

Return Number: VTERR_Ok if successful, or negative if an error occurs.

Related Functions

VisFileOpen

Example Set nErrCode = VisFileClose (hFile)

VisFileCopy
Syntax nErrCode = VisFileCopy ( sSourceFile, sTargetFile) String:
sSourceFile String: sTargetFile

Description Copies one or more files. Wildcard characters are supported in both the source and target file names. If
wildcards are used in the target, they must also be used in the same manner in the source. All attributes
and date/times are preserved from the source to the target. This function operates up to 7 times faster
than SalFileCopy.

Parameters sSourceFile Source file to copy. File name specified may be in long format or in DOS 8.3
format.

sTargetFile Target file to copy to or directory to copy into. Trailing backslashes are ignored.
If a file is specified for copy, the source file is renamed. If wildcards are used,
the source names are used to fill in the target names.

Return Number: The number of files copied, or negative if an error occurs.

Related Functions

VisFileAppend, VisFileRename

Example Call VisFileCopy ('oldfile.txt', 'newfile.txt')

2-262 Centura Builder Function Reference


VisFileCreateTemp
Syntax sTempFileName = VisFileCreateTemp ( sPrefix) String:
sPrefix

Description Creates a temporary file. If successful, this function creates the file name returned. Temporary files are
created in the directory pointed to by the TEMP environment variable. If no TEMP environment variable
is set, the file is created in the root directory of the current drive.

Parameters sPrefix The prefix is used to build the file name. A temporary file name contains a tilde
character (~), the prefix, a random number and the extension TMP. Only the
first 3 characters of the prefix are used, the rest are ignored.

Return String: A string containing drive, directory, and file name of the temporary file.

Example Set sFileName = VisFileCreateTemp ('Vis')


Set hFile = VisFileOpen (sFileName, OF_Write)

VisFileDelete
Syntax nErrCode = VisFileDelete ( sFileSpec) String:
sFileSpec

Description Deletes one or more files.

Parameters sFileSpec Directory and file specification to delete, may include wildcard characters. File
name specified may be in long format or in DOS 8.3 format.

Return Number: The number of files deleted, or negative if an error occurs.

Example Call VisFileDelete ('c:\\windows\\temp\\*.*')

VisFileExpand
Syntax nErrCode = VisFileExpand ( sSourceFile, sTargetFile) String:
sSourceFile String: sTargetFile

Description Copies a source file to a destination file. If the source file was compressed by COMPRESS.EXE (Microsoft
SDK), this function creates a decompressed destination file. If the source was not compressed, this
function duplicates the source file.

Parameters sSourceFile Source file specification to expand. May include wildcard characters (? and *).
File name specified may be in long format or in DOS 8.3 format.

Centura Builder Function Reference 2-263


Chapter 2

sTargetFile Target file specification. May also include wildcard characters. File name
specified may be in long format or in DOS 8.3 format.

Return Number: The number of files expanded, or negative if an error occurs.

Related Functions

VisFileAp pend, VisFileCopy, VisFileRename

Example Call VisFileExpand ('oldfile.tx_', 'newfile.txt')

VisFileFind
Syntax sFullName = VisFileFind ( sFileName) String:
sFileName

Description Searches for a file in the following locations and returns the full path to the file:

1. Current directory

2. Windows directory and Windows system directory

3. Directory containing executable file for the current task

4. Directories listed in the PATH environment variable


You can also specify . or .. to search the parent or root directory of the current subdirectory.

Parameters sFileName File name to search for. Cannot contain wildcard characters. File name
specified may be in long format or in DOS 8.3 format.

Return String: The full path if the file name is found. A null string is returned if the file cannot be found.

Example Set sFileName = VisFileFind ('win.com')

VisFileGetAttribute
Syntax nAttribute = VisFileGetAttribute ( sFileName) String:
sFileName

Description Gets the attribute bit values for the specified file.

Parameters sFileName File name to obtain attribute bits for. Cannot include wildcards. File name
specified may be in long format or in DOS 8.3 format.

2-264 Centura Builder Function Reference


Return Number: The attribute bits of the file specified, or negative if an error occurs. To test a bit value, use the
bitwise AND (&) operator.

Related Functions

VisFileGetSize, VisFileSetAttribute

Example Set nAttribute = VisFileGetAttribute ('c:\\autoexec.bat')


If nAttribute & FA_ReadOnly
...

VisFileGetSize
Syntax nFileSize = VisFileGetSize ( sFileName) String:
sFileName

Description Gets the size of the specified file in bytes.

Parameters sFileName File name to get size of. File name specified may be in long format or in
DOS 8.3 format.

Return Number: The file size, or negative if an error occurs.

Related Functions

VisFileGetAttribute

Example Set nFileSize = VisFileGetSize ('c:\\autoexec.bat')

VisFileGetType
Syntax nFileType = VisFileGetType ( sFileName) String:
sFileName

Description Gets the file type. A file can be only one type.

Parameters sFileName File name to obtain type of. File name specified may be in long format or in
DOS 8.3 format.

Return Number: The file type, or negative if an error occurs. File types are mutually exclusive and valid
values are:

Related Functions

VisFileGetAttribute, VisFileGetSize

Example Set nType = VisFileGetType ('c:\\winword\\letter.doc')


If nType = FILETYPE_Document
...

Centura Builder Function Reference 2-265


Chapter 2

VisFileOpen
Syntax nErrCode = VisFileOpen ( hFile, sFileName, nFlags) Receive File
Handle: hFile String: sFileName Number: nFlags

Description Creates or opens a file. A file must be opened before it can be read or written to.

Parameters hFile Handle of the open file.

sFileName File name to open. File name specified may be in long format or in DOS 8.3
format. If only a file name is given, this function searches the following
directories:
1) Current directory
2) Windows or Windows System directories
3) Directory containing currently running executable
4) Directories in PATH environment variable

nFlags Specifies the style in which the file is to be opened. To combine bit values,
use the bitwise OR (|) operator. Options include: OF_Append OF_Binary
OF_Cancel OF_Create OF_Delete OF_Exist OF_Parse OF_Prompt OF_Read
OF_ReadWrite OF_Share_Deny_Compat OF_Share_Deny_Exlcusive
OF_Share_Deny_None OF_Share_Deny_Read OF_Share_Deny_Write
OF_Text OF_Verify OF_Write

Return Number: VTERR_Ok if successful, or negative if an error occurs.

2-266 Centura Builder Function Reference


Related Functions

VisFileClose

Example Variables
File Handle: hFile
String: sLine
... Actions

If VisFileOpen (hFile, 'c:\\autoexec.bat', OF_Read)


= VTERR_Ok
While VisFileReadString (hFile, sLine) = VTERR_Ok
...
VisFileClose (hFile)

VisFileRead
Syntax nBytesRead = VisFileRead ( hFile, sBuffer, nSize) File Handle:
hFile Receive String: sBuffer Number: nSize

Description Reads a block of data from a file. See Chapter 2, Programming Techniques , of your
documentation for an explanation of the difference between VisFileRead and
SalFileRead.

Parameters hFile Handle to file returned from VisFileOpen.

sBuffer String to contain the data read.

nSize Number of bytes to read. Use SalStrSetBufferLength to


initialize sBuffer to the size needed. sBuffer must be at least the
size of nSize. The maximum size that may be read is 65,534 bytes.

Return Number: The number of bytes actually read. If return is less than nSize, the end of file
was reached. Negative if an error occurs.

Related Functions

VisFileOpen, VisFileWrite

Example If VisFileOpen (hFile, 'mydata.dat', OF_Read | OF_Binary)


= VTERR_Ok
Call SalStrSetBufferLength (sData, 512) Loop

Centura Builder Function Reference 2-267


Chapter 2

Set nNumRead = VisFileRead (hFile, sData, 512)


...
If nNumRead < 512
Break Call
VisFileClose (hFile)

VisFileReadString
Syntax nErrCode = VisFileReadString ( hFile, sLine) File
Handle: hFile Receive String: sLine

Description Reads a text line from a text file into a string. The text file must indicate the end of each line by carriage
return/line feed characters. The CR/LF characters are removed from the string.

Parameters hFile Handle to file returned from VisFileOpen.

sLine Text line read from the file. Pre-allocation of the sLine with
SalStrSetBufferLength is not necessary.

Return Number: VTERR_Ok if successful, or negative if an error occurs.

Related Functions

VisFileOpen, VisFileRead, VisFileWrite, VisFileWriteString

Example Set nErrCode = VisFileReadString (hFile, sLine)

VisFileRename
Syntax nErrCode = VisFileRename ( sOldFileSpec, sNewFileSpec) String:
sOldFileSpec String: sNewFileSpec

Description Renames one or more files. Wildcard characters are supported in both the source and target file names. If
the source and target directories are different but the file names are the same, the files are moved to the
target directory specified.

Parameters sOldFileSpec Source file specification to rename. File name specified may be in long
format or in DOS 8.3 format.

sNewFileSpec Target file specification. File name specified may be in long format or in
DOS 8.3 format.

Return Number: The number of files renamed, or negative if an error occurs.

2-268 Centura Builder Function Reference


Related Functions

VisFileAppend, VisFileCopy, VisFileExpand

Example Call VisFileRename (' myfile.txt', 'yourfile.txt')

VisFileSeek
Syntax nErrCode = VisFileSeek ( hFile, nOffset, nOrigin) File Handle:
hFile Number: nOffset Number: nOrigin

Description Seeks to a specified offset within a file.

Parameters hFile Handle to file returned from VisFileOpen.

nOffset Specifies the number of bytes the offset is to be moved from the origin.

nOrigin Specifies the direction of the offset. May be any of the following
values: SEEK_Begin SEEK_Current SEEK_End

Return Number: The current offset in file if successful, or negative if an error occurs.

Related Functions

VisFileOpen, VisFileTell

Example If VisFileOpen (hFile, 'c:\\autoexec.bat', OF_Write)


= VTERR_Ok Call VisFileSeek

(hFile, 0, SEEK_End)
...
Call VisFileClose (hFile)

VisFileSetAttribute
Syntax nErrCode = VisFileSetAttribute ( sFileName, nAttribute, bState) String:
sFileName Number: nAttribute Boolean: bState

Description Sets the attribute bits for one or more files.

Centura Builder Function Reference 2-269


Chapter 2

Parameters sFileName Directory and file specification to set, may include wildcard characters. If
wildcard characters are used, the attributes are set for each matching file. File
name specified may be in long format or in DOS 8.3 format.

nAttribute Attribute bits to set or clear:


FA_Standard FA_ReadOnly
FA_Hidden FA_System FA_Archive

bState TRUE to set attributes, FALSE to clear.

Return Number: The number of files effected, or negative if an error occurs.

Related Functions

VisFileGetAttribute, VisFileSetDateTime

Example Call VisFileSetAttribute ('c:\\myapp\\*.exe', FA_ReadOnly,


TRUE)

VisFileSetDateTime
Syntax nErrCode = VisFileSetDateTime ( sFileName, dtDateTime) String:
sFileName Date/Time: dtDateTime

Description Sets the date and time for one or more files.

Parameters sFileSpec Directory and file specification to set, may include wildcard characters. If
wildcard characters are used, the date and time are set for each matching file.
File name specified may be in long format or in DOS 8.3 format.

dtDateTime Date and time to set for all files specified.

Return Number: The number of files effected, or negative if an error occurs.

Example Set dtDateTime = SalDateCurrent() Set


nNumFiles = VisFileSetDateTime ('c:\\myapp\\*.exe',
dtDateTime)

2-270 Centura Builder Function Reference


VisFileTell
Syntax nOffset = VisFileTell ( hFile) File
Handle: hFile

Description Returns the current file offset.

Parameters hFile Handle to file returned from VisFileOpen.

Return Number: The current offset in file if successful, or negative if an error occurs.

Related Functions

VisFileOpen, VisFileSeek

Example Actions
Set nFilePos = VisFileTell (hFile)

VisFileWrite
Syntax nErrCode = VisFileWrite ( hFile, sBuffer, nSize) File Handle:
hFile String: sBuffer Number: nSize

Description Writes a block of data to a file.The maximum number of characters you can write is
65,535.

Parameters hFile Handle to file returned from VisFileOpen.

sBuffer String containing data to write.

nSize Number of bytes to write. Must be less than or equal to size of


sBuffer.

Return Number: The number of bytes written to the file. If the return value is less than nSize,
the drive is out of space. Negative if an error occurs.

Related Functions

VisFileOpen, VisFileWriteString

Example If VisFileOpen (hFile, 'mydata.dat', OF_Write) = VTERR_Ok


Call VisFileWrite (hFile, sData, SalStrLength (sData))
Call VisFileClose (hFile)

Centura Builder Function Reference 2-271


Chapter 2

VisFileWriteString
Syntax nErrCode = VisFileWriteString ( hFile, sLine) File Handle:
hFile String: sLine

Description Writes a string to a file. CR/LF characters are added to the end of the string before it's
written to the file.

Parameters hFile Handle to file context structure returned from VisFileOpen.

sLine String to write to the file.

Return Number: VTERR_Ok if successful, or negative if an error occurs.

Related Functions

VisFileOpen, VisFileWrite

Example While nIndex <= nMax


Call VisFileWriteString (hFile, sLines[nIndex])
Set nIndex = nIndex + 1 Call
VisFileClose (hFile)

VisFontEnum
Syntax nNumFonts = VisFontEnum ( sGetFlag, sFontNames, nFontTypes) String: sGetFlag

Receive String: sFontNames[*] Receive


Number: nFontTypes[*]

Description Gets the font names and types (printer, true type, etc.).

Parameters sGetFlag One or more flags indicating type of fonts to retrieve. To combine bit
values, use the bitwise OR (|) operator. FONT_GetScreen
FONT_GetPrinter

sFontNames Names of each available font (Arial, Times New Roman, etc.)

nFontTypes Bit flags indicating types of each available font. To combine bit values, use
the bitwise OR (|) operator. FONTTYPE_Device FONTTYPE_Raster
FONTTYPE_TrueType

Return Number: The total number of fonts if successful, or negative if an error occurs.

2-272 Centura Builder Function Reference


Related Functions

VisFontGet

Example Set nNumFonts = VisFontEnum ( FONT_GetScreen, sFontNames,


nFontTypes) Set

nIndex = 0

While nIndex < nNumfonts


If nFontTypes(nIndex) & FONTTYPE_TrueType

VisFontFree
Syntax bOk = VisFontFree ( hFont) String:
hFont

Description Frees a font loaded into memory with the VisFontLoad function.

Parameters hFont Handle of font to free.

Return Boolean: TRUE if successful, or FALSE if an error occurs.

Related Functions

VisFontEnum, VisFontLoad

Example Set bOk = VisFontFree (hFont)

VisFontGet
Syntax bOk = VisFontGet ( hFont, sFaceName, nPointSize, nFontEnhancement) Number: hFont

Receive String: sFaceName Receive Number:


nPointSize Receive Number:
nFontEnhancement

Description Gets specifications of a font.

Parameters hFont Font to get specifications for.

sFaceName String to contain the font name (Arial, Times New Roman, etc.)

nPointSize Point size of font.

nFontEnhancement Bit flags containing font enhancements. To combine bit values,


use the bitwise OR (|) operator.
FONT_EnhNormal FONT_EnhItalic

Centura Builder Function Reference 2-273


Chapter 2

FONT_EnhUnderline
FONT_EnhBold
FONT_EnhStrikeout
Return Boolean: TRUE if successful, or FALSE if an error occurs.

Related Functions

VisFontEnum, VisFontLoad

Example On SAM_Click
Set nIndex = SalListQuerySelection (hWndItem) If nIndex !=
LB_Err Call VisFontGet
(hFont, sFontName, nPointSize,
nFontFlags)
If nFontFlags & FONT_EnhBold
...

VisFontLoad
Syntax hFont = VisFontLoad ( sFontName, nFontSize, nFontEnhancement) String: sFontName
Number: nFontSize Number: nFontEnhancement

Description Loads a font into memory.

Parameters sFontName Font name (Arial, Times New Roman, etc.).

nFontSize Point size of font.

nFontEnhancement Bit flags containing font enhancements. To combine bit values,


use the bitwise OR (|) operator.
FONT_EnhNormal FONT_EnhItalic
FONT_EnhUnderline FONT_EnhBold
FONT_EnhStrikeout

Return Number: The handle of the font if successful, NULL if an error occurs.

Related Functions

VisFontEnum, VisFontFree

Example On SAM_Create
Set hFont = VisFontLoad (' Arial', 10, FONT_EnhBold)

2-274 Centura Builder Function Reference


VisGetCopyright
Syntax sCopyrightMsg = VisGetCopyright ()

Description Retrieves a copyright string to display in applications that use the Vis Library.

Parameters No parameters.

Return String: The copyright string for the Vis Library.

Related Functions

VisGetVersion

Example On SAM_Create Set


dfCopyright = VisGetCopyright ()

VisGetKeyState
Syntax nState = VisGetKeyState ( nVirtualKey) Number:
nVirtualKey

Description Retrieves the state of a specified key. The state specifies whether the key is up, down, or toggled.

Parameters nVirtualKey Virtual key code to retrieve the state. See the Appendix for a complete list of
virtual key codes.

Return Number: The bit values indicating the state of the key specified. To test a bit value, use the bitwise AND
(&) operator.

Example On SAM_Click
Set nState = VisGetKeyState (VK_Control)
If nState & KS_Down
...

VisGetSystemMetrics
Syntax nValue = VisGetSystemMetrics( nIndex) Number:
nIndex

Description Retrieves widths and heights of various elements displayed by Windows.


VisGetSystemMetrics can also return flags indicating whether the current version of Windows is a
debugging version, whether a mouse is present, or whether the meanings of the left and right mouse
buttons have been exchanged.

Parameters nIndex Specifies the system measurement to retrieve:

Centura Builder Function Reference 2-275


Chapter 2

SM_XBorderSM_YMin
SM_YBorderSM_XMinTrack
SM_YCaptionSM_YMinTrack
SM_XCursorSM_XScreen
SM_YCursorSM_YScreen
SM_XDoubleClickSM_XHScroll
SM_YDoubleClickSM_YHScroll
SM_XDlgFrameSM_XVScroll
SM_YDlgFrameSM_YVScroll
SM_XFrameSM_XSize
SM_YFrameSM_YSize
SM_XFullScreenSM_XHThumb
SM_YFullScreenSM_YVThumb
SM_XIconSM_DBCSEnabled
SM_YIconSM_Debug
SM_XIconSpacingSM_MenuDropAlignment
SM_YIconSpacingSM_MousePresent
SM_KanjiWindowSM_PenWindows
SM_MenuSM_SwapButton SM_XMin

Return Number: The specified system metric.

Example Actions
Set nScreenWidth = VisGetSystemMetrics (SM_XScreen)

VisGetVersion
Syntax sVisVersion = VisGetVersion ()

Description Gets the Vis Library version number.

Parameters No parameters.

Return String: The version number of the Vis Library.

Example Actions
Set dfVersion = 'Version ' || VisGetVersion ()

VisGetWinFlags
Syntax nFlags = VisGetWinFlags ()

Description Retrieves the current Windows system and memory configuration.

Parameters None.

2-276 Centura Builder Function Reference


Return Number: A series of bits indicating the current system configuration. To test a bit value, use the bitwise
AND (&) operator. WF_80x87 WF_CPU286 WF_CPU386 WF_CPU486 WF_Enhanced WF_Paging
WF_PMode WF_Standard WF_WLO

Example Actions
Set nWinFlags = VisGetWinFlags ()
If nWinFlags & WF_CPU486

VisGetWinVersion
Syntax nWinVersion = VisGetWinVersion ()

Description Returns the Windows version number.

Parameters No parameters.

Return NumberThe major and minor (3.10) Windows version number.

Example Actions
Set nWinVersion = VisGetWinVersion ()

VisListAddValue
Syntax nIndex = VisListAddValue ( hWndList, sText, nValue) Window
Handle: hWndList String: sText Number: nValue

Description Adds an item to a sorted list box or combo box and associates the specified value with the item. The value
can be a record identifier for a database, a file offset, or any other integer value that the application can use
to uniquely identify the item. Use VisListInsertValue for unsorted list boxes or combo boxes.

Parameters hWndList Window handle of list box or combo box to add item to.

sText Text of item to add.

nValue Value to associate with the added item. May be a positive or negative
integer value.

Centura Builder Function Reference 2-277


Chapter 2

Return Number: The index to the item added, or LB_Err if an error occurs.

Related Functions

VisListInsertValue

Example Call VisListAddValue (hWndItem, sText[nIndex], nKeys[nIndex])


Set nIndex = nIndex +1

VisListArrayPopulate
Syntax nNumItems = VisListArrayPopulate ( hWndList, sText) Window
Handle: hWndList String: sText[*]

Description Populates a list box from a string array. Each item in the string is inserted as an item in the list box.

Parameters hWndList Window handle of list box or combo box to populate.

sText String array to populate the list box with.

Return Number: The number of items added to the list box or combo box, or LB_Err if an error occurs.

Related Functions

VisListArrayPopulateValue

Example Set nCount = VisDosEnumDirs ('c:\\windows\\*.*', sDirs) If nCount > 0

Call VisListArrayPopulate (lbDirs, sDirs)

VisListArrayPopulateValue
Syntax nNumItems = VisListArrayPopulateValue ( hWndList, sText, nValues) Window Handle:
hWndList String: sText[*] Number: nValues[*]

Description Populates a list box from a string array and an array of values. Each item in the string is inserted as an item
in the list box. The number of items in the string array and the number of items in the value array must be
the same.

Parameters hWndList Window handle of list box or combo box to populate.

sText String array to populate the list box with.

nValues Number array of values to associate with each item.

2-278 Centura Builder Function Reference


Return Number: The number of items added to the list box or combo box, or LB_Err if an error occurs.

Related Functions

VisListArrayPopulate

Example Set nCount = VisDosEnumFileInfo ('c:\\windows\\*.*', 0,


sFiles, nSizes, dtDateTimes, nAttributes) If nCount ,
0
Call VisListArrayPopulateValue (lbFiles, sFiles,
nAttributes)

VisListClearSelection
Syntax bOk = VisListClearSelection ( hWndList) Window
Handle: hWndList

Description Unselects all selected items in a list box or combo box. If the window handle is a multiple selection list box,
all selected items are unselected. If the window handle is a single selection list box or a combo box, the
currently selected item is unselected. Combo boxes do not allow multiple selections.

Parameters hWndList Handle to list box or combo box to clear selection from.

Returns Boolean: TRUE if successful, or FALSE if an error occurs.

Related Functions

VisListDeleteSelected

Example Actions
Call VisListClearSelection (hWndItem)

VisListDeleteSelected
Syntax nNumDeleted = VisListDeleteSelected ( hWndList) Window
Handle: hWndList

Description Deletes all selected items from a list box or combo box. If the window handle is a multiple selection list box,
all selected items are deleted. If the window handle is a single selection list box or a combo box, the
currently selected item is deleted. Combo boxes do not allow multiple selections.

Parameters hWndList Window handle of list box or combo box to delete selected items.

Return Number: nNumDeleted is the number of items deleted, or negative if an error occurs.

Centura Builder Function Reference 2-279


Chapter 2

Related Functions

VisListClearSelection

Example Pushbutton: pbDelete


...
Message Actions
On SAM_Click
Call VisListDeleteSelected (lbSample)

VisListFindString
Syntax nIndex = VisListFindString ( hWndList, nStartIndex, sText) Window Handle:
hWndList, Number: nStartIndex String:sText

Description Finds the first string that matches the specified string in a list box or combo box. The search requires an
exact match of all characters, but it is not case sensitive.

Parameters hWndList Window handle of list box or combo box.

nStartIndex Specifies the index of the item before the first item to be searched.
Searching begins at nStartIndex + 1. If the search
reaches the bottom of the list, it continues at the top and back to the item
specified. To search from the beginning, specify -1.

sText String to search for. The search is not case-sensitive.

Return Number: The index of the string if it is found, or negative if an error occurs.

Example Actions
Set nIndex = VisListFindString (lbSample, 0, 'Red')

VisListFindValue
Syntax nIndex = VisListFindValue ( hWndList, nStartIndex, nValue) Window Handle:
hWndList

Number: nStartIndex

Number:nValue

Description This function will locate a value associated with an item based on an index.

Parameters hWndList Window handle to search.

nStartIndex The index to begin searching; specify -1 to search from the top of the list.
Searching begins at nStartIndex + 1.

2-280 Centura Builder Function Reference


nValue Value to search for.

Return Number: The index containing the value specified, or LB_Err if the value cannot be found.

Example Actions
Set nIndex = SalListQuerySelection (hWndItem) If nIndex !=
LB_Err
Set nIndexFound = VisListFindValue (lbNames, nIndex,
100)

VisListGetDropdownState
Syntax bState = VisListGetDropdownState ( hWndList) Window
Handle: hWndList,

Description Determines whether the list box portion of a combo box is visible.

Parameters hWndList Window handle of combo box.

Return Boolean: TRUE if visible, FALSE if not visible

Example Actions
If VisListGetDropdownState (hWndItem)
...

VisListGetFocusIndex
Syntax nIndex = VisListGetFocusIndex ( hWndList) Window
Handle: hWndList

Description Gets the index of the item which has the focus rectangle or the last item to receive the focus frame in a
multiple-selection list box. This function will retrieve the selected item on a combo box.

Parameters hWndList Window handle of list box or combo box.

Return Number: The index of the item that has the focus rectangle, if a multiple selection list box. If the function is
operating on a single-selection list box or combo box, the return value is the index of the item that is
selected, if any.

Related Functions

VisListSetFocusIndex

Centura Builder Function Reference 2-281


Chapter 2

Example Actions
Set nIndex = VisListGetFocusIndex (hWndItem)
If nIndex != LB_Err

VisListGetVisibleRange
Syntax nNumVisible = VisListGetVisibleRange ( hWndList, nTop, nBottom) Window Handle:
hWndList Receive Number: nTop Receive Number: nBottom

Description Retrieves the indexes of both the first visible item and the last visible item in a list box. This function
will not operate on a combo box.

Parameters hWndList Window handle of list box.

nTop Top visible index of list box

nBottom Bottom visible index of list box

Return Number: The number of visible items, or negative if an error occurs or if hWndList is
a combo box.

Example Call VisListGetVisibleRange (hWndItem, nTop, nBottom)


Set nIndex = nTop While nTop
<= nBottom
Set sText = VisListGetText (hWndItem, nIndex)
...
Set nIndex = nIndex + 1

VisListInsertValue
Syntax nIndex = VisListInsertValue ( hWndList, nIndex, sText, nValue) Window Handle:
hWndList Number: nIndex String: sText Number: nValue

Description Inserts an item into an unsorted list box or combo box and associates the specified value with the item. The
value can be a record identifier for a database, a file offset, or any other integer value that the application
can use to uniquely identify the item. Use VisListAddValue for sorted list boxes or combo boxes.

Parameters hWndList Window handle of list box or combo box to insert item into.

nIndex Position to insert item in list box (-1 to insert at the bottom).

2-282 Centura Builder Function Reference


sText Text of item to insert.

nValue Value to associate with the inserted item. May be a positive or negative integer
value.

Return Number: The index to the item inserted, or LB_Err if an error occurs.

Related Functions

VisListAddValue

Example While SqlFetchRow (hSql, nIndex)


Call VisListInsertValue (hWndItem, -1,
sText[nIndex], nKeys[nIndex]) Set
nIndex = nIndex +1

VisListIsMultiSelect
Syntax bOk = VisListIsMultiSelect ( hWndList) Window
Handle: hWndList

Description Tests a list box to determine if multiple selection is enabled.

Parameters hWndList List box to test.

Returns Boolean: TRUE if multi selection is enabled for the list box, FALSE if not.

Example Actions
If VisListIsMultiSelect (hWndList)
...

VisListLoadOutline
Syntax nErrCode = VisListLoadOutline ( hWndList, sOutlineBlob) Window
Handle: hWndList String: sOutlineBlob

Description Loads an outline from a blob (binary large object) in memory. The blob must be created from a call to
VisListSaveOutline. The outline will be restored exactly as it was when the outline was saved, including
selected items and outline position in the list box or combo box.

Parameters hWndList Window handle of list box or combo box.

sOutlineBlob String containing outline to load.

Return Number: VTERR_Ok if successful, or negative if an error occurs.

Centura Builder Function Reference 2-283


Chapter 2

Related Functions

VisListSaveOutline

Example On Sam_Click
Call VisListLoadOutline (twOutline, sOutline)

VisListLoadOutlineFile
Syntax nErrCode = VisListLoadOutlineFile ( hWndList, sOutlineFileName, hPicParentNormal,
hPicParentSelect, hPicChildNormal, hPicChildSelect) Window Handle: hWndList String:
sOutlineFileName Number: hPicParentNormal Number: hPicParentSelect Number:
hPicChildNormal Number: hPicChildSelect

Description Loads an outline from a tab indented ASCII file. The parent/child relationships are derived from the order
of the text lines and the indentation of the text in the file. Since the file contains no picture information,
handles to the pictures to use for the parent and lowest level children must be passed in.

Parameters hWndList Window handle of list box or combo box.

sOutlineFileName File name of the outline to load.

hPicParentNormal Picture to use when parent item is not selected. Call


VisPicLoad to create a picture handle.

hPicParentSelect Picture to use when parent item is selected. hPicParentNormal


and hPicParentSelect may be the same.

hPicChildNormal Picture to use when lowest level child item is not selected. Call VisPicLoad to
create a picture handle.

hPicChildSelect Picture to use when lowest level child item is selected.


hPicChildNormal and hPicChildSelect may be the same.

Return Number: VTERR_Ok if successful, or negative if an error occurs.

Example Set nErrCode = VisListLoadOutlineFile (hWndList,


sOutlineFileName, hPicParentNormal, hPicParentSelect,
hPicChildNormal, hPicChildSelect)

2-284 Centura Builder Function Reference


VisListSaveOutline
Syntax nErrCode = VisListSaveOutline ( hWndList, sOutlineBlob) Window
Handle: hWndList String: sOutlineBlob

Description Compresses and saves a list box or combo box outline into a blob (binary large object) in memory. The blob
data may then be inserted into a LONG VARCHAR column of a database.

Parameters hWndList Window handle of list box or combo box.

sOutlineBlob String to contain the ouline.

Return Number: VTERR_Ok if successful, or negative if an error occurs.

Related Functions

VisListLoadOutline

Example On SAM_Destroy
If VisListSaveOutline (twOutline, sOutline)
Call SqlPrepare (hSql, 'INSERT INTO TABLE’ (out_id,
outline)values (:nOutID, :sOutline')

VisListScroll
Syntax nErrCode = VisListScroll ( hWndList, nIndex) Window
Handle: hWndList Number: nIndex

Description Scrolls an item into view. This function does not force the item to the top of a list box. The item may be
scrolled anywhere in the visible range. This function does not operate on combo boxes.

Parameters hWndList Window handle of list box to scroll.

nIndex Index of item to scroll.

Return Number: Negative if an error occurs.

Example Actions
Call VisListScroll (hWndItem, 0)

Centura Builder Function Reference 2-285


Chapter 2

VisListSetDropdownState
Syntax bOk = VisListSetDropDownState ( hWndList, bState) Window
Handle: hWndList Boolean: bState

Description Shows or hides the list box portion of a combo box. This function does not operated on list boxes.

Parameters hWndList Window handle of combo box.

bState TRUE to show, FALSE to hide.

Return Boolean: Always returns TRUE.

Related Functions

VisListGetDropDownState

Example Actions
Call VisListSetDropDownState (hWndItem, TRUE)

VisListSetFocusIndex
Syntax nErrCode = VisListSetFocusIndex ( hWndList, nIndex) Window
Handle: hWndList Number: nIndex

Description Sets the focus rectangle to the item at the specified index in a multiple-selection list box. If the item is not
visible, it is scrolled into view. If hWndList is a single select list
box, no action is performed.

Parameters hWndList Window handle of list box.

nIndex Index of the item to receive the focus rectangle.

Return Number: Negative if an error occurs.

Related Functions

VisListGetFocusIndex

Example Actions
Call VisListSetFocusIndex (hWndItem, 5)

2-286 Centura Builder Function Reference


VisListSetScrollWidth
Syntax nErrCode = VisListSetScrollWidth ( hWndList, nIndex) Window
Handle: hWndList Number: nIndex

Description Sets the width by which a list box can be scrolled horizontally. The horizontal width is determined by the
string length of the longest item. If the width of the item specified is not longer that the current width, the
current width is not adjusted. The first call to
VisListSetScrollWidth displays a horizontal scroll bar in the list box. This function does not work on
combo boxes.

Parameters hWndList Window handle of list box to set the scroll width.

nIndex Item to base the scroll width on. If -1 all items are searched for the largest text
length.

Return Number: Zero if successful, or negative if an error occurs.

Example Actions
Call VisListSetScrollWidth (lbText, -1)

VisMenuGetPopupHandle
Syntax hMenu = VisMenuGetPopupHandle ( hMenu, nPos) Number:
hMenu Number: nPos

Description Retrieves the menu handle of a pop-up menu. A pop-up menu appears below a top level menu option, or
to the side of another pop-up menu.

Parameters hMenu Handle of menu whose pop-up menu handle is to be retrieved.

nPos Zero-based position in the specified menu of the pop-up menu. Menu
separators are included in the position count. It cannot be a negative value
indicating a menu ID added using
VisMenuInsert, which always returns a negative menu ID value.

Return Number: The menu handle of the menu specified, or NULL if the window has no menu.

Related Functions

VisMenuGetSystemHandle

Centura Builder Function Reference 2-287


Chapter 2

Example Set hMenu = VisMenuGetHandle (hUnd) If hMenu Set

hSubMenu = VisMenuGetPopupHandle

(hMenu, 2)

VisMenuGetSystemHandle
Syntax hMenu = VisMenuGetSystemHandle ( hWnd) Window
Handle: hWnd

Description Retrieves the system menu handle of a window. The system menu is located in the upper left corner of a
window.

Parameters hWnd Window handle to retrieve menu.

Return Number: The system menu handle of window specified, or NULL if the window has no menu.

Related Functions

VisMenuGetPopupHandle

Example Variables
Number: hMenu
... Actions

Set hMenu = VisMenuGetSystemHandle (hWnd)

VisMenuGetText
Syntax sMenuText = VisMenuGetText ( hWnd, hMenu, nPos) Window
Handle: hWnd Number: hMenu Number: nPos

Description Retrieves the text of a menu item. The text of any menu item, whether defined in Centura or inserted
via the Vis Library, may be returned.

Parameters hWnd Handle to window containing menu.

hMenu Handle of menu containing item to retrieve.

nPos Zero-based position within the menu of the item. Menu positions include
separators. If negative, identifies a menu item added using VisMenuInsert, which
always returns a negative menu ID value.

2-288 Centura Builder Function Reference


Returns String: The text of the specified menu item. The text will contain a tab character between the text
and the accelerator indicator.

Related Functions

VisMenuSetText

Example Variables
Number: hMenu
... Actions

Set hMenu = VisMenuGetHandle (hWnd) Set hMenu =


VisMenuGetPopupHandle (hMenu, 2) Set sText =
VisMenuGetText (hWndForm, hMenu, 5)

VisMenuInsert
Syntax nMenuID = VisMenuInsert ( hWnd, hMenu, nPos, sMenuText, nFlags) Number: hWnd
Number: hMenu Number: nPos String: sMenuText Number: nFlags

Description Inserts a menu item into a menu. Menu items can be inserted into system, top-level or pop-up menus. Prior
to Centura 4.1, items could not be inserted into the middle of a Centura menu. They could only be inserted
at the end of a Centura menu or in the middle of items previously inserted with a
VisMenuInsert call.

Parameters hWnd Handle to window containing the menu. This window will be notified with a
VTM_MenuSelect message when the menu item is selected.

hMenu Handle of menu to insert item into.

nPos Zero-based position within the menu of the item. Menu positions include
separators. Specify -1 to insert at the end of the menu.

sMenuText Text of item to insert. Specify \t to insert a tab in the text. A tab will separate
the menu text from the accelerator indicator. All text after the tab will be shown
along the right edge of the menu.

nFlags Menu flags. To combine bit values, use the bitwise OR (|) operator.

Centura Builder Function Reference 2-289


Chapter 2

MF_Checked
MF_Disabled
MF_Separator
Returns Number: The ID value of the menu item inserted, or NULL if an error occurs. Menu IDs are always
negative. Each inserted item is assigned a unique ID.

Related Functions

VisMenuInsertFont, VisMenuInsertPicture

Example On SAM_Create
Set hMenu = VisMenuGetHandle (hWndForm) Set hMenu =
VisMenuGetPopupHandle (hMenu, 2) Call VisMenuInsert
(hWndForm, hMenu, -1, '', MF_Separator)
Set nMenuID = VisMenuInsert (hWndForm, hMenu, -1,
'Sample\tAlt-S', 0)

VisMenuInsertFont
Syntax nMenuID = VisMenuInsertFont ( hWnd, hMenu, nPos, hFont sMenuText) Number: hWnd
Number: hMenu Number: nPos Number: hFont String: sMenuText

Description Inserts a menu item into a menu and displays it in the specified font. Prior to Centura
4.1, items could not be inserted into the middle of a Centura menu. They could only be inserted at the end
of a Centura menu or in the middle of items previously inserted with a VisMenuInsert call.

Parameters hWnd Handle to window containing the menu. This window will be notified with a
VTM_MenuSelect message when the menu item is selected.

hMenu Handle of menu to insert item into.

nPos Zero-based position within the menu of the item. Menu positions include
separators. Specify -1 to insert at the end of the menu.

hFont Handle to font to use for menu item display. Call VisFontLoad to create a font
handle.

sMenuText Text of item to insert. Specify \t to insert a tab in the text. A tab will separate
the menu text from the accelerator indicator. All

2-290 Centura Builder Function Reference


text after the tab will be shown along the right edge of the menu.

Returns Number: The ID value of the menu item inserted, or NULL if an error occurs. Menu IDs are always
negative. Each inserted item is assigned a unique ID.

Related Functions

VisMenuInsert, VisMenuInsertPicture

Example On SAM_Create
Set hFont = VisFontLoad ('Arial', 12, FONT_EnhBold) Set hMenu =
VisMenuGetHandle (hWndForm) Set hMenu =
VisMenuGetPopupHandle (hMenu, 2) Call VisMenuInsert
(hWndForm, hMenu, -1, '',
MF_Separator) Set nMenuID = VisMenuInsertFont

(hWndForm, hMenu, -1,


hFont, 'Sample\tAlt-S')

VisMenuInsertPicture
Syntax nMenuID = VisMenuInsertPicture ( hWnd, hMenu, nPos, hPicNormal, hPicSelect, sMenuText) Number:
hWnd Number: hMenu Number: nPos Number: hPicNormal Number: hPicSelect String: sMenuText

Description Inserts a menu item into a menu and displays the specified picture with it. Prior to Centura 4.1, items
could not be inserted into the middle of a Centura menu. They could only be inserted at the end of a
Centura menu or in the middle of items previously inserted with a
VisMenuInsert call.

Parameters hWnd Handle to window containing the menu. This window will be notified with a
VTM_MenuSelect message when the menu item is selected.

hMenu Handle of menu to insert item into.

nPos Zero-based position within the menu of the item. Menu positions include
separators. Specify -1 to insert at the end of the menu.

hPicNormal Handle of picture to display in menu item when item is not selected. Call
VisPicLoad to create a picture handle.

Centura Builder Function Reference 2-291


Chapter 2

hPicSelect Handle of picture to display in menu item when item is selected.


hPicNormal and hPicSelect may be the same.

sMenuText Text of item to insert. Specify \t to insert a tab in the text. A tab will separate the menu text
from the accelerator indicator. All text after the tab will be shown along the right edge of the menu.

Returns Number: The ID value of the menu item inserted, or NULL if an error occurs. Menu IDs are always
negative. Each inserted item is assigned a unique ID.

Related Functions

VisMenuInsert, VisMenuInsertFont

Example Call VisMenuInsert (hWndForm, hMenu, -1, '',


MF_Separator) Set nMenuID = VisMenuInsertPicture

(hWndForm, hMenu, -1,


hPic, 'Sample\tAlt-S')

VisMenuIsChecked
Syntax bOk = VisMenuIsChecked ( hMenu, nPos) Number:
hMenu Number: nPos

Description Uses the Windows check state to test whether a menu item is checked.
VisMenuIsChecked works with either menu items inserted using the Vis Library or Centura menu items. It
must be called in the Checked When section of the Centura outline in order to properly display the check
status of a Centura menu item .

Parameters hMenu Menu handle of menu to test. This may be a pop-up or system menu. It cannot
be a top-level menu.

nPos Zero-based position within the menu of the item. Menu positions include
separators. If negative, identifies a menu item added using VisMenuInsert, which
always returns a negative menu ID value.

Return Boolean: TRUE if successful, FALSE if unsuccessful.

Related Functions

VisMenuIsEnabled, VisMenuUncheck

2-292 Centura Builder Function Reference


Example Menu Item: Sample Menu
...
Menu Settings
Enabled when:
Checked when: VisMenuIsChecked ( VisMenuGetPopupHandle
(VisMenuGetHandle(hWndForm), 3), 4) Menu
Actions

VisMenuIsEnabled
Syntax bOk = VisMenuIsEnabled ( hMenu, nPos) Number:
hMenu Number: nPos

Description Uses the Windows enable state to test whether a menu item is enabled.
VisMenuIsEnabled works with either menu items inserted using the Vis Library or Centura menu items. It
must be called in the Enabled When section of the Centura outline in order to properly display the enable
status of a Centura menu item .

Parameters hMenu Menu handle of menu to test.

nPos Zero-based position within the menu of the item. Menu positions include
separators. If negative, identifies a menu item added using VisMenuInsert, which
always returns a negative menu ID value.

Return Boolean: TRUE if successful, FALSE if unsuccessful.

Related Functions

VisMenuIsChecked

Example Menu Item: Sample Menu


Menu Settings
Enabled when: VisMenuIsEnabled (VisMenuGetPopupHandle
(VisMenuGetHandle(hWndForm), 3), 0) Checked
when: Menu Actions

Centura Builder Function Reference 2-293


Chapter 2

VisMenuSetFont
Syntax bOk = VisMenuSetFont ( hWnd, hMenu, nPos, hFont sMenuText) Number: hWnd
Number: hMenu Number: nPos Number: hFont String: sMenuText

Description Displays a menu item in the specified font. VisMenuSetFont operates on Centura
menus or menus inserted with the Vis Library.

Parameters hWnd Handle to window containing menu.

hMenu Handle to menu containing item to display picture with.

nPos Zero-based position within the menu of the item. Menu positions include
separators. If negative, identifies a menu item added using VisMenuInsert,
which always returns a negative menu ID value.

hFont Handle to font to use for menu item display. Call VisFontLoad to create a font
handle.

sMenuText Text of item to insert. Specify \t to insert a tab in the text. A tab will separate
the menu text from the accelerator indicator. All text after the tab will be shown
along the right edge of the menu. If the menu text is a null string, the text is
unchanged.

Returns Boolean: TRUE if successful, FALSE if an error occurs.

Related Functions

VisMenuSetPicture, VisMenuSetText

Example On SAM_Create
Set hFont = VisFontLoad ('Arial', 12, FONT_EnhBold) Set hMenu =
VisMenuGetHandle (hWndForm) Set hMenu =
VisMenuGetPopupHandle (hMenu, 2) Set nMenuID = VisMenuSetFont
(hWndForm, hMenu, -1,
hFont, 'Sample\tAlt-S')

2-294 Centura Builder Function Reference


VisMenuSetPicture
Syntax bOk = VisMenuSetPicture ( hWnd, hMenu, nPos, hPicNormal, hPicSelect, sMenuText)
Number: hWnd Number: hMenu Number: nPos Number: hPicNormal Number: hPicSelect
String: sMenuText

Description Displays a picture in a menu item. VisMenuSetPicture operates on Centura menus or


menus inserted with the Vis Library.

Parameters hWnd Handle to window containing menu.

hMenu Handle to menu containing item to display picture with.

nPos Zero-based position within the menu of the item. Menu positions include
separators. If negative, identifies a menu item added using VisMenuInsert, which
always returns a negative menu ID value.

hPicNormal Handle of picture to display in menu item when item is not selected. Call
VisPicLoad to create a picture handle.

hPicSelect Handle of picture to display in menu item when item is selected.


hPicNormal and hPicSelect may be the same.

sMenuText Text of item to insert. Specify \t to insert a tab in the text. A tab will separate
the menu text from the accelerator indicator. All text after the tab will be shown
along the right edge of the menu. If the menu text is a null string, only the
picture will be shown. If a picture and text are specified, the text is always
shown to the right of the picture.

Returns Boolean: TRUE if successful, FALSE if an error occurs.

Related Functions

VisMenuSetFont, VisMenuSetText

Centura Builder Function Reference 2-295


Chapter 2

Example On SAM_Create
Set hPic = VisPicLoad (PIC_LoadResource |
PIC_FormatBitmap, 'Vis.dll', 'bkopen') Set hMenu =
VisMenuGetHandle (hWndForm) Set hMenu =
VisMenuGetPopupHandle (hMenu, 2) Set nMenuID = VisMenuSetPicture
(hWndForm, hMenu, -1,
hPic, 'Sample\tAlt-S')

VisMenuSetText
Syntax bOk = VisMenuSetText ( hWnd, hMenu, nPos, sText) Window
Handle: hWnd Number: hMenu Number: nPos String: sText

Description Changes the text of a menu item. VisMenuSetText operates on Centura menus or
menus inserted with the Vis Library.

Parameters hWnd Handle to window containing menu.

hMenu Handle of menu that contains the menu item to reset text for.

nPos Zero-based position within the menu of the item. Menu positions include
separators. If negative, identifies a menu item added using VisMenuInsert,
which always returns a negative menu ID value.

sText New text to use for the specified menu item. Specify \t to insert a tab in the
text. A tab will separate the menu text from the accelerator indicator. All text
after the tab will be shown along the right edge of the menu.

Returns Boolean: TRUE if successful, FALSE if an error occurs.

Related Functions

VisMenuSetFont, VisMenuSetPicture

Example Set hMenu = VisMenuGetHandle (hWnd) Set hMenu =


VisMenuGetPopupHandle (hMenu, 2) Call VisMenuSetText
(hWndForm, hMenu, 5, 'New Item')

2-296 Centura Builder Function Reference


VisMenuUncheck
Syntax bOk = VisMenuUncheck ( hMenu, nPos) Number:
hMenu Number: nPos

Description Unchecks a menu item. VisMenuUncheck is intended for menu items that have been
inserted using the Vis Library. It also works for Centura menu items but will remove the check mark only
if VisMenuIsChecked is called in the When Checked section of
the Centura outline. This is because VisMenuIsChecked returns the Windows state
of the menu item and VisMenuUncheck will set the Windows state.

Parameters hMenu Handle of menu containing item to uncheck.

nPos Zero-based position within the menu of the item. Menu positions include
separators. If negative, identifies a menu item added using VisMenuInsert, which
always returns a negative menu ID value.

Returns Boolean: TRUE if successful, or FALSE if unsuccessful.

Related Functions

VisMenuIsChecked

Example Set hMenu = VisMenuGetHandle (hWnd) Set hMenu =


VisMenuGetPopupHandle (hMenu, 2) Call VisMenuUncheck ( hWnd,
hMenu, 5)

VisMessageBox
Syntax nReturn = VisMessageBox ( sMsgText, sCaption, hPicIcon, hBtnHandles, nNumButtons)
String: sText String: sCaption Number: hPicIcon Number: hBtnHandles[*] Number:
nNumButtons

Description Displays a message box with user defined buttons and a user defined icon.

Parameters sMsgText Text to be displayed in message box.

sCaption Caption of message box window.

hPicIcon Icon to display in message box. This must be an icon; it cannot be a bitmap.
Call VisPicLoad to create a picture handle. May
be one of the following constants:

Centura Builder Function Reference 2-297


Chapter 2

MBF_IconAsterisk
MBF_IconHand
MBF_IconQuestion
MBF_IconExclamation
hBtnHandles Array of button handles to display. These handles are obtained from a call to VisMessageLoadButton.
The button handle may be OR'ed with MBF_DefButton to set the default focus
button.

nNumButtons Number of buttons contained in hBtnHandles array.

Returns Number: The return value indicating which button is selected. The return value is assigned using
VisMessageLoadButton.

Related Functions

VisMessageFreeButton, VisMessageLoadButton, VisMessageSetBkgdColor

Example Set nReturn = VisMessageBox (' Cannot insert.', 'Error',


MBF_IconHand, hBtns, 3) If
nReturn = ID_Abort
Call SalQuit () Else If
nReturn = ID_Help
Call SalWinHelp (...)

VisMessageFreeButton
Syntax bOk = VisMessageFreeButton ( hBtn) Number:
hBtn

Description Frees memory allocated with VisMessageLoadButton.

Parameters hBtn Handle of button handle to free memory for.

Returns Boolean: TRUE if successful, or FALSE if an error occurs.

Related Functions

VisMessageLoadButton

Example Set bOk = VisMessageFreeButton (hBtn)

2-298 Centura Builder Function Reference


VisMessageLoadButton
Syntax hBtn = VisMessageLoadButton ( sLabel, nReturn) String:
sLabel Number: nReturn

Description Establishes a button to be used in user-defined message boxes.

Parameters sLabel Text label for button.

nReturn Return value if button is clicked in the message box. This value is returned from VisMessageBox
.

Returns Number: The button handle if successful, or NULL if an error occurs.

Related Functions

VisMessageFreeButton

Example On SAM_AppStartup
Set hBtnOk = VisMessageLoadButton ('Ok', ID_OK) Set hBtnHelp
= VisMessageLoadButton ('&Help', ID_Help)

VisMessageSetBkgdColor
Syntax bOk = VisMessageSetBkgdColor ( nColor) Number:
nColor

Description Sets the background color for a VisMessageBox dialog box. All subsequent calls to
VisMessageBox will display a dialog with the color indicated.

Parameters nColor Color to paint the background of the VisMessageBox .

Returns Boolean: TRUE if successful, or FALSE if an error occurs.

Related Functions

VisMessageBox

Example Call VisMessageSetBkgdColor (COLOR_Gray)

VisNumberBitClear
Syntax nResult = VisNumberBitClear ( nValue, nBitMask) Receive
Number: nValue Number: nBitMask

Description Clears bit values from a number.

Centura Builder Function Reference 2-299


Chapter 2

Parameters nValue Number value to clear bits from. The function replaces this number with
the result.

nBitMask Bit mask identifying the bits to clear.

Return Number: The resulting value after mask bits are cleared. This value is also placed in
nValue.

Related Functions

VisNumberBitSet

Example Constants
Number: BIT_Flag1 = 0x0001
Number: BIT_Flag2 = 0x0004
... Actions

Call VisNumberBitClear (nValue, BIT_Flag2)

VisNumberBitSet
Syntax nResult = VisNumberBitSet ( nValue, nBitMask) Receive
Number: nValue Number: nBitMask

Description Sets bit values in a number.

Parameters nValue Number value to set bits for. The function replaces this number with the result.

nBitMask Bit mask identifying the bits to set.

Return Number: The resulting value after mask bits are set. This value is also placed in
nValue.

Related Functions

VisNumberBitClear

Example Constants
Number: BIT_Flag1 = 0x0001
Number: BIT_Flag2 = 0x0004
... Actions

Call VisNumberBitSet (nValue, BIT_Flag2)

2-300 Centura Builder Function Reference


VisNumberChoose
Syntax nNumber = VisNumberChoose ( bExpression, nTrueNumber, nFalseNumber) Boolean:
bExpression Number: nTrueNumber Number: nFalseNumber

Description Evaluates bExpression. If expression is TRUE, it returns nTrueNumber , else it returns


nFalseNumber . The expression may be a constant, expression or variable.

Parameters bExpression Expression to test

nTrueNumber Number returned if expression TRUE.

nFalseNumber Number returned if expression FALSE.

Returns Number: nTrueNumber or nFalseNumber depending on how the expression evaluates.

Related Functions

VisStrChoose

Example Actions
Set nError = VisNumberChoose ( nWnd = hWndNULL, TRUE, FALSE)

VisNumberHighByte
Syntax nNumber = VisNumberHighByte( nNumber) Number:
nNumber

Description Converts the specified number to a WORD and returns the high order 8 bits of the WORD.

Parameters nNumber Number to convert and obtain high 8 bits for.

Return Number: The high order 8 bits.

Related Functions

VisNumberLowByte

Example Actions
Set nValue = 0xC8D4 Set
nHiByte = VisNumberHighByte (nValue)
!nHiByte = OxC8.

Centura Builder Function Reference 2-301


Chapter 2

VisNumberLowByte
Syntax nNumber = VisNumberLowByte( nNumber) Number:
nNumber

Description Converts the specified number to a WORD and returns the low order 8 bits of the WORD.

Parameters nNumber Number to convert and obtain low 8 bits for.

Return Number: The low order 8 bits.

Related Functions

VisNumberHighByte

Example Actions
Set nValue = 0xC8D4 Set
nLowByte = VisNumberLowByte ( nValue)

!nLowByte = OxD4.

VisNumberMakeLong
Syntax nLong = VisNumberMakeLong( nLow, nHigh) Number:
nLow Number: nHigh

Description Creates a double word value (DWORD) from two word values.

Parameters nLow Low order 16 bits.

nHigh High order 16 bits.

Return Number: The combined value.

Example Actions
Set nLow = 0x0101 Set nHigh = 0xABCD Set nLong = VisNumberMakeLong

( nLow, nHigh) ! nLong = 0xaABCD0101

VisPicFree
Syntax nErrCode = VisPicFree ( hPic)
Number: hPic

Description Frees a picture from memory. A picture is either a bitmap or an icon.

2-302 Centura Builder Function Reference


Parameters hPic Handle of picture to free.

Return Number: Zero if successful, or non-zero if an error occurs.

Related Functions

VisPicLoad

Example Set nErrCode = VisPicFree (hPic)

VisPicLoad
Syntax hPic = VisPicLoad ( nFormatFlags, sString1, sString2) Number:
nFormatFlags String: sString1 String: sString2

Description Loads a picture into memory. A picture is either a bitmap or an icon and may be obtained from a file, a
resource-only DLL, a Centura string, or a Centura resource. The maximum size of a picture is 65,633
bytes.

Parameters nFormatFlags Flags indicating the type and format of the picture. One format flag and one load
flag must be OR'ed together. PIC_FormatBitmap PIC_FormatIcon PIC_LoadFile
PIC_LoadResource PIC_SWinRes PIC_SWinStr

sString1 Meaning is determined by the nFormatFlags argument:

PIC_LoadFile
PIC_LoadResource
PIC_SwinRes
PIC_SwinStra
sString2 If PIC_LoadResource is specified, contains the name of the picture
resource to load. Not used for any other load flags.

Return Number: The handle of the specified picture if successful, or NULL if an error occurs.

Related Functions

VisPicFree

Centura Builder Function Reference 2-303


Chapter 2

Example Resources Bitmap:


BookOpen
File Name: c:\mydir\bkopen.bmp
...
Variables
Number: hPicIcon
Number: hPicBmp
Number: hPicRes
...
Message Actions On
SAM_Create
Set hPicIcon = VisPicLoad ( PIC_LoadFile | PIC_FormatIcon,
'c:\\icons\\Vis.ico','')

VisSendMsgString
Syntax nResult = VisSendMsgString ( hWnd, nMessage, wParam, sString) Number: hWnd
Number nMessage Number: wParam String: sString

Description Sends a message and passes a string in lParam. VisSendMsgString should be used to
send Windows SDK messages to a window where a string must be passed. The string is passed as a pointer
(LPSTR).

Parameters hWnd Handle of window to send message to.

nMessage Message number.

wParam WORD parameter

sString String to pass in lParam.

Returns Number: Return value from message.

Example Call VisSendMsgString (hWndItem, LB_FINDSTRING, 0,


sSearchFor)

2-304 Centura Builder Function Reference


VisStrChoose
Syntax sString = VisStrChoose ( bExpression, sTrueString, sFalseString) Boolean:
bExpression String: sTrueString String: sFalseString

Description Evaluates bExpression . If expression is TRUE, it returns sTrueString, else it returns


sFalseString

Parameters bExpression Expression to test

sTrueString String returned if expression TRUE.

sFalseString String returned if expression FALSE.

Returns String: sTrueString or sFalseString depending on how the expression evaluates.

Related Functions

VisNumberChoose

Example Call SalMessageBox ( VisStrChoose (hWnd = hWndNull, 'Window


not created', 'Window created'), "Debug", MB_OK).

VisStrExpand
Syntax sString = VisStrExpand ( sTemplate, hAry) String:
sTemplate Number | String: hAry[*]

Description Expands a template string by inserting one or more array elements. A template string consists of ordinary
characters, and one or more expand specifications. An expand specification has the following format:

%[ , ]type
Expand specifications always begin with a percent sign and are read from left to right. When the first expand
specification is encountered, the value of the first array element is converted and inserted into the return
string.

The second expand specification causes the second element to be inserted, and so on. If there are more array
elements than expand specifications, the extra elements are ignored. Valid types are s, n, and u.

If braces {} are specified in the template, the text between the braces is repeated. If a comma is specified
between the percent sign and the type character, each repeat string is comma delimited before the repeat
string, except the first element.

Centura Builder Function Reference 2-305


Chapter 2

Parameters sTemplate Template to expand.

hAry Array to expand into template. hAry may be a number array or


a string array.

Return String: The expanded string.

Related Functions

VisStrSubstitute

Example Variables
String: sReplaceAry[*]
Actions
Set sReplaceAry[1] = 'myfile' Call
SalMessageBox ( VisStrExpand ('Error:%s File:%s',
sReplaceAry), 'Title', MB_Ok)

VisStrFind
Syntax sString = VisStrFind ( hStrTable, sIdentifier) Number:
hStrTable String: sIdentifier

Description Locates a string within a string table. The string table must be loaded into memory using VisStrLoadTable.

Parameters hStrTable Handle to string table to load string from.

sIdentifier Identifier used to located the string within the string table. Identifiers are
enclosed within braces {} in the string table.

Returns String: The located string, or null string if not found. The entire string after the trailing brace of the
identifier is returned.

Related Functions

VisStrFreeTable, VisStrLoadTable

Example On SAM_AppStartup
Set hStrTable = VisStrLoadTable ('MyStrings.txt') Set sString
= VisStrFind (hStrTable, 'dbError.MyString')

2-306 Centura Builder Function Reference


VisStrFreeTable
Syntax bOk = VisStrFreeTable ( hStrTable) Number:
hStrTable

Description Frees all memory associated with a string table.

Parameters hStrTable Handle to string table to free from memory.

Returns Boolean: TRUE if successful, FALSE if an error occurs.

Related Functions

VisStrFind, VisStrLoadTable

Example Set bOk = VisStrFreeTable (hStrTable)

VisStrLeftTrim
Syntax sString = VisStrLeftTrim ( sSource) String:
sSource

Description Trims leading blanks from a string.

Parameters sSource Source string.

Return String: The trimmed string.

Related Functions

VisStrRightTrim, VisStrTrim

Example Set sTarget = VisStrLeftTrim (' ABC ')


! sTarget = 'ABC '

VisStrLoadTable
Syntax hStrTable = VisStrLoadTable ( sFileName) String:
sFileName

Description Loads a string table from disk into memory. The maximum size of a string table is
65,533 bytes.

Parameters sFileName File name of string table to load. If no path is specified, the current
drive/directory is searched.

Returns String: The handle of the string table if successful, or negative if an error occurs.

Centura Builder Function Reference 2-307


Chapter 2

Related Functions

VisStrFind, VisStrFreeTable

Example Set hStrTable = VisStrLoadTabl e (sFileName)

VisStrPad
Syntax sString = VisStrPad ( sSource, nSize) String:
sSource Number: nSize

Description Pads a string with trailing blanks and returns the result. If the length of the source string is greater than
the size, the source string is truncated.

Parameters sSource String to pad to the specified size.

nSize Size of the string to return.

Return String: The padded string. The return string is always the size specified.

Related Functions

VisStrTrim

Example Set sTarget = VisStrPad (' ABC', 10)

VisStrProper
Syntax sString = VisStrProper ( sSource) String:
sSource

Description Converts a string to mixed case. If the string is all lowercase, the first letter of each word is capitalized. If the
string is all uppercase, the first letter of each word is left capitalized while the remaining letters are made
lowercase. Before the source string is converted, the following delimiters are removed:
~!@#$%^&*()_+-=|\[]{}:";'?,./. After the conversion, the delimiters are reinserted. The first letter following Mc,
Mac, or O' are also capitalized.

Parameters sSource Source string.

Return String: The converted string.

Example Set sTarget = VisStrProper ('M.L. SMITH')

2-308 Centura Builder Function Reference


VisStrRightTrim
Syntax sString = VisStrRightTrim ( sSource) String:
sSource

Description Trims trailing blanks from a string.

Parameters sSource Source string.

Return String: The trimmed string.

Related Functi ons

VisStrLeftTrim, VisStrTrim

Example Set sTarget = VisStrRightTrim (' ABC ')

VisStrScanReverse
Syntax nOffset = VisStrScanReverse ( sSource, nPos, sSearchFor) String:
sSource Number: nPos String: sSearchFor

Description Scans a string for a specified sub-string from the last character to the first. Case is ignored when
performing the search.

Parameters sSource Source string to search.

nPos Position to begin the search, -1 to begin searching from the last character.

sSearchFor String to search for.

Return Number: The position of search string, -1 if string not found.

Example Set nOffset = VisStrScanReverse ('c:\\path\\file', -1,


'\\') If

nOffset = 0

...

VisStrSubstitute
Syntax sString = VisStrSubstitute ( sSource, sSearch, sReplace) String: sSource
String: sSearch String: sReplace

Centura Builder Function Reference 2-309


Chapter 2

Description Substitutes all occurrences of one string with another string.

Parameters sSource Source string.

sSearch String to search for.

sReplace Replacement string.

Return String: The modified string.

Example Set sTarget = VisStrSubstitute ('12ABC34ABC', 'ABC', '*'


! sTarget = '12*34*'

VisStrTrim
Syntax sString = VisStrTrim ( sSource) String:
sSource

Description Trims leading and trailing blanks from a string. It does not adjust embedded brackets.

Parameters sSource Source string

Return String: The trimmed string.

Related Functions

VisStrLeftTrim, VisStrRightTrim

Example Set sTarget = VisStrTrim (' ABC ')

! sTarget = 'ABC'

VisTblAllRows
Syntax bOk = VisTblAllRows ( hWndTable, nFlagsOn, nFlagsOff) Handle:
hWndTable Number: nFlagsOn Number: nFlagsOff

Description Determines whether any rows in the specified table window match certain flags. If multiple flags are
specified in the nFlagsOn parameter, all specified flags must match the row flags (an AND operation is
used to test the flags).

Parameters hWndTable Table window handle.

nFlagsOn Bit flags to test, all bits must exist in the row flag for a valid match.

nFlagsOff Bit flags that the row cannot have. The row cannot have any of the flags
specified.

2-310 Centura Builder Function Reference


ROW_Edited
ROW_Hidden
ROW_HideMarks
ROW_MarkDeleted
ROW_New
ROW_Selected
Returns Boolean: TRUE if successful, or FALSE if an error occurs.

Example If VisTblAllRows (twTable, ROW_New | ROW_Selected, 0)

VisTblAutoSizeColumn
Syntax bOk = VisTblAutoSizeColumn ( hWndTable, hWndColumn) Handle:
hWndTable Handle: hWndColumn

Description Performs a best fit on the display contents of a specific column. A best fit will resize a column based on the
current contents of the displayed columns. The column heading and split window contents are included in
calculating the width.

Parameters hWndTable Table window handle.

hWndColumn Column window handle to auto size. Specify hWndNULL to size all
columns.

Returns Boolean: TRUE if successful, or FALSE if an error occurs.

Example Call VisTblAutoSizeColumn (twTable, colPrice)

VisTblClearColumnSelection
Syntax bOk = VisTblClearColumnSelection ( hWndTable) Handle:
hWndTable

Description Clears selection for all columns of a table window.

Parameters hWndTable Table window handle.

Returns Boolean: TRUE if successful, or FALSE if an error occurs.

Example Call VisTblClearColumnSelection (hWndForm)

Centura Builder Function Reference 2-311


Chapter 2

VisTblFindDateTime
Syntax nRow = VisTblFindDateTime ( hWndTable, nStartRow, hWndColumn, dtDateTime) Handle: hWndTable
Number: nStartRow Number: hWndColumn Date/Time: dtDateTime

Description Locates a date/time value within a column. Searching ends when the last row in the table is checked. A
SAM_FetchRow message is sent for all rows that have not yet been fetched into the cache.

Parameters hWndTable Table window handle.

nStartRow Row number to start the search at.

hWndColumn Handle of column to search or hWndNULL to search all date/ time columns.

dtDateTime Date/time to search for.

Returns Number: The row number if date/time is found, -1 if not found.

Related Functions

VisTblFindNumber, VisTblFindString

Example Set nRow = VisTblFindDateTime (twOrders, 0, colOrderDate,


'10-10-88')

VisTblFindNumber
Syntax nRow = VisTblFindNumber ( hWndTable, nStartRow, hWndColumn, nNumber) Handle: hWndTable
Number: nStartRow Number: hWndColumn Number: nNumber

Description Locates a number value within a column. Searching ends when the last row in the table is checked. A
SAM_FetchRow message is sent for all rows that have not yet been fetched into the cache.

Parameters hWndTable Table window handle.

nStartRow Row number to start the search at.

hWndColumn Handle of column to search or hWndNULL to search all number


columns.

nNumber Number to search for.

2-312 Centura Builder Function Reference


Returns Number: The row number if number is found, -1 if not found.

Related Functions

VisTblFindDateTime, VisTblFindString

Example Set nRow = VisTblFindNumber (twOrders, 0, colPrice, 100)

VisTblFindString
Syntax nRow = VisTblFindString ( hWndTable, nStartRow, hWndColumn, sString) Handle: hWndTable
Number: nStartRow Number: hWndColumn String: sString

Description Locates a string value within a column. The string must match exactly and case is ignored. Searching ends
when the last row in the table is checked. A SAM_FetchRow message is sent for all rows that have not yet
been fetched into the cache. Case is disregarded in the search. You can use pattern matching characters.
The percent character (%) matches any set of characters. The underscore character ( _ ) matches any
single character.

Parameters hWndTable Table window handle.

nStartRow Row number to start the search at.

hWndColumn Handle of column to search or hWndNULL to search all string columns.

sString String to search for.

Returns Number: The row number if string is found, -1 if not found.

Related Functions

VisTblFindDateTime, VisTblFindNumber

Example Set nRow = VisTblFindString (twOrders, 0, colDesc,


'Widget')

Centura Builder Function Reference 2-313


Chapter 2

VisTblGetCell
Syntax sText = VisTblGetCell ( hWndTable, nRow, hWndColumn) Number: nRow
Handle: hWndColumn

Description Retrieves the contents of a cell in a table window. The row specified will be set to the context row.

Parameters hWndtable Table window handle.

nRow Row number to obtain data from.

hWndColumn Column window handle to retrieve text.

Returns String: The cell text, or null string if error occurs.

Related Functions

VisTblGetColumnTitle

Example Set sText = VisTblGetCell (10, colName)

VisTblGetColumnTitle
Syntax sTitle = VisTblGetColumnTitle ( hWndColumn) Handle:
hWndColumn

Description Retrieves the contents of a column heading. The row specified will be set to the context row.

Parameters hWndTable Table window handle .

hWndColumn Column window handle to retrieve column heading for.

Returns String: The column heading, or null string if error occurs.

Related Functions

VisTblGetCell

Example Set sTitle = VisTblGetColumnTitle (colName)

2-314 Centura Builder Function Reference


VisTblSetRowColor
Syntax bOk = VisTblSetRowColor ( hWndTable, nRow, nColor) Handle:
hWndTable Number: nRow Number: nColor

Description Sets the text color for an entire row of a table window.

Parameters hWndTable Table window handle.

nRow Row number to set the text color for.

nColor Color to set for all columns of the row specified.

Returns Boolean: TRUE if successful, or FALSE if an error occurs.

Related Functions

VisTblSetRowPicture, VisTblGetColumnTitle

Example Call VisTblSetRowColor (twOrders, 10, COLOR_Red)

VisTblSetRowPicture
Syntax bOk = VisTblSetRowPicture ( hWndTable, nRowFlag, hPic) Handle:
hWndTable Number: nRowFlag Number: hPic

Description Sets the picture for a bit flag of a table window. When any row contains the bit flag specified, the picture
will be drawn in the row header portion of the table window. Centura normally displays pictures for the
ROW_New, ROW_Edited, and ROW_MarkDeletedFlags. The Centura pictures will no longer be displayed
after the first call to VisTblSetRowPicture. The picture will simply be inverted when the row is selected. A
second picture cannot be displayed when the row is selected.

Parameters hWndTable Table window handle.

nRowFlag Row flag to trigger the display of the picture specified. Pictures may be set for
any of the following row flags: ROW_New ROW_Edited ROW_Markdeleted
ROW_UserFlag1 ROW_UserFlag2 ROW_UserFlag3 ROW_UserFlag4

Centura Builder Function Reference 2-315


Chapter 2

ROW_UserFlag5
hPic Picture to display in the row header when the row contains the specified row
flag. This must be a bitmap; it cannot be an icon. Call VisPicLoad to create a
picture handle.

Returns Boolean: TRUE if successful, or FALSE if an error occurs.

Related Functions

VisTblSetRowColor

Example On SAM_Create
Set hPic = VisPicLoad (PIC_Load Resource |
PIC_FormatBitmap, 'Vis.dll', VISPIC_CheckBlack) Call VisTblSetRowPicture
(twOrders, ROW_New, hPic)

VisWaitCursor
Syntax bOk = VisWaitCursor ( nFlags) Number:
nFlags

Description Turns hourglass cursor on or off. Differs from SalWaitCursor in the following ways:

1. Disables the current application when the hourglass is turned on and enables the application when the
hourglass is turned off.

2. Shows hourglass cursor if no mouse is present (shown in miiddle of screen).

3. Keeps a reference count each time the hourglass is turned on. Turns the hourglass off only when the
reference count is equal to zero. This allows VisWaitCursor to be embedded in low-level functions.

Parameters nFlags TRUE to display the cursor as an hourglass and FALSE to display as an
arrow. TRUE FALSE WAIT_SysModalOn WAIT_SysModalOff
WAIT_TempOn WAIT_TempOff

Return Boolean: No return value.

Example Call VisWaitCursor (WAIT_TempOff)


Call SalMessageBox ('Error Occurred', 'Error', MB_OK) Call
VisWaitCursor (WAIT_TempOn)

2-316 Centura Builder Function Reference


VisWinClearAllEditFlags
Syntax nNumCleared = VisWinClearAllEditFlags ( hWnd{Parent) Window
Handle: hWndParent

Description Clears the field edit flags for each data field or multi-line text field of a parent window. To prevent
clearing an edit flag for an individual window, set the WF_NoClearEditFlag flag with a call to
VisWinSetFlags.

Parameters hWndParent Window handle of parent window to clear all edit flags of.

Return Number: The number of fields cleared, or negative if an error occurs.

Related Functions

VisWinClearAllFields

Example Message Actions On


SAM_Create
Call VisWinSetFlags (hWndItem, SWF_NoClearEditFlag) Actions

Call VisWinClearAllEditFlags (hWndForm)

VisWinClearAllFields
Syntax nNumCleared = VisWinClearAllFields ( hWndParent) Window
Handle: hWndParent

Description Clears all child fields of a parent window. Data fields, multi-line text, list boxes, combo boxes, check
boxes, radio buttons, and child table windows are cleared. To prevent clearing a window, set the
WF_NoClear flag with a call to VisWinSetFlags.

Parameters hWndParent Window handle of parent window to clear all child fields of.

Return Number: The number of fields cleared, or negative if an error occurs.

Related Functions

VisWinClearAllEditFlags

Centura Builder Function Reference 2-317


Chapter 2

Example Message Actions On


SAM_Create
Call VisWinSetFlags (hWndItem, SWF_NoClear) Actions Call VisWinClearAllFields

(hWndForm)

VisWinEnumProps
Syntax nNumItems = VisWinEnumProps ( hWnd, sPropStrings, sValues) Window Handle:
hWnd String: sPropStrings[*] String: sValues[*]

Description Enumerates the property list for a specified window. A property list can be used to define
application-specific attributes for a window. Use property lists sparingly as each string takes up system
resource space.

Parameters hWnd Window handle of window to get the property list of.

sPropStrings Array to contain all the property list strings.

sValues Array to contain the property values.

Return Number: The number of property list entries returned, or -1 if window handle is invalid.

Related Functions

VisWinGetProp, VisWinRemoveProp, VisWinSetProp

Example Variables
String: sPropStrings[*]
Number: nPropValues[*]
... Actions

Set dfReturn = VisWinEnumProps ( hWndForm, sPropStrings,


nPropValues)

VisWinFreeAccelerator
Syntax bOk = VisWinFreeAccelerator ( hAcc) Handle:
hAcc

Description Clears an accelerator for a window, along with all memory associated with the accelerator.

Parameters hAcc Handle to accelerator.

2-318 Centura Builder Function Reference


Returns Boolean: TRUE if successful, FALSE if an error occurs.

Related Functions

VisWinGetProp

Example Set bOk = VisWinFreeAccelerator ( hAcc)

VisWinGetFlags
Syntax nWinFlags = VisWinGetFlags ( hWnd) Handle:
hWnd

Description Retrieves window flags for a window.

Parameters hWnd Window handle to retrieve flags for.

Returns Number: The window flags of window specified. To test a bit flag, use the bitwise AND (&) operator.
Options are: WF_Required WF_NoClear WF_NoClearEditFlag WF_EnableWhenNotNull WF_FitPath
WF_DisplayOnly

Related Functions

VisWinSetFlags

Example Actions
Set nFlags = VisWinGetFlags (hWndForm)

VisWinGetHandle
Syntax hWnd = VisWinGetHandle ( hWndDialog, sContext, nWindowType) Window Handle:
hWndDialog String: sContext Number: nWindowType

Description Obtains a window handle based on the window type and a context string. Under Centura, the
bStaticsAsWindows variable must be set to TRUE in order for Centura to create actual windows.
Otherwise, Centura paints the background text and the window handle does not exist.

Parameters hWndDialog Window handle of dialog box containing window handles to search for.

Centura Builder Function Reference 2-319


Chapter 2

sContext Context string to uniquely identify the window.

nWindowType Centura type:

TYPE_BkgdText

TYPE_GroupBox
Return Window Handle: The window handle if successful, or NULL if window not found.

Example Actions
Set hWnd = VisWinGetHandle (hWndForm, 'Sample:',
TYPE_BkgdText)

VisWinGetProp
Syntax nValue = VisWinGetProp ( hWnd, sPropString) Window
Handle: hWnd String: sPropString

Description Retrieves a value from the property list of a specified window. A property list can be used to define
application-specific attributes for a window. Use property lists sparingly as each string takes up system
resource space.

Parameters hWnd Window handle of window to get the property list for.

sPropString Context string used to identify the property list.

Return Number: The property value of the window. Zero may indicate no property exists, or the window has a
property with the value of zero.

Related Functions

VisWinRemoveProp, VisWinSetProp

Example Set nValue = VisWinGetProp ( hWnd, sPropString)

VisWinGetStyle
Syntax nStyle = VisWinGetStyle ( hWnd) Window
Handle: hWnd

Description Retrieves the Windows style bits for a specified window. These style bits are documented in the
Windows SDK documentation.

Parameters hWnd Window handle of window to retrieve style bits of.

Return Number: The style bits of the window specified, or -1 if window is invalid.

2-320 Centura Builder Function Reference


Related Functions

VisWinSetStyle

Example Variables
Number: nStyle
... Actions

Set nStyle = VisWinGetStyle (hWndForm)

VisWinGetText
Syntax sString = VisWinGetText ( hWnd) Window
Handle: hWnd

Description Obtains the text of a window. Window text is the title of a form window, dialog box, table window, radio
button, check box, background text or push button. For a data field, multi-line text field or table window
column, window text is the current contents. Note: Use VisTblGetColumnTitle to get the title of a table
window column.

Parameters hWnd Window to obtain text for.

Returns String: The window text, if successful, or null string if error occurs.

Example Radio Button: rbSample


Title: Option:
...
Actions
Set sText = VisWinGetText (rbSample)
! sText = 'Option:'

VisWinIsChild
Syntax bOk = VisWinIsChild ( hWndParent, hWndChild) Window
Handle: hWndParent Window Handle: hWndChild

Description Tests whether a specified window is a child or direct descendant of a parent window.

Parameters hWndParent Window handle of parent window.

hWndChild Window handle of child window to test for.

Return Boolean: TRUE if child is a descendant, FALSE if not a descendant.

Centura Builder Function Reference 2-321


Chapter 2

Related Functions

VisWinIsWindow

Example Actions
If VisWinIsChild (hWndForm, pbOk)
...

VisWinIsMaximized
Syntax bOk = VisWinIsMaximized ( hWnd) Window
Handle: hWnd

Description Tests whether a specified window is maximized.

Parameters hWnd Window handle of window to test.

Return Boolean: TRUE if window maximized, FALSE if not maximized.

Related Functions

VisWinIsMinimized, VisWinIsRestored

Example Actions
If VisWinIsMaximized (hWndForm)

VisWinIsMinimized
Syntax bOk = VisWinIsMinimized ( hWnd) Window
Handle: hWnd

Description Tests whether a specified window is minimized.

Parameters hWnd Window handle of window to test.

Return Boolean: TRUE if window minimized, FALSE if not minimized

Related Functions

VisWinIsMaximized, VisWinIsRestored

Example Actions
If VisWinIsMinimized (hWndForm)

2-322 Centura Builder Function Reference


VisWinIsRequiredFieldNull
Syntax hWnd = VisWinIsRequiredFieldNull ( hWndParent) Handle:
hWndParent

Description Tests to determine if any required field is null.

Parameters hWndParent Handle of parent window to test. If any child window is required and
contains a null value,
VisWinIsRequiredFieldNull returns TRUE.

Returns Window Handle: Handle of first required field that contains no value, or null if all required fields are
non-null.

Example Dialog Box: dbTest


Contents
Data Field: dfPrice
...
Message Actions
On SAM_Create
Call VisWinSetFlags (hWndItem, SWF_Required)
...
Pushbutton: pbOk
...
Message Actions
On SAM_Click
Set hWnd = VisWinIsRequiredFieldNull (dbTest)
If hWnd
Call SalMessageBox ('Required field contains no value',
'Error', MB_OK) Call SalSetFocus (hWnd) Return FALSE

VisWinIsRestored
Syntax bOk = VisWinIsRestored ( hWnd) Window
Handle: hWnd

Description Tests whether a specified window is neither maximized or minimized.

Parameters hWnd Window handle of window to test.

Return Boolean: TRUE if window restored, FALSE if not maximized or minimized

Centura Builder Function Reference 2-323


Related Functions

Vi sWinIsMaximized, VisWinIsMinimized

Example Actions
If VisWinIsRestored (hWndForm)

VisWinIsWindow
Syntax bOk = VisWinIsWindow ( hWnd) Window
Handle: hWnd

Description Tests whether a specified window is valid.

Parameters hWnd Window handle of window to test.

Return Boolean: TRUE if window valid, FALSE if invalid

Related Functions

VisWinIsChild

Example Actions
If VisWinIsWindow ( hWndForm)

VisWinLoadAccelerator
Syntax hAcc = VisWinLoadAccelerator ( hWndNotify, nMsg, nKeyDownState, nVirtualKey, nValue)

Handle: hWndNotify
Number: nMsg
Number: nKeyDownState
Number: nVirtualKey Number:
nValue

Description Sets an accelerator keystroke for a window. If the accelerator is pressed, the specified window is notified
with the specified message. The lParam of the message sent will contain the accelerator handle.

Parameters hWndNotify Window to notify when the accelerator is pressed.

nMsg Message to send to the window specified when the accelerator is pressed.

nKeyDownState Flag indicating the keys held down in combination with the virtual key.
Options are: KDS_None KDS_Shift
KDS_Ctrl
KDS_ShiftCtrl
KDS_Alt KDS_AltCtrl
KDS_AltShift
KDS_ShiftAltCtrl

nVirtualKey Virtual key to act as accelerator. See the Appendix for a complete
listing of virtual key codes.

nValue Any application defined value that will be passed in lParam of the message sent
when the accelerator is pressed. This can be used to pass menu ID values when
menu accelerators are used.

Returns Handle: Handle to accelerator if successful, NULL if an error occurs.

Related Functions

VisWinFreeAccelerator

Example Pushbutton: pbExpand


Variables
Number: hAcc
...
Message Actions
On SAM_Create
Set hAcc = VisWinLoadAccelerator (pbExpand, SAM_Click,
KDS_Alt, VK_Plus, 0) On
SAM_Destroy
Call VisWinFreeAccelerator (hAcc)

VisWinMove
Syntax bOk = VisWinMove ( hWnd, nLeft, nTop, nWidth, nHeight) Handle: hWnd
Number: nLeft Number: nTop Number: nWidth Number: nHeight

Description Moves and resizes a window, based on pixel coordinates. If the window is a form window or table window,
the coordinates are relative to the screen. If the window is a child window, the coordinates are relative to
the parent window's client area.

Parameters hWnd Handle of window to move.

Centura Builder Function Reference 2-325


Chapter 2

nLeft Identifies the new position of the left side of the window.

nTop Identifies the new position of the top of the window.

nWidth Identifies the new width of the window.

nHeight Identifies the new height of the window.

Returns Boolean: TRUE if successful, or FALSE if an error occurs.

Example Actions
Call VisWinMove ( hWnd, 10, 25, 425, 200)

VisWinRemoveProp
Syntax bOk = VisWinRemoveProp ( hWnd, sPropString) Window
Handle: hWnd String: sPropString

Description Removes a property list entry for a specified window. A property list can be used to define
application-specific attributes for a window. Use property lists sparingly as each string takes up system
resource space.

Parameters hWnd Window handle of window to remove the property list from.

sPropString Context string used to identify the property list.

Return Boolean: TRUE is entry was removed, FALSE if window handle invalid or property does not exist.

Related Functions

VisWinGetProp, VisWinSetProp

Example Set bOk = VisWinRemoveProp ( hWnd, sPropString)

VisWinSetFlags
Syntax bOk = VisWinSetFlags ( hWnd, nWinFlags, bState) Handle:
hWnd Number: nWinFlags Boolean: bState

Description Sets flags for a specified window.

Parameters hWnd Window handle to set flags for.

nWinFlags Window flags to set. Options are:


WF_Required WF_NoClear

2-326 Centura Builder Function Reference


WF_NoClearEditFlag
WF_EnableWhenNotNull
WF_FitPath WF_DisplayOnly

bState TRUE to set the flags, FALSE to remove the flags.

Returns Boolean: TRUE if successful, or FALSE if an error occurs.

Related Functions

VisWinGetFlags

Example On SAM_Create
Call VisWinSetFlags (hWndItem, SWF_DisplayOnly, TRUE)

VisWinSetMeter
Syntax nErrCode = VisWinSetMeter ( hWnd, nPercent) Window
Handle: hWnd Number: nPercent

Description Displays a completion meter within a Centura data field. The complete portion is displayed in the
current text color and the incomplete portion is displayed in the current background color.

Parameters hWnd Window handle of a data field to display the completion meter in. This must be
the window handle of a data field.

nPercent Percentage complete to display within meter (0-100).

Return Number: Zero if successful, or negative if an error occurs.

Example Actions
Call VisWinSetMeter (dbMeter, 0)

VisWinSetProp
Syntax bOk = VisWinSetProp ( hWnd, sPropString, nValue) Window
Handle: hWnd String: sPropString Number: nValue

Description Adds a new property list entry or changes an existing property list entry for a specified window. A property
list can be used to define application-specific attributes for a window. Use property lists sparingly as each
string takes up system resource space.

Centura Builder Function Reference 2-327


Chapter 2

Parameters hWnd Window handle of window to set the property list for.

sPropString Context string used to identify the property.

nValue Value stored with the property (application specific).

Return Boolean: TRUE if entry was added or changed, FALSE if window handle invalid.

Related Functions

VisWinGetProp, VisWinRemoveProp

Example’ Set bOk = VisWinSetProp ( hWnd, sPropString, nValue)

VisWinSetStyle
Syntax bOk = VisWinSetStyle ( hWnd, nStyle, bState) Window
Handle: hWnd Number: nStyle Boolean: bState

Description Adds a window style to a window. It does not set the style to the style bits passed in, rather it adds or
removes the style bits to the current style of the window.

Parameters hWnd Window handle of window to change style of.

nStyle Style bits to set or clear. The style bits are documented in the Windows SDK
documentation.

bState TRUE to turn the style bits on or FALSE to turn style bits off.

Return Boolean: TRUE if the function succeeded, FALSE if the function failed.

Related Functions

VisWinGetStyle

Example Actions
Call VisWinSetStyle (hWndItem, ES_AUTOHSCROLL)

2-328 Centura Builder Function Reference


VisWinSetTabOrder
Syntax bOk = VisWinSetTabOrder ( hWnd, hWndInsertAfter) Window
Handle: hWnd Window Handle: hWndInsertAfter

Description Changes the tab order of a control. If hWndInsertAfter is NULL, the window is
removed from the tab order.

Parameters hWnd Window handle of window to set tab order.

hWndInsertAfter Window handle of window to be inserted after this window.

Return Boolean: TRUE if successful, FALSE if an error occurs.

Example Actions Call VisWinSetTabOrder

(hWndItem, NULL)

VisWinShow
Syntax bOk = VisWinShow ( hWnd, nShowFlag) Window
Handle: hWnd Number: nShowFlag

Description Sets a window's visibility state.

Parameters hWnd Window handle of window to show.

nShowFlag Specifies how the window is to be shown:


SHOW_Hidden SHOW_Minimized
SHOW_Maximized SHOW_Normal

Return Boolean: TRUE if window previously was visible, FALSE if previously hidden.

Example Actions
Call VisWinShow ( hWndForm, SHOW_Maximized)

Centura Builder Function Reference 2-329


Index Centura Builder Function Reference

prints 1-43 reports 1-43


A scroll bar 1-44 SQL 1-44
array functions 1-17 string conversion 1-47 table
window 1-48 window
management
C
Centura function categories 1-17
1-51
Centura functions 1-1, 2-1
types system 1-2
L
Centura system functions 1-2 list and combo box functions 1-31
obsolete 1-16
color and font functions 1-17 M
Compuserve xxvii Manipulating Background Text functions 1-33
Conventions used in the manual xxvi Manipulating background text functions 1-33
Manual description of xxvi
D MDI functions 1-36
data type conversion functions 1-19 message functions
date functions 1-20 DDE 1-36
functions 1-21 debugging miscellaneous functions 1-37
functions 1-22 dialog box
functions 1-23 drag drop N
functions 1-25 number functions 1-40

E P
edit functions 1-26 picture functions 1-42 print
functions 1-43
F
file management functions 1-27 S
format and validation functions 1-29 SalAbort 2-2 SalAppDisable 2-2
functions array SalAppEnable 2-3 SalAppFind 2-3
1-17 SalArrayAvg 2-4 SalArrayDimCount
data type conversion 1-19 2-4 SalArrayGetLowerBound 2-5
date 1-20 DDE 1-21 SalArrayGetUpperBound 2-5
debugging 1-22 SalArrayIsEmpty 2-6 SalArrayMax
dialog box 1-23 drag 2-7 SalArrayMin 2-7
drop 1-25 edit 1-26 SalArraySetUpperBound

file management 1-27


format and validation 1-29 list and 2-8
combo box 1-31 manipulating SalArraySum 2-8
background text 1-33 SalBringWindowToTop 2-9
MDI 1-36 message 1-36 SalCenterWindow 2-9
miscellaneous 1-37 SalClearField 2-10
number 1-40 picture SalColorFromRGB 2-10
1-42 SalColorGet 2-11
SalColorGetSysColor 2-11

Centura Builder Function Reference Index-1


SalColorSet 2-12 SalColorToRGB SalDDEStopSession 2-37
2-13 SalCompileAndEvaluate 2-13 SalDestroyWindow 2-37
SalContextCurrent SalDisableWindow 2-38
2-15 SalDisableWindowAndLabel 2-38
SalCreateWindow 2-15 SalDlgChooseColor 2-39
SalCreateWindowExWithParms 2-16 SalDlgChooseFont 2-39
SalCursorClear 2-18 SalDlgOpenFile 2-40 SalDlgSaveFile
SalCursorSet 2-18 2-42 SalDragDropDisableDrop 2-43
SalCursorSetFile 2-19 SalDragDropEnableDrop
SalCursorSetString 2-19 2-44
SalDateConstruct 2-20 SalDragDropGetSource 2-44
SalDateCurrent 2-21 SalDragDropGetTarget 2-45
SalDateDay 2-21 SalDateHour SalDragDropStart 2-45
2-21 SalDateMinute 2-22 SalDragDropStop 2-45
SalDateMonth 2-22 SalDrawMenuBar 2-46
SalDateMonthBegin 2-22 SalDropFilesAcceptFiles 2-46
SalDateQuarter SalDropFilesQueryFiles 2-47
2-23 SalDropFilesQueryPoint 2-48
SalDateQuarterBegin 2-23 SalEditCanCopyTo 2-48
SalDateSecond 2-23 SalEditCanCut 2-49
SalDateToStr 2-24 SalEditCanPaste 2-49
SalDateWeekBegin 2-24 SalEditCanPasteFrom 2-49
SalDateWeekday 2-25 SalEditCanUndo 2-50 SalEditClear
SalDateYear 2-25 2-50 SalEditCopy 2-50
SalDateYearBegin 2-25 SalEditCopyString 2-51
SalDDEAddAtom 2-26 SalEditCopyTo 2-51 SalEditCut 2-51
SalDDEAlloc 2-26 SalEditPaste 2-52 SalEditPasteFrom
SalDDEDeleteAtom 2-27 2-52 SalEditPasteString 2-53
SalDDEExtract 2-27 SalEditUndo 2-53 SalEnableWindow
SalDDEExtractCmd 2-27 2-54 SalEnableWindowAndLabel
SalDDEExtractDataText 2-28
SalDDEExtractOptions 2-28
SalDDEFindAtom 2-29
SalDDEFree 2-29 2-54
SalDDEGetAtomName 2-30 SalEndDialog 2-54 SalFileClose
SalDDEGetExecuteString 2-30 2-55 SalFileCopy 2-55
SalDDEPost 2-30 SalFileCreateDirectory 2-56
SalDDERequest 2-31 SalFileGetC 2-56 SalFileGetChar
SalDDESend 2-32 2-57 SalFileGetCurrentDirectory
SalDDESendAll 2-32
SalDDESendExecute 2-33 2-57
SalDDESendToClient 2-34 SalFileGetDateTime 2-57
SalDDESetCmd 2-34 SalFileGetDrive 2-58
SalDDESetDataText 2-35 SalFileGetStr 2-58 SalFileOpen
SalDDESetOptions 2-35 2-59 SalFileOpenExt 2-59
SalDDEStartServer 2-36 SalFilePutC 2-60
SalDDEStartSession 2-36 SalFilePutChar 2-60
SalDDEStopServer 2-37

Index-2 Centura Builder Function Reference


SalFilePutStr 2-61 SalHStringToNumber 2-86
SalFileRead 2-61 SalInvalidateWindow 2-86
SalFileRemoveDirectory 2-62 SalIsButtonChecked 2-86
SalFileSeek 2-62 SalIsNull 2-87
SalFileSetCurrentDirectory 2-63 SalIsValidDateTime 2-87
SalFileSetDateTime 2-63 SalIsValidDecimal 2-87
SalFileSetDrive 2-63 SalFileTell SalIsValidInteger 2-88
2-64 SalFileWrite 2-64 SalIsValidNumber 2-89
SalFmtFieldToStr 2-64 SalIsWindowEnabled 2-89
SalFmtFormatDateTime SalIsWindowVisible 2-89
2-65 SalListAdd 2-90 SalListClear 2-90
SalFmtFormatNumber 2-66 SalListDelete 2-91 SalListFiles
SalFmtGetFormat 2-66, 2-67 2-91 SalListGetMultiSelect 2-92
SalFmtGetInputMask 2-67 SalListInsert 2-92 SalListPopulate
SalFmtIsValidField 2-68 2-92 SalListQueryCount
SalFmtIsValidInputMask 2-69
SalFmtIsValidPicture 2-69
SalFmtKeepMask 2-70 2-93
SalFmtSetFormat 2-71 SalListQueryFile 2-94
SalFmtSetInputMask 2-72 SalListQueryMultiCount 2-94
SalFmtSetPicture 2-72 SalListQuerySelection 2-94
SalFmtStrToField 2-73 SalListQueryState 2-95
SalFmtUnmaskInput 2-73 SalListQueryText 2-95
SalFmtValidateField 2-74 SalListQueryTextLength 2-96
SalFontGet 2-74 SalListQueryTextX 2-95, 2-96
SalFontGetNames 2-75 SalListRedraw 2-96
SalFontGetSizes 2-75 SalListSelectString 2-97
SalFontSet 2-76 SalListSetMultiSelect 2-97
SalFormGetParmNum 2-76 SalListSetSelect 2-98
SalFormUnitsToPixels 2-77 SalListSetTabs 2-98 SalLoadApp
SalGetDataType 2-77 2-99 SalLoadAppAndWait 2-99
SalGetDefButton 2-78 SalMapEnterToTab 2-101
SalGetFirstChild 2-78 SalMDIArrangeIcons 2-101
SalGetFocus 2-79 SalMDICascade 2-101 SalMDITile
SalGetItemName 2-79 2-102 SalMessageBeep
SalGetMaxDataLength 2-79
SalGetNextChild 2-80 2-102
SalGetProfileInt 2-80 SalMessageBox 2-103
SalGetProfileString 2-81 SalModalDialog 2-104
SalGetType 2-82 SalGetVersion SalModalDialogFromStr 2-106
2-82 SalGetWindowLabelText SalMoveWindow 2-106
2-83 SalNumberAbs 2-107
SalGetWindowLoc 2-83 SalNumberArcCos 2-107
SalGetWindowSize 2-84 SalNumberArcSin 2-107
SalGetWindowState 2-84 SalNumberArcTan 2-108
SalGetWindowText 2-84 SalNumberArcTan2 2-108
SalHideWindow 2-85 SalNumberCos 2-108
SalHideWindowAndLabel 2-85 SalNumberCosH 2-109

Centura Builder Function Reference Index-3


SalNumberExponent 2-109 SalReportDlgOptions 2-130
SalNumberHigh 2-109 SalReportGetDateTimeVar 2-131
SalNumberHypot 2-110 SalReportGetNumberVar 2-131
SalNumberLog 2-110 SalReportGetObjectVar 2-132
SalNumberLogBase10 2-110 SalReportGetStringVar 2-132
SalNumberLow 2-111 SalReportPrint 2-133
SalNumberMax 2-111 SalReportPrintToFile 2-134
SalNumberMin 2-111 SalReportReset 2-136
SalNumberMod 2-112 SalReportSetDateTimeVar 2-136
SalNumberPi 2-112 SalReportSetNumberVar 2-137
SalNumberPower 2-112 SalReportSetObjectVar 2-137
SalNumberRandInit 2-113 SalReportSetStringVar 2-138
SalNumberRandom 2-113 SalReportTableCreate 2-138
SalNumberRound 2-114 SalReportTablePrint 2-139
SalNumberSin 2-114 SalReportTableView 2-140
SalNumberSinH 2-114 SalReportView 2-140
SalNumberSqrt 2-115 SalScrollGetPos 2-142
SalNumberTan 2-115 SalScrollGetRange 2-142
SalNumberTanH 2-115 SalScrollSetPos 2-143
SalNumberToChar 2-116 SalScrollSetRange 2-143
SalNumberToHString 2-116 SalSendClassMessage 2-144
SalNumberToStr 2-116 SalSendClassMessageNamed 2-144
SalNumberToStrX 2-117 SalSendMsg 2-145
SalNumberToWindowHandle 2-117 SalSendMsgToChildren 2-145
SalNumberTruncate 2-118 SalSendValidateMsg 2-146
SalParentWindow 2-118 SalSetDefButton 2-146
SalPicClear 2-119 SalSetFieldEdit 2-147
SalPicGetDescription 2-119 SalSetFocus 2-147
SalPicGetString 2-120 SalPicSet 2-120 SalSetMaxDataLength 2-148
SalPicSetFile 2-121 SalPicSetFit 2-121 SalSetProfileString 2-148
SalPicSetString 2-122 SalSetWindowLabelText 2-149
SalPixelsToFormUnits 2-123 SalSetWindowLoc 2-149
SalPostMsg 2-123 SalSetWindowSize 2-149
SalPrtExtractRect SalSetWindowText 2-150
SalShowWindow 2-150
2-124 SalShowWindowAndLabel 2-151
SalPrtGetDefault 2-124 SalStatusGetText 2-151
SalPrtGetParmNum 2-125 SalStatusSetText 2-152
SalPrtPrintForm 2-125 SalStatusSetVisible 2-152
SalPrtSetDefault 2-126 SalStrCompress 2-152
SalPrtSetParmDefaults 2-126 SalStrFirstC 2-153
SalPrtSetParmNum 2-127 SalStrGetBufferLength 2-153
SalPrtSetup 2-127 SalStrIsValidCurrency 2-154
SalQueryFieldEdit 2-128 SalStrIsValidDateTime 2-154
SalQuit 2-128 SalReportClose SalStrIsValidNumber 2-155
2-129 SalReportCmd 2-129 SalStrLeft 2-155 SalStrLeftX 2-156
SalReportCreate 2-129 SalStrLength 2-156

Index-4 Centura Builder Function Reference


SalStrLop 2-157 SalTblPopulate 2-180
SalStrLower 2-157 SalTblQueryCheckBoxColumn 2-182
SalStrMid 2-158 SalTblQueryColumnCellType 2-182
SalStrProper 2-158 SalTblQueryColumnFlags 2-183
SalStrRepeat 2-159 SalTblQueryColumnID 2-183
SalStrRepeatX 2-159 SalStrReplace SalTblQueryColumnPos 2-183
2-159 SalStrReplaceX 2-159 SalTblQueryColumnWidth 2-184
SalStrRight 2-160 SalStrRightX SalTblQueryContext 2-184
2-160 SalStrScan 2-161 SalTblQueryDropDownListColumn 2-184
SalStrSetBufferLength 2-162 SalTblQueryFocus 2-185
SalStrToDate 2-162 SalStrTokenize SalTblQueryLinesPerRow 2-185
2-163 SalStrToNumber 2-163 SalTblQueryLockedColumns 2-186
SalStrTrim 2-164 SalStrTrimX 2-164 SalTblQueryPopupEditColumn 2-186
SalStrUncompress SalTblQueryRowFlags 2-187
SalTblQueryRowHeader 2-187
SalTblQueryScroll 2-188
SalTblQuerySplitWindow 2-188
2-165 SalTblQueryTableFlags 2-189
SalStrUpper 2-165 SalStrUpperX 2-165 SalTblQueryVisibleRange 2-189
SalTBarSetVisible 2-166 SalTblAnyRows SalTblReset 2-189 SalTblScroll 2-190
2-166 SalTblClearSelection 2-167 SalTblSetCellTextColor
SalTblColumnAverage 2-167 2-190
SalTblColumnSum 2-167 SalTblSetColumnFlags 2-191
SalTblCopyRows 2-168 SalTblSetColumnPos 2-191
SalTblCreateColumn 2-168 SalTblSetColumnText 2-192
SalTblDefineCheckBoxColumn SalTblSetColumnTitle 2-192
SalTblSetColumnWidth 2-192
2-169 SalTblSetContext 2-193
SalTblDefineDropDownListColumn 2-170 SalTblSetFlagsAnyRows 2-193
SalTblDefinePopupEditColumn 2-170 SalTblSetFocusCell 2-194
SalTblDefineRowHeader 2-171 SalTblSetFocusRow 2-195
SalTblDefineSplitWindow 2-171 SalTblSetLinesPerRow 2-195
SalTblDeleteRow 2-172 SalTblSetLockedColumns 2-195
SalTblDeleteSelected 2-172 SalTblSetRange 2-196
SalTblDestroyColumns 2-173 SalTblSetRow 2-196
SalTblDoDeletes 2-173 SalTblSetRowFlags 2-197
SalTblDoInserts 2-174 SalTblSetTableFlags 2-197
SalTblDoUpdates 2-175 SalTblSortRows 2-198
SalTblFetchRow 2-175 SalTimerKill 2-198 SalTimerSet
SalTblFindNextRow 2-176 2-199 SalTrackPopupMenu 2-199
SalTblFindPrevRow 2-177 SalUpdateWindow 2-200
SalTblGetColumnText 2-178 SalUseRegistry 2-201
SalTblGetColumnTitle 2-178 SalValidateSet
SalTblGetColumnWindow 2-178 2-201
SalTblInsertRow 2-179 SalTblKillEdit SalWaitCursor 2-202
2-179 SalTblKillFocus 2-180 SalWindowClassName 2-202
SalTblPasteRows SalWindowGetProperty 2-203
2-180 SalWindowHandleToNumber 2-203

Centura Builder Function Reference Index-5


SalWindowIsDerivedFromClass 2-203 SqlSetOutMessage 2-228
SalWinHelp 2-204 SqlSetParameter 2-228
SalYieldEnable 2-205 SqlSetParameterAll 2-229
SalYieldQueryState 2-205 SqlSetResultSet 2-229
SalYieldStartMessages 2-205 SqlStore 2-230 string conversion
SalYieldStopMessages 2-206 functions 1-47
scroll bar functions 1-44 SQL
functions 1-44 T
SqlClearImmediate 2-206 table window functions 1-48
SqlClose 2-206 SqlCommit 2-207
SqlConnect 2-207 V
SqlContextClear 2-208 VisArrayAppend 2-231 VisArrayCopy
SqlContextSet 2-227 VisArrayDeleteItem 2-233
2-208 VisArrayFillDateTime 2-233
SqlContextSetToForm 2-209 VisArrayFillNumber 2-234
SqlDirectoryByName 2-209 VisArrayFillString 2-234
SqlDisconnect 2-209 VisArrayFindDateTime 2-235
SqlDropStoredCmd 2-210 SqlError 2-210 VisArrayFindNumber 2-235
SqlErrorText 2-210 SqlExecute 2-211 VisArrayFindString 2-236
SqlExecutionPlan 2-212 SqlExists 2-212 VisArrayInsertItem 2-237
SqlExtractArgs 2-212 SqlFetchNext VisArraySort 2-237 VisDebugAssert
2-213 SqlFetchPrevious 2-214 2-238 VisDebugBeginTime 2-239
SqlFetchRow 2-214 SqlGetError 2-214 VisDebugEndTime 2-239
SqlGetErrorPosition 2-215 VisDebugGetFlags 2-240
SqlGetErrorText 2-215 VisDebugSetFlags 2-240
SqlGetErrorTextX 2-216 VisDebugSetLevel
SqlGetLastStatement
2-241
VisDebugSetTime 2-241
VisDebugString 2-242
VisDosBuildFullName 2-242
2-216 VisDosEnumDirInfo 2-243
SqlGetModifiedRows 2-217 VisDosEnumDirs 2-244
SqlGetParameter 2-217 VisDosEnumDrives 2-244
SqlGetParameterAll 2-218 VisDosEnumFileInfo 2-245
SqlGetResultSetCount 2-218 VisDosEnumFiles 2-246
SqlGetRollbackFlag 2-219 VisDosEnumNetConnections 2-247
SqlImmediate 2-219 VisDosEnumPath 2-248
SqlImmediateContext 2-220 VisDosEnumsShortDirInfo 2-249
SqlOpen 2-221 VisDosEnumsShortDirs 2-249
SqlPLSQLCommand 2-221 VisDosEnumsShortFileInfo 2-250
SqlPrepare 2-223 VisDosEnumsShortFiles 2-251
SqlPrepareAndExecute 2-224 VisDosExist 2-251
SqlRetrieve 2-225 VisDosGetCurDir 2-252
SqlSetInMessage 2-225 VisDosGetDriveSize 2-252
SqlSetIsolationLevel 2-226 VisDosGetDriveType 2-253
SqlSetLockTimeout 2-226 VisDosGetEnvString 2-254
SqlSetLongBindDatatype 2-227 VisDosGetFlags 2-254

Index-6 Centura Builder Function Reference


VisDosGetNetName 2-255 VisListFindValue 2-280
VisDosGetVersion 2-255 VisListGetDropdownState 2-281
VisDosGetVolumeLabel 2-256 VisListGetFocusIndex 2-281
VisDosIsParent 2-256 VisListGetVisibleRange 2-282
VisDosMakeAllDir 2-257 VisListInsertValue 2-282
VisDosMakePath 2-257 VisListIsMultiSelect 2-283
VisDosNetConnect 2-258 VisListLoadOutline 2-283
VisDosNetDisconnect 2-258 VisListLoadOutlineFile 2-284
VisDosSetFlags 2-259 VisListSaveOutline 2-285 VisListScroll
VisDosSetVolumeLabel 2-259 2-285 VisListSetDropdownState 2-286
VisDosSplitPath 2-260 VisErrorRecovery VisListSetFocusIndex 2-286
2-261 VisFileAppend 2-261 VisFileClose VisListSetScrollWidth 2-287
2-262 VisFileCopy 2-262 VisMenuGetPopupHandle
VisFileCreateTemp 2-263 VisFileDelete 2-287
2-263 VisFileExpand 2-263 VisFileFind VisMenuGetSystemHandle 2-288
2-264 VisFileGetAttribute 2-264 VisMenuGetText 2-288
VisFileGetSize 2-265 VisFileGetType VisMenuInsert 2-289
2-265 VisFileOpen 2-266 VisFileRead VisMenuInsertFont 2-290
2-267 VisFileReadString 2-268 VisMenuInsertPicture 2-291
VisFileRename 2-268 VisFileSeek 2-269 VisMenuIsChecked 2-292
VisFileSetAttribute 2-269 VisMenuIsEnabled 2-293
VisFileSetDateTime 2-270 VisFileTell 2-271 VisMenuSetFont 2-294
VisFileWrite 2-271 VisFileWriteString VisMenuSetPicture 2-295
2-272 VisFontEnum 2-272 VisFontFree VisMenuSetText 2-296
2-273 VisFontGet 2-273 VisFontLoad VisMenuUncheck 2-297
2-274 VisGetCopyright 2-275 VisMessageBox 2-297
VisGetKeyState 2-275 VisMessageFreeButton 2-298
VisGetSystemMetrics 2-275 VisMessageLoadButton 2-299
VisGetVersion 2-276 VisGetWinFlags VisMessageSetBkgdColor 2-299
2-276 VisGetWinVersion 2-277 VisNumberBitClear 2-299
VisListAddValue 2-277 VisNumberBitSet 2-300
VisListArrayPopulate 2-278 VisNumberChoose 2-301
VisListArrayPopulateValue 2-278 VisNumberHighByte 2-301
VisListClearSelection 2-279 VisNumberLowByte 2-302
VisListDeleteSelected 2-279 VisNumberMakeLong 2-302
VisListFindString 2-280 VisPicFree 2-302 VisPicLoad 2-303
VisSendMsgString 2-304
VisStrChoose 2-305 VisStrExpand
2-305 VisStrFind 2-306
VisStrFreeTable 2-307
VisStrLeftTrim 2-307
VisStrLoadTable 2-307 VisStrPad
2-308 VisStrProper 2-308
VisStrRightTrim 2-309
VisStrScanReverse

2-309

Centura Builder Function Reference Index-7


VisStrSubstitute 2-309 VisStrTrim 2-310
VisTblAllRows 2-310 VisTblAutoSizeColumn
2-311 VisTblClearColumnSelection 2-311
VisTblFindDateTime 2-312
VisTblFindNumber 2-312 VisTblFindString
2-313 VisTblGetCell 2-314
VisTblGetColumnTitle 2-314
VisTblSetRowColor 2-315
VisTblSetRowPicture 2-315 VisWaitCursor 2-316
VisWinClearAllEditFlags 2-317
VisWinClearAllFields 2-317
VisWinEnumProps 2-318
VisWinFreeAccelerator

2-318
VisWinGetFlags 2-319 VisWinGetHandle
2-319 VisWinGetProp 2-320
VisWinGetStyle 2-320 VisWinGetText
2-321 VisWinIsChild 2-321
VisWinIsMaximized 2-322
VisWinIsMinimized 2-322
VisWinIsRequiredFieldNull 2-323
VisWinIsRestored 2-323 VisWinIsWindow
2-324 VisWinLoadAccelerator 2-324
VisWinMove 2-325 VisWinRemoveProp
2-326 VisWinSetFlags 2-326
VisWinSetMeter 2-327 VisWinSetProp
2-327 VisWinSetStyle 2-328
VisWinSetTabOrder 2-329 VisWinShow 2-329

W
window management functions 1-51

Index-8 Centura Builder Function Reference


Centura Builder Function Reference Index-9

También podría gustarte