//新建空的Win32 Applicatoin工程文件,将Project->Settings->General设置为非Not Using MFC
#include <afxwin.h>
// 说明应用程序类
class CHelloApp : public CWinApp
{
public:
      virtual BOOL InitInstance();
};
// 建立应用程序类的实例
CHelloApp HelloApp;
// 说明主窗口类
class CHelloWindow : public CFrameWnd
{
    CStatic* cs;
public:
        CHelloWindow();
};
// 每当应用程序首次执行时都要调用的初始化函数
BOOL CHelloApp::InitInstance()
{
m_pMainWnd = new CHelloWindow();
m_pMainWnd->ShowWindow(m_nCmdShow);
m_pMainWnd->UpdateWindow();
return TRUE;
}
// 窗口类的构造函数
CHelloWindow::CHelloWindow()
{
 // 建立窗口本身
Create(NULL,"Frame");}

解决方案 »

  1.   

    错误提示:
    --------------------Configuration: Frame - Win32 Release--------------------
    Compiling...
    Frame.cpp
    Linking...
    nafxcw.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __endthreadex
    nafxcw.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __beginthreadex
    Release/Frame.exe : fatal error LNK1120: 2 unresolved externals
    Error executing link.exe.
    Frame.exe - 3 error(s), 0 warning(s)
      

  2.   

    怎么能设置NOT Using MFC呢???
      

  3.   

    设置为其他两个,然后Rebuild all试试
      

  4.   

    我上面是将Project->Settings->General设置为非Not Using MFC就是其它两项了,设置为
    Not Using MFC编译也不会成功的!
      

  5.   

    感谢 bugzhao(阿辉)我将DEBUG设置为非Not Using MFC。Win32 Release却没有,刚才没事 的时候乱看一下,在DEBUG设置处想到了Release设置。