|
Archives
D Programming
DD.gnu digitalmars.D digitalmars.D.bugs digitalmars.D.dtl digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript |
c++.windows.32-bits - Setting folders
I'm having some difficulty getting file i/o to work to my satisfaction. When my program starts up it has to load a few data files. Sometimes when a user starts the program, rather then the program loading the files from the same directory that it resides in, it ends up going to the last folder the user accessed. The program then reports an error as it could not find the files! In a similar manner, if the user saves a file all subsequent loads and saves will begin at the directory just accessed! Please help, I'm sure there is something very simple that I am missing. Steve De Chellis www.hmtk.com Jan 16 2004
For your first question, use GetModuleFilename to figure out where your program is. For your second question, use the lpstrInitialDir field in your OPENFILENAME structure. "Steve" <steve hmtk.com> wrote in message news:bua4ou$2o7m$1 digitaldaemon.com...I'm having some difficulty getting file i/o to work to my Jan 16 2004
|