码迷,mamicode.com
首页 > 其他好文 > 详细

vc 获得当前exe的路径

时间:2014-10-28 19:28:33      阅读:180      评论:0      收藏:0      [点我收藏+]

标签:style   ar   sp   bs   ef   app   file   har   nbsp   

TCHAR szStylesPath[_MAX_PATH];

 VERIFY(::GetModuleFileName(
  AfxGetApp()->m_hInstance, szStylesPath, _MAX_PATH));  

 CString csStylesPath(szStylesPath);
 int nIndex  = csStylesPath.ReverseFind(_T(‘\\‘));
 if (nIndex > 0) {
  csStylesPath = csStylesPath.Left(nIndex);
 }
 else {
  csStylesPath.Empty();
 }
 m_csStylesPath += csStylesPath + _T("\\Styles\\");

vc 获得当前exe的路径

标签:style   ar   sp   bs   ef   app   file   har   nbsp   

原文地址:http://www.cnblogs.com/yuyf/p/4057455.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!