Just to add, you can use _splitpath () to do that...
--
Girish Bharadwaj [VC++/MVP]
Quote:
>Use GetModuleFileName() and strip off everything after the last
>backslash char.
>/ravi
>"There is always one more bug..."
>http://www.matrixsoftware.com/ravib
>----------------
>> Hi,
>> I have an MFC Dialog based Application
>> and I would like to know how I can get
>> the directory of the application.
>> In Visual Basic we have:
>> App.Path
>> But I don't know what it is in VC or MFC
>> Please email me if you know!!!
>> Thanks.
>> Johnny Lai