/* */
/* Function name : GetAppDir */
/* Description : Get application directory. */
/* */
/********************************************************************/
void GetAppDir(CString& strAppDir)
{
TCHAR szFullPath[MAX_PATH];
TCHAR szDir[_MAX_DIR];
TCHAR szDrive[_MAX_DRIVE];
// Get application's full path.
::GetModuleFileName(NULL, szFullPath, MAX_PATH);
// Break full path into seperate components.
_splitpath(szFullPath, szDrive, szDir, NULL, NULL);
// Store application's drive and path
strAppDir.Format(_T("%s%s"), szDrive, szDir);
}