|
MEMBER('b4') |
|
INCLUDE('API_CommonDialog.inc'),ONCE !has map |
|
!INCLUDE('FileSaveName.inc'),ONCE |
|
|
|
|
|
MySaveFileName PROCEDURE(STRING xTitle, *STRING xInOutDriveDir ,*STRING xInOutFileName, STRING xExtensions)!,bool,proc |
|
HoldPath STRING(FILE:MaxFilePath),AUTO |
|
RetFilePicked BOOL,AUTO |
|
CODE |
|
HoldPath = LONGPATH() |
|
SETPATH( xInOutDriveDir ) |
|
|
|
xInOutFileName = MG.BaseName( xInOutFileName ) |
|
|
|
RetFilePicked = MySaveFileName( xTitle, xInOutFileName, xExtensions ) |
|
|
|
IF RetFilePicked |
|
Assert(0,eqDBG&'MySaveFileName FileName['& xInOutFileName &'] (just after call)') |
|
xInOutDriveDir = MG.DriveDir( xInOutFileName ) ;Assert(0,eqDBG&'MySaveFileName DriveDir['& xInOutDriveDir &']') |
|
xInOutFileName = MG.BaseName( xInOutFileName ) ;Assert(0,eqDBG&'MySaveFileName FileName['& xInOutFileName &']') |
|
END |
|
|
|
SETPATH( HoldPath ) |
|
RETURN RetFilePicked |
|
|
|
!============================================================================================= |
|
MySaveFileName PROCEDURE(STRING xTitle, *STRING xInOutFileName, STRING xExtensions) |
|
!argExtensions should match CW style extensions |
|
!Testing: 5/17/02: on KMH Win98se box, if delete (all graphics) then cancel, then Save Again, it changes the folder to MyDocuments |
|
|
|
|
|
argNum Itemize,pre(argNum:) |
|
Title EQUATE(1) |
|
FileName EQUATE |
|
Extensions EQUATE |
|
end |
|
! FileDialog([title],file[,extensions][,flag]) |
|
lcl group |
|
MyOFN LIKE(OpenFileName) |
|
RetVal Bool |
|
Extensions cSTRING(255) !<-- poor technique |
|
FileName cSTRING(FILE:MaxFilePath + 1) !<-- too small if supporting OFN_ALLOWMULTISELECT |
|
BaseName cSTRING(FILE:MaxFileName + 1) |
|
DialogTitle cSTRING(255) |
|
DefaExt cSTRING(14) !MSDN says "This string can be any length, but only the first three characters are appended" testing (on Win2K) shows otherwise (wanted to make sure for trailing null <0> |
|
OutDefaExt cSTRING(14) |
|
!MyMGCustData LIKE(MGCustData) |
|
ExtErr DWORD |
|
|
|
|
|
OutFileName cSTRING(FILE:MaxFilePath + 1) |
|
OutPathName cSTRING(FILE:MaxFilePath + 1) |
|
OutBaseName cSTRING(FILE:MaxFilePath + 1) |
|
OutExtName cSTRING(FILE:MaxFilePath + 1) |
|
!AnswerString STRING(FILE:MaxFilePath) !<-- poor |
|
|
|
CharNDX uShort |
|
ExtLen uShort |
|
CurDir cSTRING(2) |
|
end |
|
!MyFilter &Cstring !<--- did I do this right? |
|
|
|
|
|
code |
|
! lcl.Extensions = 'Bitmaps<0>*.bmp<0>JPEG<0>*.jpg;*.jpeg<0>TIFF<0>*.tif;*.tiff<0>All Files<0>*.*<0,0>' |
|
|
|
lcl.Extensions = CLIP(xExtensions)! & '<0>{2}' !Pointer to a buffer containing pairs of null-terminated filter strings. The last string in the buffer must be terminated by two NULL characters. |
|
lcl.ExtLen = len(CLIP(xExtensions)) |
|
loop lcl.CharNDX = 1 to lcl.ExtLen |
|
if lcl.Extensions[lcl.CharNDX] = '|' |
|
lcl.Extensions[lcl.CharNDX] = '<0>' |
|
end |
|
! lcl.CharNDX = INSTRING('|',lcl.Extensions,1) |
|
! if lcl.CharNDX |
|
! lcl.Extensions[ lcl.CharNDX ] = '<0>' |
|
! else |
|
! break |
|
! end |
|
end |
|
lcl.Extensions[lcl.ExtLen + 1] = '<0>' |
|
lcl.Extensions[lcl.ExtLen + 2] = '<0>' |
|
|
|
lcl.DefaExt = 'BMP' !<--- hard wired bug |
|
lcl.FileName = CLIP(xInOutFileName) & '<0>' |
|
lcl.CurDir = '.' |
|
|
|
!MyFilter &= new cSTRING( len(CLIP(Extensions)) + 1) !<--- did I do this right? |
|
!MyFilter = Extensions !<--- did I do this right? |
|
!wouldn't it be easier to use const *cstring extensions |
|
!todo !add logic to support NULL extensions -- I think above can GPF if null !! |
|
|
|
|
|
lcl.MyOFN.lStructSize = size(OpenFileName) !DWORD |
|
lcl.MyOFN.hwndOwner = 0{prop:Handle} !HWND |
|
lcl.MyOFN.hInstance = 0 !HINSTANCE |
|
|
|
lcl.MyOFN.lpstrFilter = address(lcl.Extensions) !LPCTSTR |
|
lcl.MyOFN.lpstrCustomFilter = 0 !LPTSTR |
|
lcl.MyOFN.nMaxCustFilter = 0 !DWORD |
|
lcl.MyOFN.nFilterIndex = oGLO.INI_Non_Pos.Fetch('FileSave','ExtNum', 1) !DWORD |
|
|
|
lcl.MyOFN.lpstrFile = address(lcl.FileName) !LPTSTR |
|
lcl.MyOFN.nMaxFile = size(lcl.FileName) - 1 !DWORD |
|
lcl.MyOFN.lpstrFileTitle = address(lcl.BaseName) !LPTSTR |
|
lcl.MyOFN.nMaxFileTitle = size(lcl.BaseName) - 1 !DWORD |
|
lcl.MyOFN.lpstrInitialDir = address(lcl.CurDir ) !0 !LPCTSTR |
|
if omitted(argNum::Title) |
|
lcl.MyOFN.lpstrTitle = 0 |
|
else |
|
lcl.DialogTitle = xTitle |
|
lcl.MyOFN.lpstrTitle = address(lcl.DialogTitle) !LPCTSTR |
|
end |
|
lcl.MyOFN.Flags = OFN_NOCHANGEDIR + OFN_OVERWRITEPROMPT + OFN_PATHMUSTEXIST + OFN_NOREADONLYRETURN + | |
|
OFN_HIDEREADONLY |
|
!OFN_EXPLORER + OFN_ENABLEHOOK + OFN_ENABLESIZING |
|
|
|
lcl.MyOFN.nFileOffset = 0 !WORD |
|
lcl.MyOFN.nFileExtension = 0 !WORD |
|
lcl.MyOFN.lpstrDefExt = address(lcl.DefaExt) !LPCTSTR |
|
|
|
lcl.MyOFN.lCustData = 0 !address(lcl.MyMGCustData) !DWORD |
|
lcl.MyOFN.lpfnHook = 0 !address(MyOFNHookProc) !LPOFNHOOKPROC |
|
|
|
lcl.MyOFN.lpTemplateName = 0 !LPCTSTR |
|
|
|
! lcl.MyMGCustData.FilePath = 'origpath' !cSTRING(MAX_PATH) |
|
! lcl.MyMGCustData.FileSelected = 'origFileSelected' !cSTRING(MAX_PATH) |
|
|
|
!rintDebugSTRING('MySaveFileName pre UnlockThread Address(lcl.MyOFN) ['& address(lcl.MyOFN) &']<13,10>') |
|
UnLockThread |
|
lcl.RetVal = GetSaveFileName( lcl.MyOFN ) !*OpenFileNameType),bool,pascal,name('GetSaveFileName' & ANSI) |
|
LockThread |
|
!rintDebugSTRING('MySaveFileName post LockThread, lcl.RetVal ['& lcl.RetVal &']<13,10>') |
|
if ~lcl.RetVal |
|
lcl.ExtErr = CommDlgExtendedError() |
|
if lcl.ExtErr <> CDERR_GENERALCODES |
|
Message('Extended Error ['& CLIP(CommDlgExtendedError_Describe(lcl.ExtErr)) &']') ! lcl.MyOFN.lStructSize ['& lcl.MyOFN.lStructSize &']') |
|
!else |
|
! Message('cancel was pressed.') |
|
end |
|
else |
|
xInOutFileName = lcl.FileName |
|
oGLO.INI_Non_Pos.Update('FileSave','ExtNum', lcl.MyOFN.nFilterIndex) |
|
|
|
!!! !Message('lcl.Retval ['& lcl.Retval &']') |
|
!!! |
|
!!! !memcpy( address(argFileName) , lcl.MyOFN.lpstrFile , lcl.MyOFN.nMaxFile ) !<-- prob. this is a CW String, |
|
!!! |
|
!!! !The following command is a bad idea: as it points to a CW String of unknown length |
|
!!! !memcpy( address(argFileName) , lcl.MyOFN.lpstrFile , lcl.MyOFN.nMaxFile ) |
|
!!! |
|
!!! !memcpy( address(lcl.OutFileName) , lcl.MyOFN.lpstrFile , lcl.MyOFN.nMaxFile ) |
|
!!! !memcpy( address(lcl.OutBaseName) , lcl.MyOFN.lpstrFileTitle, lcl.MyOFN.nMaxFileTitle) |
|
!!! lcl.OutFileName = lcl.FileName |
|
!!! lcl.OutPathName = lcl.FileName[ 1 : lcl.MyOfn.nFileOffset - 1 ] |
|
!!! lcl.OutBaseName = lcl.FileName[ lcl.MyOfn.nFileOffset + 1 : lcl.MyOfn.nFileExtension - 1 ] |
|
!!! lcl.OutExtName = lcl.FileName[ lcl.MyOfn.nFileExtension + 1 : len(CLIP(lcl.FileName)) ] |
|
!!! |
|
!!! |
|
!!! |
|
!!! |
|
!!! !Start initial file name will have no extention |
|
!!! !Store in INI, last save nFilterIndex, pass that in |
|
!!! |
|
!!! |
|
!!! |
|
!!! !Plan: Determine the returned extension |
|
!!! ! Determine the save as extension (via nFilterIndex) |
|
!!! !If the save as extension is all (*.*) |
|
!!! !then |
|
!!! ! done (assuming lcl.DefaExt is a valid extension) |
|
!!! !Else |
|
!!! ! if returned ext <> saved ext then strip and append |
|
!!! ! see nFileExtension |
|
!!! !end |
|
!!! |
|
!!! !if the returned path is same as the current path then return BaseName else return full FileName |
|
!!! |
|
!!! PrintDebugSTRING('-- 123456789-123456789-123456789-123456789-123456789-123456789-<13,10>') |
|
!!! PrintDebugSTRING('-- lcl.OutFileName ['& CLIP(lcl.OutFileName) &']<13,10>') !<-- must still INCLUDE a <0> |
|
!!! PrintDebugSTRING('-- lcl.OutPathName ['& CLIP(lcl.OutPathName) &']<13,10>') !<-- must still INCLUDE a <0> |
|
!!! PrintDebugSTRING('-- lcl.OutBaseName ['& CLIP(lcl.OutBaseName) &']<13,10>') !<-- must still INCLUDE a <0> |
|
!!! PrintDebugSTRING('-- lcl.OutExtName ['& CLIP(lcl.OutExtName ) &']<13,10>') !<-- must still INCLUDE a <0> |
|
!!! PrintDebugSTRING('-- argFileName ['& CLIP(argFileName) &']<13,10>') !<-- must still INCLUDE a <0> |
|
!!! PrintDebugSTRING('--<13,10>') |
|
!!! PrintDebugSTRING('-- lcl.MyOFN.nFileOffset ['& lcl.MyOFN.nFileOffset &']<13,10>') |
|
!!! PrintDebugSTRING('-- lcl.MyOFN.nFileExtension ['& lcl.MyOFN.nFileExtension &']<13,10>') |
|
!!! PrintDebugSTRING('-- lcl.DefaExt ['& lcl.DefaExt &']<13,10>') |
|
!!! !!!memcpy( address(lcl.OutDefaExt), lcl.MyOFN.lpstrDefExt, 3) |
|
!!! PrintDebugSTRING('-- lcl.MyOFN.lpstrDefExt ['& lcl.MyOFN.lpstrDefExt &']<13,10>') |
|
!!! PrintDebugSTRING('-- lcl.MyOFN.nFilterIndex ['& lcl.MyOFN.nFilterIndex &']<13,10>') |
|
!!! PrintDebugSTRING('-- lcl.MyOFN.nMaxFile ['& lcl.MyOFN.nMaxFile &']<13,10>') |
|
!!! PrintDebugSTRING('-- lcl.MyOFN.nMaxFileTitle ['& lcl.MyOFN.nMaxFileTitle &']<13,10>') |
|
!!! |
|
!!! !! if band(lcl.MyOFN.Flags, OFN_EXTENSIONDIFFERENT) |
|
!!! !! !Testing (win2k) shows that this is ONLY false if the user enters the 3 letter extension pointed to by lpstrDefExt |
|
!!! !! ! in which case the result will be those 3 letters |
|
!!! !! ! NOTE: testing with a 7 char DefExt shows it will append the full 7 letters if 'ALL' is the save type |
|
!!! !! ! however ExtensionDifferent will still show TRUE even if the user enters the 7 char DefExt, they must do the 3 char DefExt |
|
!!! !! |
|
!!! !! !Will occur if the user (correctly) leaves the extension off, and has it automagically appended! |
|
!!! !! PrintDebugSTRING('--<13,10>') |
|
!!! !! PrintDebugSTRING('User typed an Extension that is different from the Save As extension<13,10>') |
|
!!! !! PrintDebugSTRING('--<13,10>') |
|
!!! !! |
|
!!! !! !todo: |
|
!!! !! ! Warn the user? |
|
!!! !! ! If the user entered a valid extension, then what? |
|
!!! !! |
|
!!! !! ! If changing extension |
|
!!! !! ! strip of the extension |
|
!!! !! ! find the save as extension |
|
!!! !! ! append the save as extension |
|
!!! !! ! end |
|
!!! !! |
|
!!! !! ! if lcl.MyOFN.nFileExtension |
|
!!! !! ! Fname_NoExt = argFileName[ 1 : lcl.MyOFN.nFileExtension ] |
|
!!! !! ! else !Last Char could be '.' or User entered no extension |
|
!!! !! ! todo |
|
!!! !! ! end |
|
!!! !! end |
|
end |
|
|
|
return lcl.Retval |
|
|
|
|
|
!============================================================================================= |
|
!! MyOFNHookProc Procedure(HWND hDlg, | // handle to child dialog window |
|
!! UINT uiMsg, | // message identifier |
|
!! WPARAM wParam,| // message parameter |
|
!! LPARAM lParam | // message parameter |
|
!! ) |
|
!! |
|
!! MyOFNotify &OFNotify |
|
!! MyOpenFileName &OpenFileName |
|
!! !MyCustData &MGCustData |
|
!! Answer Bool |
|
!! code |
|
!! PrintDebugSTRING('MyOFNHookProc hDlg['& hDlg &'] uiMsg['& uiMsg &'] wParam['& wParam &'] lParam['& lParam &']<13,10>') !<-- is this safe? |
|
!! case uiMsg |
|
!! of WM_INITDIALOG ! LPARAM is a pointer to an OpenFileName structure |
|
!! SetWindowLong(hDlg, DWL_USER, lParam) !Save the long pointer to the OPENFILENAME structure. |
|
!! PrintDebugSTRING('MyOFNHookProc WM_INITDIALOG<13,10>') |
|
!! |
|
!! of WM_DESTROY |
|
!! PrintDebugSTRING('MyOFNHookProc WM_DESTROY<13,10>') |
|
!! ! MyOFNotify &= ( GetWindowLong(hdlg, DWL_USER) ) !Retrieve OpenFileName Pointer |
|
!! ! MyOpenFileName &= ( MyOFNotify.lpOFN ) |
|
!! ! MyCustData &= ( MyOpenFileName.lCustData ) |
|
!! ! GetDlgItemText(hDlg, IDE_PATH , MyCustData.FilePath , size(MyCustData.FilePath) ) |
|
!! ! GetDlgItemText(hDlg, IDE_SELECTED, MyCustData.FileSelected , size(MyCustData.FileSelected) ) |
|
!! |
|
!! of WM_NOTIFY ! LPARAM is a pointer to an OFNotify structure |
|
!! PrintDebugSTRING('MyOFNHookProc WM_NOTIFY<13,10>') |
|
!! !MyOFNGroup = lParam !<-- need to cast the pointer, Is this right? |
|
!! MyOFNotify &= (lParam) !<-- need to cast the pointer, Is this right? |
|
!! Answer = MyProcess_OFNotify(hDlg, MyOFNotify) |
|
!! !Answer = MyProcess_OFNotify(hDlg, lParam) |
|
!! |
|
!! else |
|
!! !PrintDebugSTRING('MyOFNHookProc 100<13,10>') !<-- is this safe? |
|
!! |
|
!! !case uiMsg |
|
!! ! of mod:cdmsgShareViolation ! = RegisterWindowMessage(szmsgSHAREVIOLATION); |
|
!! ! of mod:cdmsgFileOK ! = RegisterWindowMessage(szmsgFILEOK); |
|
!! ! of mod:cdmsgHelp ! = RegisterWindowMessage(szCommdlgHelp); |
|
!! !else return FALSE |
|
!! !end |
|
!! end |
|
!! !PrintDebugSTRING('MyOFNHookProc 999<13,10>') !<-- is this safe? |
|
!! return TRUE !0 !0 !let the default dialog box procedure process the message |
|
!! !another example shows return TRUE !<-- will have to understand |
|
!! |
|
!! !---MSDN--- |
|
!! ! If the hook procedure returns zero, the default dialog box procedure processes the message. |
|
!! ! |
|
!! ! If the hook procedure returns a nonzero value, the default dialog box procedure ignores the message. |
|
!! ! |
|
!! ! For the CDN_SHAREVIOLATION and CDN_FILEOK notification messages, |
|
!! ! the hook procedure should return a nonzero value to indicate |
|
!! ! that it has used the SetWindowLong function to set a nonzero DWL_MSGRESULT value. |
|
!! !---MSDN--- |
|
!! |
|
!! |
|
!! |
|
!! |
|
!! !============================================================================================= |
|
!! MyProcess_OFNotify Procedure(HWND hDlg, *OFNotify ofn) |
|
!! |
|
!! !#define CDN_FIRST (0U-601U) |
|
!! !#define CDN_LAST (0U-699U) |
|
!! ! |
|
!! !// Notifications when Open or Save dialog status changes |
|
!! !#define CDN_INITDONE (CDN_FIRST - 0x0000) |
|
!! !#define CDN_SELCHANGE (CDN_FIRST - 0x0001) |
|
!! !#define CDN_FOLDERCHANGE (CDN_FIRST - 0x0002) |
|
!! !#define CDN_SHAREVIOLATION (CDN_FIRST - 0x0003) |
|
!! !#define CDN_HELP (CDN_FIRST - 0x0004) |
|
!! !#define CDN_FILEOK (CDN_FIRST - 0x0005) |
|
!! !#define CDN_TYPECHANGE (CDN_FIRST - 0x0006) |
|
!! |
|
!! |
|
!! CDN_FIRST EQUATE(-601) !(0U-601U) !<---- is this correct? |
|
!! CDN_LAST EQUATE(-699) !(0U-699U) |
|
!! Itemize,pre |
|
!! CDN_TYPECHANGE EQUATE(CDN_FIRST - 6) !The user selected a new file type from the list of file types. |
|
!! CDN_FILEOK EQUATE !The user clicked the OK button; the dialog box is about to close. |
|
!! CDN_HELP EQUATE !The user clicked the Help button. |
|
!! CDN_SHAREVIOLATION EQUATE !The common dialog box encountered a sharing violation on the file about to be returned. |
|
!! CDN_FOLDERCHANGE EQUATE !The user opened a new folder or directory. |
|
!! CDN_SELCHANGE EQUATE !The user selected a new file or folder from the file list. |
|
!! CDN_INITDONE EQUATE ! - 0 !The system has finished initializing the dialog box, and the dialog box has finished processing the WM_INITDIALOG message. Also, the system has finished arranging controls in the common dialog box to make room for the controls of the child dialog box (if any). |
|
!! end |
|
!! |
|
!! szFile cSTRING(MAX_PATH) |
|
!! |
|
!! code |
|
!! PrintDebugSTRING('MyProcess_OFNotify ofn.hdr.TheCode ['& ofn.hdr.TheCode &']<13,10>') |
|
!! ! PrintDebugSTRING('MyProcess_OFNotify ofn.hdr.TheCode ['& lclOFN.TheCode &']<13,10>') |
|
!! ! case lclOFN.TheCode |
|
!! |
|
!! case ofn.hdr.TheCode !MG: modification, should be CODE vs. TheCode |
|
!! of CDN_FILEOK ; !The user clicked the OK button; the dialog box is about to close. |
|
!! of CDN_FOLDERCHANGE ; !The user opened a new folder or directory. |
|
!! ! if CommDlg_OpenSave_GetFolderPath(GetParent(hDlg), szFile, sizeof(szFile)) <= sizeof(szFile)) |
|
!! ! ! // Display this new path in the appropriate box. |
|
!! ! SetDlgItemText(hDlg, IDE_SELECTED, szFile) |
|
!! ! end |
|
!! of CDN_HELP ; !The user clicked the Help button. |
|
!! of CDN_INITDONE ; !The system has finished initializing the dialog box, and the dialog box has finished processing the WM_INITDIALOG message. Also, the system has finished arranging controls in the common dialog box to make room for the controls of the child dialog box (if any). |
|
!! of CDN_SELCHANGE ; !The user selected a new file or folder from the file list. |
|
!! of CDN_SHAREVIOLATION ; !The common dialog box encountered a sharing violation on the file about to be returned. |
|
!! of CDN_TYPECHANGE ; !The user selected a new file type from the list of file types. |
|
!! end |
|
!! !---MSDN--- |
|
!! ! If the hook procedure returns zero, the default dialog box procedure processes the message. |
|
!! ! |
|
!! ! If the hook procedure returns a nonzero value, the default dialog box procedure ignores the message. |
|
!! ! |
|
!! ! For the CDN_SHAREVIOLATION and CDN_FILEOK notification messages, |
|
!! ! the hook procedure should return a nonzero value to indicate that |
|
!! ! it has used the SetWindowLong function to set a nonzero DWL_MSGRESULT value. |
|
!! !---MSDN--- |
|
!! return TRUE |
|
!! |
|
|
|
|
|
|
|
!=============================================================================================MyCommDlgExtendedError Procedure |
|
CommDlgExtendedError_Describe Procedure(DWORD argExtErr) |
|
|
|
lclText STRING(30) |
|
!lclExtERR DWORD |
|
code |
|
!lclExtERR = CommDlgExtendedError() |
|
case argExtErr |
|
!---------- The following general error codes can be returned for any of the common dialog box functions |
|
!123456789-123456789-123 |
|
of CDERR_DIALOGFAILURE ; lclText='CDERR_DIALOGFAILURE ' !EQUATE(0xFFFF) |
|
|
|
of CDERR_GENERALCODES ; lclText='CDERR_GENERALCODES ' !EQUATE(0000h) |
|
of CDERR_STRUCTSIZE ; lclText='CDERR_STRUCTSIZE ' !EQUATE(0001h) |
|
of CDERR_INITIALIZATION ; lclText='CDERR_INITIALIZATION ' !EQUATE(0002h) |
|
of CDERR_NOTEMPLATE ; lclText='CDERR_NOTEMPLATE ' !EQUATE(0003h) |
|
of CDERR_NOHINSTANCE ; lclText='CDERR_NOHINSTANCE ' !EQUATE(0004h) |
|
of CDERR_LOADSTRFAILURE ; lclText='CDERR_LOADSTRFAILURE ' !EQUATE(0005h) |
|
of CDERR_FINDRESFAILURE ; lclText='CDERR_FINDRESFAILURE ' !EQUATE(0006h) |
|
of CDERR_LOADRESFAILURE ; lclText='CDERR_LOADRESFAILURE ' !EQUATE(0007h) |
|
of CDERR_LOCKRESFAILURE ; lclText='CDERR_LOCKRESFAILURE ' !EQUATE(0008h) |
|
of CDERR_MEMALLOCFAILURE ; lclText='CDERR_MEMALLOCFAILURE ' !EQUATE(0009h) |
|
of CDERR_MEMLOCKFAILURE ; lclText='CDERR_MEMLOCKFAILURE ' !EQUATE(000Ah) |
|
of CDERR_NOHOOK ; lclText='CDERR_NOHOOK ' !EQUATE(000Bh) |
|
of CDERR_REGISTERMSGFAIL ; lclText='CDERR_REGISTERMSGFAIL ' !EQUATE(000Ch) |
|
|
|
!------------ The following error codes can be returned for the PrintDlg function: |
|
of PDERR_PRINTERCODES ; lclText='PDERR_PRINTERCODES ' !EQUATE(1000h) |
|
of PDERR_SETUPFAILURE ; lclText='PDERR_SETUPFAILURE ' !EQUATE(1001h) |
|
of PDERR_PARSEFAILURE ; lclText='PDERR_PARSEFAILURE ' !EQUATE(1002h) |
|
of PDERR_RETDEFFAILURE ; lclText='PDERR_RETDEFFAILURE ' !EQUATE(1003h) |
|
of PDERR_LOADDRVFAILURE ; lclText='PDERR_LOADDRVFAILURE ' !EQUATE(1004h) |
|
of PDERR_GETDEVMODEFAIL ; lclText='PDERR_GETDEVMODEFAIL ' !EQUATE(1005h) |
|
of PDERR_INITFAILURE ; lclText='PDERR_INITFAILURE ' !EQUATE(1006h) |
|
of PDERR_NODEVICES ; lclText='PDERR_NODEVICES ' !EQUATE(1007h) |
|
of PDERR_NODEFAULTPRN ; lclText='PDERR_NODEFAULTPRN ' !EQUATE(1008h) |
|
of PDERR_DNDMMISMATCH ; lclText='PDERR_DNDMMISMATCH ' !EQUATE(1009h) |
|
of PDERR_CREATEICFAILURE ; lclText='PDERR_CREATEICFAILURE ' !EQUATE(100Ah) |
|
of PDERR_PRINTERNOTFOUND ; lclText='PDERR_PRINTERNOTFOUND ' !EQUATE(100Bh) |
|
of PDERR_DEFAULTDIFFERENT ; lclText='PDERR_DEFAULTDIFFERENT ' !EQUATE(100Ch) |
|
|
|
!------------- The following error codes can be returned for the ChooseFont function: |
|
of CFERR_CHOOSEFONTCODES ; lclText='CFERR_CHOOSEFONTCODES ' !EQUATE(2000h) |
|
of CFERR_NOFONTS ; lclText='CFERR_NOFONTS ' !EQUATE(2001h) |
|
of CFERR_MAXLESSTHANMIN ; lclText='CFERR_MAXLESSTHANMIN ' !EQUATE(2002h) |
|
|
|
!------------- The following error codes can be returned for the GetOpenFileName and GetSaveFileName functions: |
|
of FNERR_FILENAMECODES ; lclText='FNERR_FILENAMECODES ' !equate(3000h) !MG: not in my MSDN |
|
of FNERR_SUBCLASSFAILURE ; lclText='FNERR_SUBCLASSFAILURE ' !equate(3001h) |
|
of FNERR_INVALIDFILENAME ; lclText='FNERR_INVALIDFILENAME ' !equate(3002h) |
|
of FNERR_BUFFERTOOSMALL ; lclText='FNERR_BUFFERTOOSMALL ' !equate(3003h) |
|
|
|
!------------- The following error code can be returned for the FindText and ReplaceText functions: |
|
of FRERR_FINDREPLACECODES ; lclText='FRERR_FINDREPLACECODES ' !equate(4000h) |
|
of FRERR_BUFFERLENGTHZERO ; lclText='FRERR_BUFFERLENGTHZERO ' !equate(4001h) !FindText and ReplaceText |
|
|
|
!------------- MG: assumed to be for ChoseColor |
|
of CCERR_CHOOSECOLORCODES ; lclText='CCERR_CHOOSECOLORCODES ' !equate(5000h) !MG: Not in my MSDN |
|
else lclText='Uknown Code ['& argExtERR &']' |
|
end !case |
|
lclText = '[' & argExtErr &'] ' & CLIP(lclText) |
|
return lclText |
|
|
|
|
|
|
|
|