Getting the Current Application Path
-
Hello Guys I need some help regarding VC++, during the Application runtime..how can the get the Application Path ..i.e the Folder path from where the App runs Thanks in Advance Hariharan.S.N
Get the application object with
AfxGetApp
. TheCWinApp::m_pszExeName
member contains the path and name of the executable without the .EXE extension. After getting this string, just manipulate it to remove the application's name (Remove characters until last character before NULL is '\'). -Antti Keskinen ---------------------------------------------- The definition of impossible is strictly dependant on what we think is possible. -
Get the application object with
AfxGetApp
. TheCWinApp::m_pszExeName
member contains the path and name of the executable without the .EXE extension. After getting this string, just manipulate it to remove the application's name (Remove characters until last character before NULL is '\'). -Antti Keskinen ---------------------------------------------- The definition of impossible is strictly dependant on what we think is possible.Antti Keskinen wrote: After getting this string, just manipulate it to remove the application's name (Remove characters until last character before NULL is '\'). Or use
_splitpath()
.
Five birds are sitting on a fence. Three of them decide to fly off. How many are left?
-
Hello Guys I need some help regarding VC++, during the Application runtime..how can the get the Application Path ..i.e the Folder path from where the App runs Thanks in Advance Hariharan.S.N
-
Hello Guys I need some help regarding VC++, during the Application runtime..how can the get the Application Path ..i.e the Folder path from where the App runs Thanks in Advance Hariharan.S.N
See the FAQ 8.3 How do I find the full path to my program's EXE file?[^] --Mike-- Ericahist | CP SearchBar v2.0.2 | Homepage | RightClick-Encrypt | 1ClickPicGrabber Laugh it up, fuzzball.