BOOL CDMApp::InitInstance()
{
char dir[MAX_PATH];
::GetModuleFileName(NULL, dir, MAX_PATH);
char* pdest = strrchr(dir, '\\');
pdest[1] = '\0';
::SetCurrentDirectory(dir);
strcat(dir, _T("XXX.ini"));
free((void*)m_pszProfileName);
m_pszProfileName = _tcsdup(dir);
m_nCmdShow = GetProfileInt(_T("Window"), _T("show"), SW_SHOWNORMAL);
//(中略)
m_pMainWnd->ShowWindow(m_nCmdShow);
//(略)
}


これはどうでしょう?