Re: FileDialog
From: Arlis Rose (arlisATendevouraerospace.com)
Date: 10/07/04
- Next message: JSmith: "Re: Control List and exception error"
- Previous message: JSmith: "Control List and exception error"
- In reply to: Arlis Rose: "FileDialog"
- Next in thread: Arlis Rose: "Re: FileDialog"
- Reply: Arlis Rose: "Re: FileDialog"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 7 Oct 2004 14:56:30 -0400
Ughhh okay a little further info here, it looks like if I try to change
directories (in either dialog) the system will crash with the same error...
this is leading me to believe that the problem isn't actually with the the
"open" or "save" dialog not working properly, but is related to the fact
that I have MANY other timer threads going which are constantly opening and
writing to files (and I never used IMPLICIT paths for any of them)....so I
guess the "default path" is being changed when I tell the "open" or "save"
dialog to change directories (or at least this is the only thing I can think
of that might do it).
Now, having (hopefully) deduced that, can anyone tell me:
A) Does OFN_NOTESTFILECREATE change the default file path (at least
temporarily) which would mean I actually might be right in what I think is
wrong :)
and
B) What is the safest way to have multiple file opening and closing on the
system???? By that I simply mean how can I enforce the default file location
to not change, even if my FileDialogs change the directory (is this even
possible??? or is it perhaps simpler to put a IMPLICIT path to every file
I/O that I have in the code (and yeh there are a LOT of them LoL).
Thanks again for any advice or input :)
BTW - what I mean by IMPLICIT (I'm sure most of yeh know but I might even
have the wrong word there)...instead of:
HBITMAP cBmp = (HBITMAP)::LoadImage(NULL, _T("blank.bmp"), IMAGE_BITMAP, 0,
0, LR_CREATEDIBSECTION | LR_LOADFROMFILE);
use
HBITMAP cBmp = (HBITMAP)::LoadImage(NULL, _T("c:/folder1/blank.bmp"),
IMAGE_BITMAP, 0, 0, LR_CREATEDIBSECTION | LR_LOADFROMFILE);
"Arlis Rose" <arlisATendevouraerospace.com> wrote in message
news:eCRXY3JrEHA.1964@TK2MSFTNGP12.phx.gbl...
> Hey everyone, another quick question, I have two FileDialogs that I use to
> open and save my email's to a text file. However in the "open"
> CFileDialog, I always had the flag OFN_NOTESTFILECREATE (this was never
> set for the load dialog). Now what is confusing me is that having this
> flag set if I tried to open the load dialog my program would crash because
> of one of the following in dgprt.c:
>
> * handle the (hopefully rare) case of
>
> * 1) ASSERT while already dealing with an ASSERT
>
> * 2) two threads asserting at the same time
>
> Now, what I find really odd is that if I opened the "SAVE" dialog first
> (then closed it of course) THEN opened my "OPEN" dialog, everything would
> work fine O_o
>
> Okay, now since I removed the OFN_NOTESTFILECREATE from my "OPEN" dialog
> it takes longer to loud, but it does work...question is why wouldn't it
> work the way I had it??? (Also, this DID work when I only had one dialog
> called by doModal, however I now have several modeless dialog box's
> created from the originally, and it is one of these "children" that is
> calling the "OPEN" and "SAVE" dialogs.
>
> BTW - Here are the original calls I had for open and save FileDialogs (of
> course load now has to have OFN_NOTESTFILECREATE removed to work...)
>
> This isn't an urgent thing (I mean it works now don't "seem" to be having
> any problems) but I'd really like to know why my "open" dialog was
> crashing unless SAVE had been called first (when I was creating these
> dialogs in a modeless dialog box) so I (hopefully) will not make the same
> mistake again, and (if what I am doing now is wrong) make my program more
> stable.
>
> Save:
>
> CFileDialog dlgSave(FALSE, NULL, NULL, OFN_HIDEREADONLY |
> OFN_OVERWRITEPROMPT, _T("Email Files (*.txt)|*.txt|All Files
> (*.*)|*.*||"), NULL);
>
> Open:
>
> CFileDialog dlg3(TRUE, NULL, NULL, OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT
> | OFN_NOTESTFILECREATE,NULL,NULL);
>
>
>
> Thanks for any info guys,
>
>
- Next message: JSmith: "Re: Control List and exception error"
- Previous message: JSmith: "Control List and exception error"
- In reply to: Arlis Rose: "FileDialog"
- Next in thread: Arlis Rose: "Re: FileDialog"
- Reply: Arlis Rose: "Re: FileDialog"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|