I need a SaveFile dialog in a non-MFC dll. All the code samples that I have tryed don't work properly under Win2K. Does anyone have a code sample that shows me how to initialize the structure OPENFILENAME before calling GetSaveFileName?
Well! Thank you John Fill very much for your answer!
Unfortunately I still have the same problem! :-(
When I open the file dialog and click anything: for example the Cancel-button or to go one directory up or down, the dialog hangs up!! and I can not do anything except to kill the process with the task manager!!
The result: I receive a file dialog in an other form: this one where you have to choose first the drive and then choose the file in this drive. The file dialog does'nt hang up! Yeahh!! but I still has an other problem :-( I cannot change the drive!!! That means, if the drive of the InitDirectory is C:\I cannot choose a file in the drive D:\ or in any other drive!
Maybe you can help me if you can answer some of these questions:
1. how can I get the the HWND within the dll?
2. If I should change the hook procedure, how does it must look like?
3. Do you have any idea how I can solve this problem with the drive?
4. Does the code work in your case?! If not, why?!
Note that I want to open the file dialog in the DllMain in the switch statement: "case DLL_PROCESS_ATTACH". This could be the reason but no idea why!!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.