SetPathName causes problems in Win95
Dean Grimm -- dean@cortron.com
Friday, January 10, 1997
Environment : VC++ 4.1, Windows 95
I am trying to use CDocument::SetPathName() to initialize the documents default path
before the first save. With NT4.0, it works perfectly, popping up the file dialog with the
specified directory & filename. Under Win95, however, the file dialog never appears,
and the document isn't saved.
Does anyone know of a different way of specifying default path & filename (short of
totally bypassing the framework)?
Thanks in advance,
Dean Grimm
Software Engineer / Cortron Corp.
Dean Grimm -- dean@cortron.com
Tuesday, January 14, 1997
Thanks for the reply. I probably should have been a little more specific in
my original post. If I don't call SetPathName(), The save dialog pops up
as normal. It's only when I call SetPathName that the dialog doesn't appear.
Herein lies my puzzlement.
Dean
----------
From: Rajesh Chandrasekaran
Sent: Tuesday, January 14, 1997 12:32 PM
To: Dean Grimm
Subject: Re: SetPathName causes problems in Win95
Hi Dean,
For the Windows 95 code, you may need to set the flag OFN_EXPLORER with
the m_ofn.Flags structure of the file dialog to view the dialog box. MS
itself claims to do it.
BTW, I am wondering how you're getting the file dialog in NT 4.0 without
this flag is setting. Because we tried to ran into the same problem
without setting the above flag.
Thanks
Rajesh
Dean Grimm wrote:
>
> Environment : VC++ 4.1, Windows 95
>
> I am trying to use CDocument::SetPathName() to initialize the documents default path
> before the first save. With NT4.0, it works perfectly, popping up the file dialog with the
> specified directory & filename. Under Win95, however, the file dialog never appears,
> and the document isn't saved.
>
> Does anyone know of a different way of specifying default path & filename (short of
> totally bypassing the framework)?
>
> Thanks in advance,
> Dean Grimm
> Software Engineer / Cortron Corp.
Dulepov Dmitry -- dima@ssm6000.samsung.ru
Thursday, January 16, 1997
[Mailer: "Groupware E-Mail". Version 1.02.054]
> [From: Dean Grimm
>Thanks for the reply. I probably should have been a little more specific in
>my original post. If I don't call SetPathName(), The save dialog pops up
>as normal. It's only when I call SetPathName that the dialog doesn't appear.
>Herein lies my puzzlement.
>
>Dean
>
Save dialog will appear automatically only if there is no file name for document yet. You call SetPathName(), so you have it (file name). No problem.
Dmitry A. Dulepov
Samsung Electronics Co., Ltd.
Russian Research Center
Phone: +7 (095) 213-9207
Fax: +7 (095) 213-9196
E-mail: dima@src.samsung.ru
====================================
| Вернуться в корень Архива
|