下面是很简单的一段代码,但是在连接的时候,发生了如下错误:
nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __endthreadex
nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __beginthreadex
请问:哪里出错了呢。
另外,要满足下列要求:规定"OnLButtonDown()、OnDestroy()、OnClose()、OnQueryOpen()"函数的调用顺序。
应该如何做呢?
谢谢。
#include "afxwin.h"
class myFram : public CFrameWnd
{
public:
myFram()
{
}
void OnLButtonDown()
{
MessageBox("OnLButtonDown()",0,0);
}
void OnDestroy()
{
MessageBox("OnDestroy()",0,0);
}
void OnClose()
{
MessageBox("Onclose",0,0);
}
void OnQueryOpen()
{
MessageBox("OnQueryOpen",0,0);
}
DECLARE_MESSAGE_MAP()
};
BEGIN_MESSAGE_MAP(myFram,CFrameWnd)
ON_WM_LBUTTONDOWN()
ON_WM_DESTROY()
ON_WM_CLOSE()
ON_WM_QUERYOPEN()
END_MESSAGE_MAP()
class myApp : public CWinApp
{
public:
BOOL InitInstance();
};
BOOL myApp::InitInstance()
{
myFram *frame;
frame = new myFram();
frame->Create("myClass","hello");
frame->ShowWindow(1);
m_pMainWnd = frame;
return TRUE;
}
myApp aa;