MFC程序重新启动
char pBuf[MAX_PATH];
//获取应用程序完全路径,比 GetCurrentDirectory 好用多了
GetModuleFileName(NULL,pBuf,MAX_PATH);
STARTUPINFO startupinfo;
PROCESS_INFORMATION proc_info;
memset(&startupinfo,0,sizeof(STARTUPINFO));
startupinfo.cb=sizeof(STARTUPINFO);
// 最重要的地方
::CreateProcess(pBuf,NULL,NULL,NULL,FALSE,
NORMAL_PRIORITY_CLASS,NULL,NULL,&startupinfo,&proc_info);
PostMessage(WM_QUIT);