How can I call CFileDialog in "xxxxDoc.cpp" in SDI application
-
hi... How can i call "CFileDialog" in "testDoc.cpp" which is not inherited from CWnd Class. i tried the following /****************************/ BOOL Test() { CFileDialog dlg(FALSE,............,NULL); return TRUE; } /***************************/ but it was not working!!!!!and showing error when function returns!!! Is there any need to delete the object. How can i approach?????
-
hi... How can i call "CFileDialog" in "testDoc.cpp" which is not inherited from CWnd Class. i tried the following /****************************/ BOOL Test() { CFileDialog dlg(FALSE,............,NULL); return TRUE; } /***************************/ but it was not working!!!!!and showing error when function returns!!! Is there any need to delete the object. How can i approach?????
BOOL Test() { CFileDialog dlg(FALSE,............,NULL); dlg.DoModal(); // :doh: return TRUE; }
Somethings seem HARD to do, until we know how to do them. ;-)_AnShUmAn_
-
hi... How can i call "CFileDialog" in "testDoc.cpp" which is not inherited from CWnd Class. i tried the following /****************************/ BOOL Test() { CFileDialog dlg(FALSE,............,NULL); return TRUE; } /***************************/ but it was not working!!!!!and showing error when function returns!!! Is there any need to delete the object. How can i approach?????
What error it shows,When returns.
Sudhir Kumar
-
What error it shows,When returns.
Sudhir Kumar
hi... " Un Handled error Exception arises...."
-
BOOL Test() { CFileDialog dlg(FALSE,............,NULL); dlg.DoModal(); // :doh: return TRUE; }
Somethings seem HARD to do, until we know how to do them. ;-)_AnShUmAn_
I have done that and i did some extra stuff when i click Save and when i click cancel. but after that when the function return s then it arises EXCEPTION error. Thanku....
-
hi... How can i call "CFileDialog" in "testDoc.cpp" which is not inherited from CWnd Class. i tried the following /****************************/ BOOL Test() { CFileDialog dlg(FALSE,............,NULL); return TRUE; } /***************************/ but it was not working!!!!!and showing error when function returns!!! Is there any need to delete the object. How can i approach?????
This is actually a known bug that comes about due to the size of the
OPENFILENAME
structure being used with MFC. You need to define_WIN32_WINNT
to be0x500
, and set thelStructSize
member to to 88 (instead of 76). You might also need to useGetOpenFileName()
instead ofCFileDialog()
."Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
modified on Wednesday, June 4, 2008 8:45 AM