char   path_buffer[_MAX_PATH];
 char   drive[_MAX_DRIVE];
 char   dir[_MAX_DIR];
 char   fname[_MAX_FNAME];
 char   ext[_MAX_EXT];
    
 GetModuleFileName(NULL,   path_buffer,   _MAX_PATH);   
 _splitpath(path_buffer,   drive,   dir,   fname,   ext);   
 CString   strDir;   
 strDir   +=   drive;   
 strDir   +=   dir;   
 AfxMessageBox(strDir);
posted on 2011-02-16 16:32  °ι 、曲 终  阅读(305)  评论(0)    收藏  举报