Application Directory. 
Author Message
 Application Directory.

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



Wed, 02 Aug 2000 03:00:00 GMT  
 Application Directory.

Use GetModuleFileName() and strip off everything after the last
backslash char.

/ravi

"There is always one more bug..."
http://www.matrixsoftware.com/ravib

----------------

Quote:

> 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




Wed, 02 Aug 2000 03:00:00 GMT  
 Application Directory.

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




Fri, 04 Aug 2000 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Application directory, not launch directory

2. Application Directory

3. Getting the Application Directory

4. Application Directory

5. Application directory in windows service

6. Two simple questions: deltree and application directory

7. Parent Application Directory.

8. Application Directory

9. Change to Application Directory (Code included)

10. Newbie - Application directory

11. Application directory question

12. Get Application Directory. Example please

 

 
Powered by phpBB® Forum Software