Nella

CMainFrame::OnCreate

puoi usare

codice:
TCHAR szPath[MAX_PATH]; 

GetModuleFileName(NULL, szPath, MAX_PATH);
MessageBox(szPath, NULL, 0);