CString strAppName;
GetModuleFileName(NULL, strAppName.GetBuffer(_MAX_PATH), _MAX_PATH);
strAppName.ReleaseBuffer();
int nPos = strAppName.ReverseFind('//');
strAppName = strAppName.Left(nPos + 1);
-----------------------------------------------OR------------------------------------------------------------
TCHAR tchBuffer[MAX_PATH ];
LPTSTR lpszCurDir;
lpszCurDir = tchBuffer;
GetCurrentDirectory(MAX_PATH , lpszCurDir);
MessageBox(lpszCurDir);