当我们用VC6++的向导生成一个工程时,我没看到WINMAIN(),请问在哪?程序如何执行啊?

解决方案 »

  1.   

    看深入浅出MFC~
    那里有解释~
      

  2.   

    /////////////////////////////////////////////////////////////////////////////
    // export WinMain to force linkage to this moduleextern 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);
    }我在MFC的源码中搜,只搜到以上这两个,就是没有WinMain(),不知道怎么回事。
      

  3.   

    CXXXXApp
               InitInstance
    CXXXApp theApp;
      

  4.   

    你用mfc编程,他是将winmain封装起来的,如果你连这个都还不是很清楚的话,那么我觉得你,应该从sdk下手比较的好,因为当你熟悉了sdk时候,用mfc的话就如鱼得水这纯属个人意见
      

  5.   

    在向导中选择win32的工程,不要选mfc exe。