
Cannot display the dialog derived from common file dialog
Quote:
>Hi,Doug
>Thank you,
>I am sure the dialog resource's ID is unique.I try to trace it with
>de{*filter*},I think it should popup the dialog which I hoped when it run here:
>if (m_bOpenFileDialog)
> nResult = ::GetOpenFileName(&m_ofn); // it can run here
> else
> nResult = ::GetSaveFileName(&m_ofn);
>but no dialog here
>It really bothers me.
So GetOpenFileName succeeds but GetSaveFileName fails, with exactly the same
input? What is the value of nResult? If it's zero, call CommDlgExtendedError
and see what it returns. If that doesn't help, you're going to have to take
a close look at the m_ofn contents and try simplifying. Once you get it to a
working state, you'll know that the things you changed were involved in
breaking it in the first place. I don't know if this will help you, but see
this message for a description of a fairly common problem with VC6's
MFC,
and attempts to use the Win2K-style file dialogs:
http://www.*-*-*.com/
--
Doug Harrison
Microsoft MVP - Visual C++