Dear FF users,
I have a weird issue with the FF_SaveFileDialog() and/or AfxSaveFileDialog() functions.
1. If the FireFly project name is called "Project" both functions works well. the default folder is the default directory and I can re-size the dialog.
2. If the FireFly project name is called "Lean IT Management Software" (which is the name of my real project), both functions have the same behavior; the "FileSaveDialog" form is displayed full screen and cannot be re-size; by the way in these cases the default folder is the desktop.
To test this behavior you have just to create a sample project with a button and put this code :
'------------------------------------------------------------------------------------------------------------------------
Function FORM1_COMMAND1_BN_CLICKED ( _
ControlIndex As Long, _ ' index in Control Array
hWndForm As Dword, _ ' handle of Form
hWndControl As Dword, _ ' handle of Control
idButtonControl As Long _ ' identifier of button
) As Long
' declare the variables
Local lSaveAsFileName As String
Local lFilter As String ' holds the filter list
Local lFlags As Long ' flags that descibe the OpenFiles dialog behavior
Local lDefaultPath As Asciiz*%MAX_PATH
Local lResult As Long
' init the variables
lFilter = "All files (*.*)|*.*"
lFlags = %OFN_HIDEREADONLY Or %OFN_LONGNAMES Or %OFN_OVERWRITEPROMPT Or %OFN_EXPLORER Or %OFN_ENABLESIZING Or %OFN_ENABLEHOOK
lSaveAsFileName = "toto.txt"
' select a filename
lResult = FF_SaveFileDialog(hWndForm, "Save the selected file as ...", lSaveAsFileName, lDefaultPath, lFilter, ".txt", lFlags, %True)
'lResult = AfxSaveFileDialog(hWndForm, "Save the selected file as ...", lSaveAsFileName, lDefaultPath, lFilter, ".txt", lFlags)
End Function
It's really weird; why these functions work fine with a FF project name and not with another one ? I do not understand.
Any ideas ?
Thanks for your help. Jean-Pierre
IMPORTANT : I forgot to mention that I encounter this issue only with Windows 7 Professional; with Windows XP Professional everything works fine.
Hi Jean-Pierre,
I used your code in a sample project using both types of project names and I am not getting the same results that you are seeing. Sorry.
Paul
Hi Paul,
Thank you for your help on this topic.
After your reply, I tried myself this code on another 64 bits PC with Windows 7 Professional and everything was fine (no issue at all).
So I came back to first PC on which I had this issue; I downloaded CCleaner and clean the registry; after cleaning the registry I had no problem at all; both functions work correctly now.
There were probably some wrong settings on this PC that was causing this strange behavior.
I'm really sorry to have wasted your time on this subject.
Regards,
Jean-Pierre