extern int AFXAPI AfxWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPTSTR lpCmdLine, int nCmdShow);extern "C" int WINAPI
_tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPTSTR lpCmdLine, int nCmdShow)
{
// call shared/exported WinMain
     return AfxWinMain(hInstance, hPrevInstance, lpCmdLine, nCmdShow);
}/////////////////////////////////////////////////////////////////////////////
// initialize app state such that it points to this module's core stateBOOL AFXAPI AfxInitialize(BOOL bDLL, DWORD dwVersion)
{
AFX_MODULE_STATE* pModuleState = AfxGetModuleState();
pModuleState->m_bDLL = (BYTE)bDLL;
ASSERT(dwVersion <= _MFC_VER);
UNUSED(dwVersion);  // not used in release build
#ifdef _AFXDLL
pModuleState->m_dwVersion = dwVersion;
#endif
#ifdef _MBCS
// set correct multi-byte code-page for Win32 apps
if (!bDLL)
_setmbcp(_MB_CP_ANSI);
#endif //_MBCS
return TRUE;
}// force initialization early
#pragma warning(disable: 4074)
#pragma init_seg(lib)#ifndef _AFXDLL
void AFX_CDECL _AfxTermAppState()
{
// terminate local data and critical sections
AfxTermLocalData(NULL, TRUE);
AfxCriticalTerm(); // release the reference to thread local storage data
AfxTlsRelease();
}
#endif#ifndef _AFXDLL
char _afxInitAppState = (char)(AfxInitialize(FALSE, _MFC_VER), atexit(&_AfxTermAppState));
#else
char _afxInitAppState = (char)(AfxInitialize(FALSE, _MFC_VER));
#endif/////////////////////////////////////////////////////////////////////////////

解决方案 »

  1.   

    if (!bDLL){
    _setmbcp(_MB_CP_ANSI);
    #endif //_MBCS
    return TRUE;
    }少了红色,大括号不配对了
      

  2.   

    oh,fuck,看错了。
    extern int AFXAPI AfxWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
    LPTSTR lpCmdLine, int nCmdShow);//这句删掉
      

  3.   

    你Debug下首先按的是F10,不是F5吧,如果首先按的是F10的话,就会进入_tWinMain,因为这个是Win32 Windows Appliction的入口函数。