.head 0 + Application Description: Centura SQLWindows/32 Standard Application Template .head 1 - Outline Version - 4.0.27 .head 1 + Design-time Settings .data VIEWINFO 0000: 6F00000001000000 FFFF01000D004347 5458566965775374 6174650400010000 0020: 0000000000CA0000 002C000000020000 0003000000FFFFFF FFFFFFFFFFFCFFFF 0040: FFE9FFFFFFFFFFFF FF000000007C0200 004D010000010000 0000000000010000 0060: 000F4170706C6963 6174696F6E497465 6D02000000075769 6E646F777309646C 0080: 674D7367426F78 .enddata .head 2 - Outline Window State: Normal .head 2 + Outline Window Location and Size .data VIEWINFO 0000: 6600040003002D00 0000000000000000 0000B71E5D0E0500 1D00FFFF4D61696E 0020: 0000000000000000 0000000000000000 0000003B00010000 00000000000000E9 0040: 1E800A00008600FF FF496E7465726E61 6C2046756E637469 6F6E730000000000 0060: 0000000000000000 0000000000003200 0100000000000000 0000E91E800A0000 0080: DF00FFFF56617269 61626C6573000000 0000000000000000 0000000000000000 00A0: 3000010000000000 00000000F51E100D 0000F400FFFF436C 6173736573000000 00C0: 0000000000000000 0000000000000000 .enddata .data VIEWSIZE 0000: D000 .enddata .head 3 - Left: -0.013" .head 3 - Top: 0.0" .head 3 - Width: 8.013" .head 3 - Height: 4.969" .head 2 + Options Box Location .data VIEWINFO 0000: D4180909B80B1A00 .enddata .data VIEWSIZE 0000: 0800 .enddata .head 3 - Visible? No .head 3 - Left: 4.15" .head 3 - Top: 1.885" .head 3 - Width: 3.8" .head 3 - Height: 2.073" .head 2 + Class Editor Location .head 3 - Visible? No .head 3 - Left: 0.575" .head 3 - Top: 0.094" .head 3 - Width: 5.063" .head 3 - Height: 2.719" .head 2 + Tool Palette Location .head 3 - Visible? No .head 3 - Left: 6.388" .head 3 - Top: 0.729" .head 2 - Fully Qualified External References? Yes .head 2 - Reject Multiple Window Instances? No .head 2 - Enable Runtime Checks Of External References? Yes .head 2 - Use Release 4.0 Scope Rules? No .head 1 + Libraries .head 2 - File Include: vtpic.apl .head 1 + Global Declarations .head 2 + Window Defaults .head 3 + Tool Bar .head 4 - Display Style? Etched .head 4 - Font Name: MS Sans Serif .head 4 - Font Size: 8 .head 4 - Font Enhancement: System Default .head 4 - Text Color: System Default .head 4 - Background Color: System Default .head 3 + Form Window .head 4 - Display Style? Etched .head 4 - Font Name: MS Sans Serif .head 4 - Font Size: 8 .head 4 - Font Enhancement: System Default .head 4 - Text Color: System Default .head 4 - Background Color: System Default .head 3 + Dialog Box .head 4 - Display Style? Etched .head 4 - Font Name: MS Sans Serif .head 4 - Font Size: 8 .head 4 - Font Enhancement: System Default .head 4 - Text Color: System Default .head 4 - Background Color: System Default .head 3 + Top Level Table Window .head 4 - Font Name: MS Sans Serif .head 4 - Font Size: 8 .head 4 - Font Enhancement: System Default .head 4 - Text Color: System Default .head 4 - Background Color: System Default .head 3 + Data Field .head 4 - Font Name: Use Parent .head 4 - Font Size: Use Parent .head 4 - Font Enhancement: Use Parent .head 4 - Text Color: Use Parent .head 4 - Background Color: Use Parent .head 3 + Multiline Field .head 4 - Font Name: Use Parent .head 4 - Font Size: Use Parent .head 4 - Font Enhancement: Use Parent .head 4 - Text Color: Use Parent .head 4 - Background Color: Use Parent .head 3 + Spin Field .head 4 - Font Name: Use Parent .head 4 - Font Size: Use Parent .head 4 - Font Enhancement: Use Parent .head 4 - Text Color: Use Parent .head 4 - Background Color: Use Parent .head 3 + Background Text .head 4 - Font Name: Use Parent .head 4 - Font Size: Use Parent .head 4 - Font Enhancement: Use Parent .head 4 - Text Color: Use Parent .head 4 - Background Color: Use Parent .head 3 + Pushbutton .head 4 - Font Name: Use Parent .head 4 - Font Size: Use Parent .head 4 - Font Enhancement: Use Parent .head 3 + Radio Button .head 4 - Font Name: Use Parent .head 4 - Font Size: Use Parent .head 4 - Font Enhancement: Use Parent .head 4 - Text Color: Use Parent .head 4 - Background Color: Use Parent .head 3 + Check Box .head 4 - Font Name: Use Parent .head 4 - Font Size: Use Parent .head 4 - Font Enhancement: Use Parent .head 4 - Text Color: Use Parent .head 4 - Background Color: Use Parent .head 3 + Option Button .head 4 - Font Name: Use Parent .head 4 - Font Size: Use Parent .head 4 - Font Enhancement: Use Parent .head 3 + Group Box .head 4 - Font Name: Use Parent .head 4 - Font Size: Use Parent .head 4 - Font Enhancement: Use Parent .head 4 - Text Color: Use Parent .head 4 - Background Color: Use Parent .head 3 + Child Table Window .head 4 - Font Name: Use Parent .head 4 - Font Size: Use Parent .head 4 - Font Enhancement: Use Parent .head 4 - Text Color: Use Parent .head 4 - Background Color: Use Parent .head 3 + List Box .head 4 - Font Name: Use Parent .head 4 - Font Size: Use Parent .head 4 - Font Enhancement: Use Parent .head 4 - Text Color: Use Parent .head 4 - Background Color: Use Parent .head 3 + Combo Box .head 4 - Font Name: Use Parent .head 4 - Font Size: Use Parent .head 4 - Font Enhancement: Use Parent .head 4 - Text Color: Use Parent .head 4 - Background Color: Use Parent .head 3 + Line .head 4 - Line Color: Use Parent .head 3 + Frame .head 4 - Border Color: Use Parent .head 4 - Background Color: 3D Face Color .head 3 + Picture .head 4 - Border Color: Use Parent .head 4 - Background Color: Use Parent .head 2 + Formats .head 3 - Number: 0'%' .head 3 - Number: #0 .head 3 - Number: ###000 .head 3 - Number: ###000;'($'###000')' .head 3 - Date/Time: hh:mm:ss AMPM .head 3 - Date/Time: M/d/yy .head 3 - Date/Time: MM-dd-yy .head 3 - Date/Time: dd-MMM-yyyy .head 3 - Date/Time: MMM d, yyyy .head 3 - Date/Time: MMM d, yyyy hh:mm AMPM .head 3 - Date/Time: MMMM d, yyyy hh:mm AMPM .head 2 + External Functions .head 2 + Constants .data CCDATA 0000: 3000000000000000 0000000000000000 00000000 .enddata .data CCSIZE 0000: 1400 .enddata .head 3 - System .head 3 - User .head 2 - Resources .head 2 - Variables .head 2 + Internal Functions .head 3 - ! ! Dialogs .head 3 + Function: SalDlgBox .head 4 - Description: author: gb date: 2000 version: 1.00 SalDlgBox: Own configurable MessageBox Parameter: 1. Text 2. Title 3. Text of the buttons (seperated with ; ), e.g. 'OK;Cancel;Retry;Ignore' 4. Number of the button which has the focus 5. Icon (the std constants like,..MB_IconQuestion, MB_Icon... or a icon handle of a own loaded icon) 6. Checkboxtext, only visible when the string is not null ("Donґt show this question again" ) 7. Returns the Checkbox state (TRUE /FALSE ) Return: Number of the button which was clicked (starting with 1) Example: Select Case SalDlgBox('This is the text...', 'and this is the title', 'OK;Cancel;Retry;Ignore', 4, MB_IconQuestion) Case 1 !..OK clicked... Break Case 2 !... Cancel clicked... Break ------with custom icons/bitmaps-------- Set lhPicCustom = VisPicLoad( PIC_FormatIcon | PIC_LoadSWinRes,'icoTest','') Select Case SalDlgBox('This is the text...', 'and this is the title', 'OK', 1, lhPicCustom) ... Call VisPicFree( lhPicCustom ) .head 4 + Returns .head 5 - Number: .head 4 + Parameters .head 5 + String: psMsg .data INHERITPROPS 0000: 0100 .enddata .head 6 - ! Text to display .head 5 + String: psTitle .data INHERITPROPS 0000: 0100 .enddata .head 6 - ! title of the window .head 5 + String: psBtnTxt .data INHERITPROPS 0000: 0100 .enddata .head 6 - ! Text of the buttons (seperated with ; ), e.g. 'OK;Cancel;Retry;Ignore' .head 5 + Number: pnFocus .head 6 - ! Button, which has of default the focus .head 5 + Number: pnIcon .head 6 - ! Icon (the std constants like,..MB_IconQuestion, MB_Icon... or a icon handle of a own loaded icon) .head 5 + String: psCheckBoxText .head 6 - ! Checkboxtext, only visible when the string is not null ("Donґt show this question again" ) .head 5 + Receive Boolean: rbCheckBoxState .data INHERITPROPS 0000: 0100 .enddata .head 6 - ! Returns the Checkbox state (TRUE /FALSE ) .head 4 - Static Variables .head 4 + Local variables .head 5 - Number: lnReturn .data INHERITPROPS 0000: 0100 .enddata .head 5 - Boolean: lbCheckBoxState .head 4 + Actions .head 5 - Set lbCheckBoxState = rbCheckBoxState .head 5 - Set lnReturn = SalModalDialog(dlgMsgBox, hWndForm, psMsg, psTitle, psBtnTxt, pnFocus, pnIcon, psCheckBoxText, lbCheckBoxState ) .head 5 - Set rbCheckBoxState = lbCheckBoxState .head 5 - Return lnReturn .head 3 + Function: SalDlgODBCManage .head 4 - Description: author: T. Wiedmann date: 16.0.6.2003 version: 1.00 desc Show the ODBC datasources dialog example: Call SalDlgODBC(hWndForm) See also: SalDlgODBCCreate .head 4 + Returns .head 5 - Boolean: .head 4 + Parameters .head 5 - Window Handle: p_hWnd .head 4 - Static Variables .head 4 + Local variables .head 5 - Boolean: lbRet .head 4 + Actions .head 5 - ! .head 5 - Set lbRet = SQLManageDataSources(p_hWnd) .head 5 - ! .head 5 - Return lbRet .head 3 + Function: SalDlgODBCCreate .head 4 - Description: author: T. Wiedmann date: 16.0.6.2003 version: 1.00 desc Show the create dialog for ODBC datasources example: Call SalDlgODBCCreate(hWndForm, 'MyDatasource') See also: SalDlgODBCManage .head 4 + Returns .head 5 - Boolean: .head 4 + Parameters .head 5 - Window Handle: p_hWnd .head 5 - String: p_sDataSourceName .head 4 - Static Variables .head 4 + Local variables .head 5 - Boolean: lbRet .head 4 + Actions .head 5 - ! ! .head 5 - Set lbRet = SQLCreateDataSource(p_hWnd,p_sDataSourceName) .head 5 - ! ! .head 5 - Return lbRet .head 3 + Function: SalDlgShell .head 4 - Description: author: Thomas Wiedmann date: ??? version: 1.00 desc: Opens the shell run dialog example: Call SalDlgShell(hWndForm,0,TRUE,'Centura say run..','Do it..!',0) --custom Call SalDlgShell(hWndForm,0,TRUE,STRING_Null,STRING_Null,0) --default .head 4 - Returns .head 4 + Parameters .head 5 - Window Handle: p_hOwner .head 5 - Number: p_nIcon .head 5 - ! Boolean: p_bMRUString .head 5 - String: p_sTitle .head 5 - String: p_sPrompt .head 5 - Number: p_nFlags .head 4 - Static Variables .head 4 + Local variables .head 5 - Number: lnSize .head 4 + Actions .head 5 + ! If p_bMRUString = TRUE -- commented because of crashs .head 6 - Set p_nFlags = 0x2 .head 5 - ! .head 5 - Set lnSize = SalStrLength(p_sTitle) .head 5 - Call SalStrSetBufferLength(p_sTitle,lnSize+1) .head 5 - ! .head 5 - Set lnSize = SalStrLength(p_sPrompt) .head 5 - Call SalStrSetBufferLength(p_sPrompt,lnSize+1) .head 5 - ! .head 5 - Call SHRunDialog(p_hOwner,p_nIcon,STRING_Null,p_sTitle,p_sPrompt,p_nFlags) .head 3 + Function: SalDlgConnectToPrinter .head 4 - Description: author: Based on "Peter Pietzk, BasicPro 5/2001, Windows-Standarddialoge, S.67f ----------------------------------------------- 19.02.2002 Thomas Wiedmann http://www.toolbox-mag.de http://www.cul.de/db2.html RUNDLL32.APT show some more Windows Dialogs : date: ??? Version: ??? desc: Opens the printer config dialog example: Call SalDlgConnectToPrinter() .head 4 + Returns .head 5 - Number: .head 4 - Parameters .head 4 - Static Variables .head 4 - Local variables .head 4 + Actions .head 5 + If SalLoadApp('rundll32.exe', 'shell32.dll,SHHelpShortcuts_RunDLL AddPrinter' ) .head 6 - Return TRUE .head 5 + Else .head 6 - Return FALSE .head 3 + Function: SalDlgConnectToNet .head 4 - Description: .head 4 - Returns .head 4 + Parameters .head 5 - Window Handle: phWndParent .data INHERITPROPS 0000: 0100 .enddata .head 4 - Static Variables .head 4 - Local variables .head 4 + Actions .head 5 - Call WNetConnectionDialog(phWndParent, RESOURCETYPE_DISK ) .head 3 + Function: SalDlgCopyDisk .head 4 - Description: author: Based on "Peter Pietzk, BasicPro 5/2001, Windows-Standarddialoge, S.67f ----------------------------------------------- 19.02.2002 Thomas Wiedmann http://www.toolbox-mag.de http://www.cul.de/db2.html RUNDLL32.APT show some more Windows Dialogs : date: ??? Version: ??? desc: Opens the copy dialog example: Call SalDlgCopyDisk( 'A:', 'C:' ) .head 4 + Returns .head 5 - Boolean: .head 4 + Parameters .head 5 - String: p_sFromDisk .head 5 - String: p_sToDisk .head 4 - Static Variables .head 4 + Local variables .head 5 - Number: lnRet .head 5 - String: lsFromDisk .head 5 - String: lsToDisk .head 5 - String: lsFrom .head 5 - String: lsTo .head 4 + Actions .head 5 - Set lsFromDisk = SalStrUpperX(SalStrTrimX(p_sFromDisk)) .head 5 - Set lsToDisk = SalStrUpperX(SalStrTrimX(p_sToDisk)) .head 5 - Set lsFromDisk = SalStrLeftX(lsFromDisk,1) .head 5 - Set lsToDisk = SalStrLeftX(lsToDisk,1) .head 5 - ! .head 5 + If lsFromDisk = 'A' .head 6 - Set lsFrom = '0' .head 5 + Else If lsFromDisk = 'B' .head 6 - Set lsFrom = '1' .head 5 + Else .head 6 - Return FALSE .head 5 - ! .head 5 + If lsToDisk = 'A' .head 6 - Set lsTo = '0' .head 5 + Else If lsToDisk = 'B' .head 6 - Set lsTo = '1' .head 5 + Else .head 6 - Return FALSE .head 5 - ! .head 5 + If SalLoadApp('rundll32.exe', 'diskcopy.dll,DiskCopyRunDll ' || lsFrom || ', ' || lsTo) .head 6 - Return TRUE .head 5 + Else .head 6 - Return FALSE .head 5 - ! .head 3 + Function: SalDlgOpenWith .head 4 - Description: author: Based on "Peter Pietzk, BasicPro 5/2001, Windows-Standarddialoge, S.67f ----------------------------------------------- 19.02.2002 Thomas Wiedmann http://www.toolbox-mag.de http://www.cul.de/db2.html RUNDLL32.APT show some more Windows Dialogs : date: ??? Version: ??? desc: Opens the "OpenWith"- dialog example: Call SalDlgOpenWith( 'C:\Temp\Test.txt') .head 4 + Returns .head 5 - Number: .head 4 + Parameters .head 5 - String: p_sFilename .head 4 - Static Variables .head 4 + Local variables .head 5 - Number: lnRet .head 4 + Actions .head 5 + If SalLoadApp('rundll32.exe', 'shell32.dll,OpenAs_RunDLL ' || p_sFilename) .head 6 - Return TRUE .head 5 + Else .head 6 - Return FALSE .head 3 + Function: SalDlgOpenFileStd .head 4 - Description: author: Marco Sanchez (marcoa_sanchez@yahoo.com) Based on OpenFile.app by : © Christian Astor date: 02.05.2002 version: 1.00 description: Displays Standard Open File Dialog Use it instead of SalDlgOpenFile() Parameters: hWndOwner Window Handle. The handle (or name) of the owner of the dialog box. Specify hWndNULL if it has no owner. sDlgTitle String. The title of the Open file dialog box. sFilters String. An array of file filters and their descriptions. Each filter must have a description that precedes the filter in the array. as in SalDlgOpenFile() sInitialDir String. Initial Dir for the dialog sDefaultExtension String. Default extension in case the user doesn't type it nFlags Number. Combination of OFN_ constantsT bPlacesBar Boolean. Specifies wheter to display the "Places" bar when using the explorer style sSelectedDirectory Receive String. The directory where the file(s) where selected sSelectedFiles[*] Receive String. The selected file(s) Return Value bRet is TRUE if the user specifies a file name and FALSE if the user clicks the Cancel push button. example: Set sTab[0] = "All Files" Set sTab[1] = "*.*" Set sTab[2] = "Text Files (*.txt)" Set sTab[3] = "*.txt" Set nFlags = 0 If cbMultipleSelection Set nFlags = nFlags | OFN_ALLOWMULTISELECT If cbMustExist Set nFlags = nFlags | OFN_FILEMUSTEXIST If cbExplorer Set nFlags = nFlags | OFN_EXPLORER If Not cbRead_Only Set nFlags = nFlags | OFN_HIDEREADONLY Call SalArraySetUpperBound( strFiles, 1, -1 ) If SalDlgOpenFileX(hWndForm,dfTitle, sTab,dfInitialDir,dfDefaultExtension,nFlags, cbPlacesBar, strDirectory, strFiles ) .head 4 + Returns .head 5 - Boolean: .head 4 + Parameters .head 5 - Window Handle: hWndOwner .head 5 - String: sDlgTitle .head 5 - String: sFilters[*] .head 5 - String: sInitialDir .head 5 - ! String: psFile .head 5 - String: sDefaultExtension .head 5 - Number: nFlags .head 5 - Boolean: bPlacesBar .head 5 - Receive String: sSelectedDirectory .head 5 - Receive String: sSelectedFiles[*] .head 4 - Static Variables .head 4 + Local variables .head 5 - Number: nIndex .head 5 - Number: nCpt .head 5 - Number: nAddr .head 5 - String: sFilter .head 5 - String: sFile .head 5 - String: sFileTitle .head 5 - String: sFileArray[*] .head 5 - Number: nFileOffset .head 5 - Number: nFileExtension .head 5 - Number: nLength .head 5 - String: sBuffer .head 5 - Number: ncMonikers .head 5 - Number: nFlagsEx .head 5 - Number: hLibrary .head 5 - String: sTemplate .head 5 - Number: nIndexSelected .head 5 - Boolean: bResult .head 5 - Number: nDim .head 5 - Number: nOffset .head 5 - Boolean: bInclude .head 5 - Number: nStructSize .head 5 - Boolean: bFinish .head 4 + Actions .head 5 - Call SalArrayGetUpperBound( sFilters, 1, nDim ) .head 5 - Call SalStrSetBufferLength( sFilter, 260 ) .head 5 - Set nCpt = 0 .head 5 - Set nOffset = 0 .head 5 + While nCpt <= nDim .head 6 - Call CStructPutString( sFilter, nOffset, SalStrLength(sFilters[nCpt])+ 1, sFilters[nCpt] ) .head 6 - Set nOffset = nOffset + SalStrLength(sFilters[nCpt])+ 1 .head 6 - Set nCpt = nCpt + 1 .head 5 - Call CStructPutByte( sFilter, nOffset, 0 ) .head 5 - ! .head 5 - Set nIndex = 1 .head 5 - Set nAddr = CStructAllocFarMem( 1000 ) .head 5 - Call SalStrSetBufferLength( sFile, 1000 ) .head 5 - Call CStructCopyFromFarMem( nAddr, sFile, 1000 ) .head 5 - Call CStructPutString( sFile, 0, 1, "" ) .head 5 - Call CStructPutByte( sFile, 2, 0 ) .head 5 - Call SalStrSetBufferLength( sFileTitle, 260 ) .head 5 - Call CStructPutString( sFileTitle, 0, 1,"" ) .head 5 - Call CStructPutByte( sFileTitle, 2, 0 ) .head 5 + If (nFlags & OFN_EXPLORER) .head 6 - Set sTemplate = "#101" .head 5 + Else .head 6 - Set sTemplate = "#1536" .head 5 + If bPlacesBar .head 6 - Set nFlagsEx = OFN_EX_NOPLACESBAR .head 5 + Else .head 6 - Set nFlagsEx = 0 .head 5 - Set ncMonikers = 0 .head 5 - Set nStructSize = 76 .head 5 + If VisDosGetVersion( ) >= 5! For W2K, WXP .head 6 - Set nStructSize = 88 .head 5 + If GetOpenFileNameA( nStructSize, hWndOwner, hLibrary, sFilter, STRING_Null, 0, nIndex, sFile, 1000, sFileTitle, 260, sInitialDir, sDlgTitle, nFlags, nFileOffset, nFileExtension, sDefaultExtension, 0, 0, sTemplate,0,0,nFlagsEx ) .head 6 - Set bResult=TRUE .head 6 + If ((nFlags & OFN_EXPLORER) and (nFlags & OFN_ALLOWMULTISELECT)) or ((nFlags & OFN_EXPLORER) and (nFlags & OFN_ENABLEHOOK)) or ((nFlags & OFN_EXPLORER) and (nFlags & OFN_ENABLETEMPLATE)) or ((nFlags & OFN_EXPLORER) and (nFlags & OFN_ENABLETEMPLATEHANDLE)) or not (nFlags & OFN_ALLOWMULTISELECT) .head 7 - Call SalStrSetBufferLength( sBuffer, 260 ) .head 7 - Set nLength = CStructGetString( sFile, 0, 260, sBuffer ) .head 7 + If nLength .head 8 - Set sSelectedDirectory=sBuffer .head 8 - ! sSelectedFiles .head 7 - Call SalStrSetBufferLength( sBuffer, 260 ) .head 7 - Set nLength = CStructGetString( sFile, nFileOffset, 260, sBuffer ) .head 7 - Set nFileOffset = nFileOffset + SalStrLength(sBuffer) + 1 .head 7 - Set nCpt = 0 .head 7 + While nLength .head 8 - Call SalStrSetBufferLength( sBuffer, 260 ) .head 8 - Set nLength = CStructGetString( sFile, nFileOffset , 260, sBuffer ) .head 8 + If nLength .head 9 - ! Call SalListAdd( lbSelectedFiles, sBuffer ) .head 9 - Set sSelectedFiles[nIndexSelected] = sBuffer .head 9 - Set nIndexSelected = nIndexSelected + 1 .head 8 + Else If nCpt = 0 .head 9 - Set sSelectedFiles[nIndexSelected] = sSelectedDirectory .head 9 - Set nIndexSelected = nIndexSelected + 1 .head 8 - Set nCpt = 1 .head 8 - Set nFileOffset = nFileOffset + SalStrLength(sBuffer) + 1 .head 6 + Else .head 7 - Call SalArraySetUpperBound( sFileArray, 1, -1 ) .head 7 - Set nLength = SalStrTokenize( sFile, " ", " ", sFileArray ) .head 7 - Set nCpt = 0 .head 7 + If nLength > 1 .head 8 - Set sSelectedDirectory=sFileArray[0] .head 8 - Set nCpt = 1 .head 7 + Else .head 8 - ! eXTRACT dIRECTORY .head 8 - Set sSelectedDirectory=sFileArray[0] .head 7 + While nCpt <= nLength .head 8 - ! Set bInclude=TRUE .head 8 + ! If nCpt = 0 .head 9 - Set sSelectedDirectory=sFileArray[nCpt] .head 9 + If nFlags & OFN_ALLOWMULTISELECT .head 10 - Set bInclude=FALSE .head 8 - ! If bInclude .head 8 - Set sSelectedFiles[nIndexSelected] = sFileArray[nCpt] .head 8 - Set nIndexSelected = nIndexSelected + 1 .head 8 - Set nCpt = nCpt + 1 .head 6 - ! Extract the dir .head 6 + If sSelectedDirectory != sSelectedFiles[0] .head 7 + If SalStrRightX( sSelectedDirectory, 1 ) != "\\" .head 8 - Set sSelectedDirectory=sSelectedDirectory || "\\" .head 6 + Else .head 7 - ! Only 1 file selected .head 7 - Set nIndex = SalStrLength( sSelectedDirectory ) .head 7 + While Not (bFinish) .head 8 + If SalStrMidX( sSelectedDirectory, nIndex, 1 ) = "\\" .head 9 - Set bFinish = TRUE .head 8 + Else .head 9 - Set nIndex = nIndex -1 .head 9 + If nIndex < 0 .head 10 - Set bFinish = TRUE .head 7 - Set sSelectedDirectory=SalStrLeftX( sSelectedDirectory, nIndex ) || "\\" .head 7 - Set sSelectedFiles[0]=SalStrRightX( sSelectedFiles[0], SalStrLength( sSelectedFiles[0] )-nIndex - 1 ) .head 5 - Return bResult .head 3 + Function: SalDlgBrowseFolder .head 4 - Description: author: ??? date: version: 1.00 desc: Displays Windows' own browse dialog example: if SalDlgBrowseFolder( hWndForm,'Select a directory','...','Select a directory', BIF_BROWSEFORCOMPUTER, sFolder ) parameter: nFlags: BIF_BROWSEFORCOMPUTER = 0x1000 ! Browsing for Computers BIF_BROWSEFORPRINTER = 0x2000 ! Browsing for Printers BIF_BROWSEINCLUDEFILES = 0x4000 ! Browsing for Everything BIF_DONTGOBELOWDOMAIN = 0x0002 ! Don't show network folders BIF_EDITBOX = 0x0010 ! Show data field for editing BIF_RETURNFSANCESTORS = 0x0008 ! Show only file system anchestors BIF_RETURNONLYFSDIRS = 0x0001 ! Show only file system directories BIF_STATUSTEXT = 0x0004 ! Show status area with status text BIF_VALIDATE = 0x0020 ! Validate the content of the data field .head 4 + Returns .head 5 - Boolean: ! TRUE if user hit OK, FALSE otherwise .head 4 + Parameters .head 5 - Window Handle: hWndOwner .head 5 + String: sTitle .head 6 - ! title of dialog, leave blank for standard title! .head 5 + String: sSubTitle .head 6 - ! subtitle of dialog .head 5 + String: sStatusText .head 6 - ! status text .head 5 + Number: nFlags .head 6 - ! BIF_BROWSEFORCOMPUTER = 0x1000 ! Browsing for Computers BIF_BROWSEFORPRINTER = 0x2000 ! Browsing for Printers BIF_BROWSEINCLUDEFILES = 0x4000 ! Browsing for Everything BIF_DONTGOBELOWDOMAIN = 0x0002 ! Don't show network folders BIF_EDITBOX = 0x0010 ! Show data field for editing BIF_RETURNFSANCESTORS = 0x0008 ! Show only file system anchestors BIF_RETURNONLYFSDIRS = 0x0001 ! Show only file system directories BIF_STATUSTEXT = 0x0004 ! Show status area with status text BIF_VALIDATE = 0x0020 ! Validate the content of the data field .head 5 + Receive String: sFolder .head 6 - ! in: initial folder, out: folder chosen by user .head 4 - Static Variables .head 4 + Local variables .head 5 - Number: hProc .head 5 - Number: pProc .head 5 - Number: nPathID .head 5 - String: sHelp .head 5 - Number: nHelp .head 4 + Actions .head 5 - ! .head 5 - Set sHelp = " " .head 5 - Set sHelp = sFolder .head 5 - Call SalStrSetBufferLength ( sHelp, 254 ) .head 5 - Call SalStrSetBufferLength ( sSubTitle, 254 ) .head 5 - Set nHelp = 0 .head 5 + If sSubTitle = STRING_Null .head 6 - Set sSubTitle = " " .head 5 - ! .head 5 - Set nPathID = SHBrowseForFolder ( hWndOwner, 0, sHelp, sSubTitle, nFlags, pProc, 0, nHelp ) .head 5 + If nPathID != 0 .head 6 - ! User chose a path, get it .head 6 - Call SalStrSetBufferLength ( sFolder, 254 ) .head 6 - Call SHGetPathFromIDList ( nPathID, sFolder ) .head 6 - ! .head 6 - ! this row was inserted after the article was printed and avoids memory leaks .head 6 - Call GlobalFree ( nPathID ) .head 6 - ! .head 6 - Return TRUE .head 5 - ! .head 5 - Return FALSE .head 3 + Function: SalDlgSysAbout .head 4 - Description: author: tl date: 16.06.2003 version: 1.00 desc: Shows the shell system about dialog .head 4 - Returns .head 4 + Parameters .head 5 - Window Handle: phWndParent .head 5 - String: psTitle .head 5 - String: psText .head 4 - Static Variables .head 4 - Local variables .head 4 + Actions .head 5 - Call ShellAboutA(phWndParent,psTitle,psText,NUMBER_Null ) .head 3 + Function: SalDlgSysDateTime .head 4 - Description: author: tl date: 16.06.2003 version: 1.00 desc: show the system datetime dialog .head 4 - Returns .head 4 - Parameters .head 4 - Static Variables .head 4 - Local variables .head 4 + Actions .head 5 - Call WinExec("control timedate.cpl", SW_NORMAL) .head 3 + Function: SalDlgFileProperties .head 4 - Description: author: taken from C. ASTOR sample date: 14.11.2003 version: 1.00 desc: show the file property dialog .head 4 - Returns .head 4 + Parameters .head 5 - String: sPath .data INHERITPROPS 0000: 0100 .enddata .head 4 - Static Variables .head 4 + Local variables .head 5 - Number: hInstApp .data INHERITPROPS 0000: 0100 .enddata .head 5 - Number: hProcess .data INHERITPROPS 0000: 0100 .enddata .head 4 + Actions .head 5 - Call ShellExecuteExA( 60, SEE_MASK_INVOKEIDLIST, hWndForm, "properties", sPath, "", "", SW_SHOW, hInstApp, 0, "", 0, 0, 0, hProcess ) .head 2 - Named Menus .head 2 - Class Definitions .head 2 + Default Classes .head 3 - MDI Window: cBaseMDI .head 3 - Form Window: .head 3 - Dialog Box: .head 3 - Table Window: .head 3 - Quest Window: .head 3 - Data Field: .head 3 - Spin Field: .head 3 - Multiline Field: .head 3 - Pushbutton: .head 3 - Radio Button: .head 3 - Option Button: .head 3 - Check Box: .head 3 - Child Table: .head 3 - Quest Child Window: cQuickDatabase .head 3 - List Box: .head 3 - Combo Box: .head 3 - Picture: .head 3 - Vertical Scroll Bar: .head 3 - Horizontal Scroll Bar: .head 3 - Column: .head 3 - Background Text: .head 3 - Group Box: .head 3 - Line: .head 3 - Frame: .head 3 - Custom Control: .head 3 - ActiveX: .head 2 - Application Actions .head 1 + Dialog Box: dlgMsgBox .data INHERITPROPS 0000: 0100 .enddata .head 2 - Class: .head 2 - Property Template: .head 2 - Class DLL Name: .head 2 - Title: .head 2 - Accesories Enabled? No .head 2 - Visible? Yes .head 2 - Display Settings .head 3 - Display Style? Default .head 3 - Visible at Design time? Yes .head 3 - Type of Dialog: Modal .head 3 - Window Location and Size .head 4 - Left: 6.025" .head 4 - Top: 2.823" .head 4 - Width: 1.717" .head 4 - Width Editable? Yes .head 4 - Height: 1.25" .head 4 - Height Editable? Yes .head 3 - Absolute Screen Location? No .head 3 - Font Name: Default .head 3 - Font Size: Default .head 3 - Font Enhancement: Default .head 3 - Text Color: Default .head 3 - Background Color: 3D Face Color .head 2 - Description: author: gb date: ??? version: 1.01 1.02- TL- support for custom icons 1.01- TL- Some improvements, told by g.achrainer (thanks) 1.00 -Gb- implemented desc: Please use the functionwrapper SalDlgBox(...) .head 2 + Tool Bar .head 3 - Display Settings .head 4 - Display Style? Default .head 4 - Location? Top .head 4 - Visible? Yes .head 4 - Size: Default .head 4 - Size Editable? Yes .head 4 - Font Name: Default .head 4 - Font Size: Default .head 4 - Font Enhancement: Default .head 4 - Text Color: Default .head 4 - Background Color: Default .head 3 - Contents .head 2 + Contents .head 3 + Multiline Field: mlMsg .head 4 - Class Child Ref Key: 0 .head 4 - Class ChildKey: 0 .head 4 - Class: mlAutoSize .head 4 - Property Template: .head 4 - Class DLL Name: .head 4 - Data .head 5 - Maximum Data Length: Class Default .head 5 - String Type: Class Default .head 5 - Editable? Class Default .head 4 - Display Settings .head 5 - Border? Class Default .head 5 - Word Wrap? Class Default .head 5 - Vertical Scroll? Class Default .head 5 - Window Location and Size .head 6 - Left: 0.867" .head 6 - Top: 0.167" .head 6 - Width: 0.617" .head 6 - Width Editable? Class Default .head 6 - Height: 0.369" .head 6 - Height Editable? Class Default .head 5 - Visible? Class Default .head 5 - Font Name: Class Default .head 5 - Font Size: Class Default .head 5 - Font Enhancement: Class Default .head 5 - Text Color: Class Default .head 5 - Background Color: 3D Face Color .head 4 + Message Actions .head 5 + On SAM_SetFocus .head 6 - Call SalSetFocus( whBtnFocus ) .head 3 + Pushbutton: pb1 .head 4 - Class Child Ref Key: 0 .head 4 - Class ChildKey: 0 .head 4 - Class: .head 4 - Property Template: .head 4 - Class DLL Name: .head 4 - Title: .head 4 - Window Location and Size .head 5 - Left: 0.083" .head 5 - Top: 0.226" .head 5 - Width: 1.5" .head 5 - Width Editable? Yes .head 5 - Height: 0.3" .head 5 - Height Editable? Yes .head 4 - Visible? Yes .head 4 - Keyboard Accelerator: (none) .head 4 - Font Name: Default .head 4 - Font Size: Default .head 4 - Font Enhancement: Default .head 4 - Picture File Name: .head 4 - Picture Transparent Color: None .head 4 - Image Style: Single .head 4 - Text Color: Default .head 4 - Background Color: Default .head 4 + Message Actions .head 5 + On SAM_Create .head 6 - Call SalHideWindow(hWndItem) .head 5 + On SAM_Click .head 6 - Call SalEndDialog(hWndForm, 1) .head 5 + On SAM_SetFocus .head 6 - Set whBtnFocus = hWndItem .head 3 + Pushbutton: pb2 .head 4 - Class Child Ref Key: 0 .head 4 - Class ChildKey: 0 .head 4 - Class: .head 4 - Property Template: .head 4 - Class DLL Name: .head 4 - Title: .head 4 - Window Location and Size .head 5 - Left: 1.633" .head 5 - Top: 0.583" .head 5 - Width: 1.5" .head 5 - Width Editable? Yes .head 5 - Height: 0.3" .head 5 - Height Editable? Yes .head 4 - Visible? Yes .head 4 - Keyboard Accelerator: (none) .head 4 - Font Name: Default .head 4 - Font Size: Default .head 4 - Font Enhancement: Default .head 4 - Picture File Name: .head 4 - Picture Transparent Color: None .head 4 - Image Style: Single .head 4 - Text Color: Default .head 4 - Background Color: Default .head 4 + Message Actions .head 5 + On SAM_Create .head 6 - Call SalHideWindow(hWndItem) .head 5 + On SAM_Click .head 6 - Call SalEndDialog(hWndForm, 2) .head 5 + On SAM_SetFocus .head 6 - Set whBtnFocus = hWndItem .head 3 + Pushbutton: pb3 .head 4 - Class Child Ref Key: 0 .head 4 - Class ChildKey: 0 .head 4 - Class: .head 4 - Property Template: .head 4 - Class DLL Name: .head 4 - Title: .head 4 - Window Location and Size .head 5 - Left: 3.233" .head 5 - Top: 0.583" .head 5 - Width: 1.5" .head 5 - Width Editable? Yes .head 5 - Height: 0.3" .head 5 - Height Editable? Yes .head 4 - Visible? Yes .head 4 - Keyboard Accelerator: (none) .head 4 - Font Name: Default .head 4 - Font Size: Default .head 4 - Font Enhancement: Default .head 4 - Picture File Name: .head 4 - Picture Transparent Color: None .head 4 - Image Style: Single .head 4 - Text Color: Default .head 4 - Background Color: Default .head 4 + Message Actions .head 5 + On SAM_Create .head 6 - Call SalHideWindow(hWndItem) .head 5 + On SAM_Click .head 6 - Call SalEndDialog(hWndForm, 3) .head 5 + On SAM_SetFocus .head 6 - Set whBtnFocus = hWndItem .head 3 + Pushbutton: pb4 .head 4 - Class Child Ref Key: 0 .head 4 - Class ChildKey: 0 .head 4 - Class: .head 4 - Property Template: .head 4 - Class DLL Name: .head 4 - Title: .head 4 - Window Location and Size .head 5 - Left: 4.817" .head 5 - Top: 0.583" .head 5 - Width: 1.5" .head 5 - Width Editable? Yes .head 5 - Height: 0.3" .head 5 - Height Editable? Yes .head 4 - Visible? Yes .head 4 - Keyboard Accelerator: (none) .head 4 - Font Name: Default .head 4 - Font Size: Default .head 4 - Font Enhancement: Default .head 4 - Picture File Name: .head 4 - Picture Transparent Color: None .head 4 - Image Style: Single .head 4 - Text Color: Default .head 4 - Background Color: Default .head 4 + Message Actions .head 5 + On SAM_Create .head 6 - Call SalHideWindow(hWndItem) .head 5 + On SAM_Click .head 6 - Call SalEndDialog(hWndForm, 4) .head 5 + On SAM_SetFocus .head 6 - Set whBtnFocus = hWndItem .head 3 + Pushbutton: pb5 .head 4 - Class Child Ref Key: 0 .head 4 - Class ChildKey: 0 .head 4 - Class: .head 4 - Property Template: .head 4 - Class DLL Name: .head 4 - Title: .head 4 - Window Location and Size .head 5 - Left: 6.4" .head 5 - Top: 0.583" .head 5 - Width: 1.5" .head 5 - Width Editable? Yes .head 5 - Height: 0.3" .head 5 - Height Editable? Yes .head 4 - Visible? Yes .head 4 - Keyboard Accelerator: (none) .head 4 - Font Name: Default .head 4 - Font Size: Default .head 4 - Font Enhancement: Default .head 4 - Picture File Name: .head 4 - Picture Transparent Color: None .head 4 - Image Style: Single .head 4 - Text Color: Default .head 4 - Background Color: Default .head 4 + Message Actions .head 5 + On SAM_Create .head 6 - Call SalHideWindow(hWndItem) .head 5 + On SAM_Click .head 6 - Call SalEndDialog(hWndForm, 5) .head 5 + On SAM_SetFocus .head 6 - Set whBtnFocus = hWndItem .head 3 + Picture: picIcon .head 4 - Class Child Ref Key: 0 .head 4 - Class ChildKey: 0 .head 4 - Class: .head 4 - Property Template: .head 4 - Class DLL Name: .head 4 - Window Location and Size .head 5 - Left: 0.117" .head 5 - Top: 0.036" .head 5 - Width: 0.617" .head 5 - Width Editable? Yes .head 5 - Height: 0.44" .head 5 - Height Editable? Yes .head 4 - Visible? Yes .head 4 - Editable? No .head 4 - File Name: .head 4 - Storage: External .head 4 - Picture Transparent Color: Gray .head 4 - Fit: Scale .head 4 - Scaling .head 5 - Width: 100 .head 5 - Height: 100 .head 4 - Corners: Square .head 4 - Border Style: No Border .head 4 - Border Thickness: 1 .head 4 - Tile To Parent? No .head 4 - Border Color: Default .head 4 - Background Color: 3D Face Color .head 4 + Message Actions .head 5 + On SAM_Click .head 6 - Call SalSetFocus( whBtnFocus ) .head 3 + Check Box: cbMsg .head 4 - Class Child Ref Key: 0 .head 4 - Class ChildKey: 0 .head 4 - Class: .head 4 - Property Template: .head 4 - Class DLL Name: .head 4 - Title: .head 4 - Window Location and Size .head 5 - Left: 0.3" .head 5 - Top: 0.738" .head 5 - Width: 3.017" .head 5 - Width Editable? Yes .head 5 - Height: 0.25" .head 5 - Height Editable? Yes .head 4 - Visible? Yes .head 4 - Font Name: Default .head 4 - Font Size: Default .head 4 - Font Enhancement: Default .head 4 - Text Color: Default .head 4 - Background Color: Default .head 4 - Message Actions .head 2 + Functions .head 3 + Function: __CreateButtons .head 4 - Description: Buttons und FenstergrцЯe bestimmen .head 4 - Returns .head 4 + Parameters .head 5 - String: psBtn .data INHERITPROPS 0000: 0100 .enddata .head 5 - Number: pnFocus .data INHERITPROPS 0000: 0100 .enddata .head 5 - Number: pnIcon .data INHERITPROPS 0000: 0100 .enddata .head 4 - Static Variables .head 4 + Local variables .head 5 - Number: lnIndex .data INHERITPROPS 0000: 0100 .enddata .head 5 - String: lsBtnTxt[*] .data INHERITPROPS 0000: 0100 .enddata .head 5 - Number: lnTokens .data INHERITPROPS 0000: 0100 .enddata .head 5 - Number: lnIdx .data INHERITPROPS 0000: 0100 .enddata .head 5 - Number: lnMaxButLen .data INHERITPROPS 0000: 0100 .enddata .head 5 - String: lsMaxButLen .data INHERITPROPS 0000: 0100 .enddata .head 5 - ! .head 5 - Number: lnX .data INHERITPROPS 0000: 0100 .enddata .head 5 - Number: lnY .data INHERITPROPS 0000: 0100 .enddata .head 5 - Number: lnXButton .data INHERITPROPS 0000: 0100 .enddata .head 5 - Number: lnYButton .data INHERITPROPS 0000: 0100 .enddata .head 5 - Number: lnButtonWidth .data INHERITPROPS 0000: 0100 .enddata .head 5 - Number: lnButtonHeight .data INHERITPROPS 0000: 0100 .enddata .head 5 - Number: lnAllButtonWidth .data INHERITPROPS 0000: 0100 .enddata .head 5 - ! .head 5 - Boolean: bOk .head 5 - Number: hDC .head 5 - Number: hGDIObj .head 5 - Number: nHeight .head 5 - Number: nWidth .head 5 - Number: nTextPixelWidth .head 5 - Number: nTextPixelHeight .head 5 - Number: hIcon .data INHERITPROPS 0000: 0100 .enddata .head 5 - ! ! .head 5 - Number: lhHANDLE .data INHERITPROPS 0000: 0100 .enddata .head 5 - Number: lnPicType .head 4 + Actions .head 5 - ! .head 5 - Set lnIndex = 0 .head 5 - Set lnTokens = 0 .head 5 - ! Extrahiere Buttons .head 5 - Set lnTokens = SalStrTokenize(psBtn, ';', ';', lsBtnTxt) .head 5 - ! !!!!!!!!!!!!!!!!! .head 5 + While lnIdx < lnTokens .head 6 + If lnMaxButLen < SalStrLength( lsBtnTxt[lnIdx] ) .head 7 - Set lsMaxButLen = lsBtnTxt[lnIdx] .head 7 - Set lnMaxButLen = SalStrLength( lsBtnTxt[lnIdx] ) .head 6 - Set lnIdx = lnIdx + 1 .head 5 - Call SalSetWindowText ( pb1, lsMaxButLen ) .head 5 - Call SalGetWindowSize( pb1, lnButtonWidth, lnButtonHeight ) .head 5 - Set hDC = GetDC( pb1 ) .head 5 + If hDC .head 6 - Set hGDIObj = SelectObject( hDC, SalNumberLow( SalSendMsg( pb1, WM_GETFONT, 0, 0 ) ) ) .head 6 - Call GetTextExtentPoint32A( hDC, lsMaxButLen, SalStrLength( lsMaxButLen ), nTextPixelWidth, nTextPixelHeight ) .head 6 - Call SelectObject( hDC, hGDIObj ) .head 6 - Call ReleaseDC( pb1, hDC ) .head 6 - Set lnButtonWidth = SalPixelsToFormUnits( pb1, nTextPixelWidth, FALSE ) + 0.2 .head 5 + If lnButtonWidth < 1.2 .head 6 - Set lnButtonWidth = 1.2 .head 5 - Set lnAllButtonWidth = (lnTokens * lnButtonWidth) + (lnTokens * 0.04) .head 5 - ! !!!!!!!!!!!!!!!!!!!!!!!!!!! .head 5 + If lnTokens < 1 .head 6 - Set lnTokens = 1 .head 5 + If pnFocus > lnTokens .head 6 - Set pnFocus = 1 .head 5 - ! Setze Multiline-GrцЯe .head 5 - Call SalGetWindowSize(mlMsg, lnX, lnY) .head 5 - ! Anpassung FenstergrцЯe .head 5 - Set lnX = lnX + 1.2 .head 5 - Set lnY = lnY + 1 .head 5 + If lnY < 1.3 .head 6 - Set lnY = 1.3 .head 5 + If lnX < 2.5 .head 6 - Set lnX = 2.5 .head 5 + If lnX < (lnAllButtonWidth + 0.8) .head 6 - Set lnX = lnAllButtonWidth + 0.8 .head 5 + If psCheckBoxText != STRING_Null .head 6 - Call SalSetWindowSize(hWndForm, lnX, lnY+0.2 ) .head 5 + Else .head 6 - Call SalSetWindowSize(hWndForm, lnX, lnY ) .head 5 - ! Buttons .head 5 - Set lnYButton = lnY - 0.7 .head 5 - Set lnXButton = lnX / 2 .head 5 - Set lnIndex = 0 .head 5 - ! Wenn die Anzahl der Buttons nicht das Limit ьberschreitet... .head 5 + If lnTokens < 6 .head 6 - ! Bestimme Buttonpositionen und FenstergrцЯe .head 6 + Select Case lnTokens .head 7 + Case 1 .head 8 - Call SalSetWindowSize( pb1, lnButtonWidth, lnButtonHeight ) .head 8 - Call SalSetWindowLoc( pb1, lnXButton - (lnButtonWidth / 2), lnYButton ) .head 8 - Break .head 7 + Case 2 .head 8 - Call SalSetWindowSize( pb1, lnButtonWidth, lnButtonHeight ) .head 8 - Call SalSetWindowSize( pb2, lnButtonWidth, lnButtonHeight ) .head 8 - Call SalSetWindowLoc( pb1, lnXButton - lnButtonWidth - 0.02, lnYButton ) .head 8 - Call SalSetWindowLoc( pb2, lnXButton + 0.02, lnYButton ) .head 8 - Break .head 7 + Case 3 .head 8 - Call SalSetWindowSize( pb1, lnButtonWidth, lnButtonHeight ) .head 8 - Call SalSetWindowSize( pb2, lnButtonWidth, lnButtonHeight ) .head 8 - Call SalSetWindowSize( pb3, lnButtonWidth, lnButtonHeight ) .head 8 - Call SalSetWindowLoc( pb1, lnXButton - (lnButtonWidth / 2) - 0.04 - lnButtonWidth, lnYButton ) .head 8 - Call SalSetWindowLoc( pb2, lnXButton - (lnButtonWidth / 2), lnYButton ) .head 8 - Call SalSetWindowLoc( pb3, lnXButton + (lnButtonWidth / 2) + 0.04, lnYButton ) .head 8 - Break .head 7 + Case 4 .head 8 - Call SalSetWindowSize( pb1, lnButtonWidth, lnButtonHeight ) .head 8 - Call SalSetWindowSize( pb2, lnButtonWidth, lnButtonHeight ) .head 8 - Call SalSetWindowSize( pb3, lnButtonWidth, lnButtonHeight ) .head 8 - Call SalSetWindowSize( pb4, lnButtonWidth, lnButtonHeight ) .head 8 - Call SalSetWindowLoc( pb1, lnXButton - 0.02 - lnButtonWidth - 0.04 - lnButtonWidth, lnYButton ) .head 8 - Call SalSetWindowLoc( pb2, lnXButton - 0.02 - lnButtonWidth, lnYButton ) .head 8 - Call SalSetWindowLoc( pb3, lnXButton + 0.02, lnYButton ) .head 8 - Call SalSetWindowLoc( pb4, lnXButton + 0.02 + lnButtonWidth + 0.04, lnYButton ) .head 8 - Break .head 7 + Case 5 .head 8 - Call SalSetWindowSize( pb1, lnButtonWidth, lnButtonHeight ) .head 8 - Call SalSetWindowSize( pb2, lnButtonWidth, lnButtonHeight ) .head 8 - Call SalSetWindowSize( pb3, lnButtonWidth, lnButtonHeight ) .head 8 - Call SalSetWindowSize( pb4, lnButtonWidth, lnButtonHeight ) .head 8 - Call SalSetWindowSize( pb5, lnButtonWidth, lnButtonHeight ) .head 8 - Call SalSetWindowLoc( pb1, lnXButton - (lnButtonWidth / 2) - 0.04 - lnButtonWidth - 0.04 - lnButtonWidth, lnYButton ) .head 8 - Call SalSetWindowLoc( pb2, lnXButton - (lnButtonWidth / 2) - 0.04 - lnButtonWidth, lnYButton ) .head 8 - Call SalSetWindowLoc( pb3, lnXButton - (lnButtonWidth / 2), lnYButton ) .head 8 - Call SalSetWindowLoc( pb4, lnXButton + (lnButtonWidth / 2) + 0.04, lnYButton ) .head 8 - Call SalSetWindowLoc( pb5, lnXButton + (lnButtonWidth / 2) + 0.04 + lnButtonWidth + 0.04, lnYButton ) .head 8 - Break .head 7 + Default .head 8 - Break .head 6 - ! Buttons anzeigen und Buttontext setzen... .head 6 + While lnIndex < lnTokens .head 7 + Select Case lnIndex .head 8 + Case 0 .head 9 - Call SalShowWindow(pb1) .head 9 - Call SalSetWindowText ( pb1, lsBtnTxt[lnIndex] ) .head 9 - Break .head 8 + Case 1 .head 9 - Call SalShowWindow(pb2) .head 9 - Call SalSetWindowText ( pb2, lsBtnTxt[lnIndex] ) .head 9 - Break .head 8 + Case 2 .head 9 - Call SalShowWindow(pb3) .head 9 - Call SalSetWindowText ( pb3, lsBtnTxt[lnIndex] ) .head 9 - Break .head 8 + Case 3 .head 9 - Call SalShowWindow(pb4) .head 9 - Call SalSetWindowText ( pb4, lsBtnTxt[lnIndex] ) .head 9 - Break .head 8 + Case 4 .head 9 - Call SalShowWindow(pb5) .head 9 - Call SalSetWindowText ( pb5, lsBtnTxt[lnIndex] ) .head 9 - Break .head 8 + Default .head 9 - Break .head 7 - Set lnIndex = lnIndex + 1 .head 6 - ! Focus setzen... .head 6 + Select Case pnFocus .head 7 + Case 1 .head 8 - Call SalSetFocus(pb1) .head 8 - Set whBtnFocus = pb1 .head 8 - Break .head 7 + Case 2 .head 8 - Call SalSetFocus(pb2) .head 8 - Set whBtnFocus = pb2 .head 8 - Break .head 7 + Case 3 .head 8 - Call SalSetFocus(pb3) .head 8 - Set whBtnFocus = pb3 .head 8 - Break .head 7 + Case 4 .head 8 - Call SalSetFocus(pb4) .head 8 - Set whBtnFocus = pb4 .head 8 - Break .head 7 + Case 5 .head 8 - Call SalSetFocus(pb5) .head 8 - Set whBtnFocus = pb5 .head 8 - Break .head 7 + Default .head 8 - Call SalSetFocus(pb1) .head 8 - Set whBtnFocus = pb1 .head 8 - Break .head 5 - ! ...sonst Defaultbutton setzen... .head 5 + Else .head 6 - Call SalSetWindowLoc( pb1, (lnX / 2) - 0.75, lnYButton ) .head 6 - Call SalShowWindow(pb1) .head 6 - Call SalSetWindowText ( pb1, lsBtnTxt[0] ) .head 6 - Call SalSetFocus(pb1) .head 6 - Set whBtnFocus = pb1 .head 5 - ! Icon setzen .head 5 + Select Case pnIcon .head 6 + Case MB_IconAsterisk .head 7 - Set hIcon = LoadIconA (0, IDI_ASTERISK) .head 7 - Call SalMessageBeep(MB_IconAsterisk) .head 7 - Break .head 6 + Case MB_IconExclamation .head 7 - Set hIcon = LoadIconA (0, IDI_EXCLAMATION) .head 7 - Call SalMessageBeep(MB_IconExclamation) .head 7 - Break .head 6 + Case MB_IconQuestion .head 7 - Set hIcon = LoadIconA (0, IDI_QUESTION) .head 7 - Call SalMessageBeep(MB_IconQuestion) .head 7 - Break .head 6 - Case MB_IconStop .head 6 + Case MB_IconHand .head 7 - Set hIcon = LoadIconA (0, IDI_HAND) .head 7 - Call SalMessageBeep(MB_IconStop) .head 7 - Break .head 6 + Default .head 7 + If pnIcon > 1024 .head 8 - ! support for custom icons .head 8 - Set lhHANDLE = VisPicGetHandle( pnIcon ) .head 8 - Set lnPicType = VisPicGetType( pnIcon ) .head 8 - Call SalPicSetHandle( picIcon, lnPicType, lhHANDLE) .head 7 + Else .head 8 - Set hIcon = LoadIconA (0, IDI_ASTERISK) .head 8 - Call SalMessageBeep(MB_IconAsterisk) .head 7 - Break .head 5 + If hIcon > 0 .head 6 - Call SalPicSetHandle (picIcon, PIC_FormatIcon, hIcon) .head 6 - Call DestroyIcon (hIcon) .head 5 - ! .head 5 + If psCheckBoxText = STRING_Null .head 6 - Call SalHideWindow( cbMsg ) .head 5 + Else .head 6 - Call SalSetWindowText( cbMsg, psCheckBoxText ) .head 6 - Call SalShowWindow( cbMsg ) .head 5 - Call SalSetWindowLoc( cbMsg, 0.2, lnYButton + 0.35 ) .head 5 - ! ! .head 2 + Window Parameters .head 3 - String: psMsg .data INHERITPROPS 0000: 0100 .enddata .head 3 - String: psTitle .data INHERITPROPS 0000: 0100 .enddata .head 3 - String: psBtn .data INHERITPROPS 0000: 0100 .enddata .head 3 - Number: pnFocus .head 3 - Number: pnIcon .head 3 - String: psCheckBoxText .head 3 - Receive Boolean: rbCheckBoxState .data INHERITPROPS 0000: 0100 .enddata .head 2 + Window Variables .head 3 - Window Handle: whBtnFocus .data INHERITPROPS 0000: 0100 .enddata .head 2 + Message Actions .head 3 + On SAM_CreateComplete .head 4 - Call SalSetWindowText(hWndForm, psTitle) .head 4 - Call mlMsg.wfSetText(psMsg) .head 4 - Call __CreateButtons(psBtn, pnFocus, pnIcon) .head 4 - Call SalCenterWindow(hWndForm) .head 4 - Call SalShowWindow(hWndForm) .head 3 + On SAM_Create .head 4 - Call SalHideWindow(hWndForm) .head 4 - Call VisWinSetStyle( hWndForm, WS_SYSMENU, FALSE ) .head 3 - On SAM_Destroy
Return to http://gupta.narod.ru/