// stdafx.cpp : source file that includes just the standard includes // Mv_Util.pch will be the pre-compiled header // stdafx.obj will contain the pre-compiled type information #include "stdafx.h" CString GetAppPath(void) { CWinApp* pApp=AfxGetApp(); if(pApp==0) return _T(""); TCHAR buf[256]; GetModuleFileName(0,buf,256); CString sAppPath(buf); int nPos=sAppPath.ReverseFind('\\'); if(nPos) sAppPath=sAppPath.Left(nPos); return sAppPath; }