|
Archives
D Programming
DD.gnu digitalmars.D digitalmars.D.bugs digitalmars.D.dtl digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript |
c++.windows.32-bits - file i/o dialog problem
I have a very strange problem.
One of my program testers cannot use the file save dialog in my program.
Every other tester has no problem and he has no problem with other programs
that use the generic microsoft file dialogs.
What happens is he presses the save button.
The common dialog for saving a file shows up on screen but in the edit
control where the filename goes he gets a single random character.
When he tries to save a file he gets no response from the system.
The program is designed to look at the file extension and then save in the
appropriate format.
case BN_CLICKED:
// Save Character
if(GetFileNameSave(fname,50,hwnd))
{
SaveFile(fname, hwnd); //Call function to save file
}
break ;
BOOL GetFileNameSave(char *filename, int len, HWND hWnd)
{
OPENFILENAME ofn;
ZeroMemory(&ofn, sizeof(OPENFILENAME)); //Zero out the memory for the
filename info
ofn.lStructSize = sizeof(OPENFILENAME); //Size of the structure
ofn.hwndOwner = hWnd; //Window that is calling this
ofn.lpstrFilter = ("HackMaster Files (*.hmf)\0*.hmf\0HTM Files
(*.htm)\0*.htm\0HTML Files (*.html)\0*.html\0"); //Filters
ofn.lpstrFile = filename; //Where to store it
ofn.nMaxFile = len; //Tell it how big the char array is
ofn.lpstrTitle = ("Save a File"); //Title
ofn.lpstrDefExt = ("htm");
ofn.Flags = OFN_HIDEREADONLY|OFN_PATHMUSTEXIST; //Any flags here
//^These flags together mean the file name/path typed must exist
//And it won't ask for the user if they want to create it.
return GetSaveFileName(&ofn); //Display dialog box
}
It seems to me that somwhere along the way the filename string is getting
overwritten by something, but I can not figure out why it only happens to
him!
All other users see the filename last used showing up in the save dialoag
edit control...
Thanks
Steve De Chellis
Aug 09 2002
You might want to check into the version of comdlg32.dll this user has on his system. If it worked fine with other users, his comdlg32.dll might be an older version and causing problems. Jan Steve & Denise De Chellis wrote: Aug 09 2002
Is there any other possibility? I now have two users with this problem. I have built in a temporary file save / load systems using an edit control to enter the filename but it is very limited. "Jan Knepper" <jan smartsoft.cc> wrote in message news:3D54AE3A.D67EAF8E smartsoft.cc...You might want to check into the version of comdlg32.dll this user has on Aug 19 2002
On Mon, 19 Aug 2002 11:01:21 -0400, "Steve & Denise De Chellis" <dbouton snet.net> wrote:Is there any other possibility? I now have two users with this problem. I have built in a temporary file save / load systems using an edit control to enter the filename but it is very limited. Aug 22 2002
|