A
arychen
Unregistered / Unconfirmed
GUEST, unregistred user!
#include <afxwin.h>
class CMyAppublic CWinApp{
public:
virtual BOOL InitInstance();
};
class CMyFrameublic CFrameWnd{
public:
CMyFrame();
};
CMyApp cmyapp;
CMyApp::InitInstance()
{
m_pMainWnd=new CMyFrame();
m_pMainWnd->ShowWindow(SW_SHOWNORMAL);
m_pMainWnd->UpdateData();
return TRUE;
}
CMyFrame::CMyFrame()
{
Create(NULL,"AAAAA");
}
程序可以编译,但是不能联接生成EXE文件。
提示错误:Linking...
msvcrtd.lib(crtexe.obj) : error LNK2001: unresolved external symbol _main
Debug/Text1.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
Creating browse info file...
Text1.exe - 2 error(s), 0 warning(s)
求教。
还有怎么样得到窗口的句柄?
class CMyAppublic CWinApp{
public:
virtual BOOL InitInstance();
};
class CMyFrameublic CFrameWnd{
public:
CMyFrame();
};
CMyApp cmyapp;
CMyApp::InitInstance()
{
m_pMainWnd=new CMyFrame();
m_pMainWnd->ShowWindow(SW_SHOWNORMAL);
m_pMainWnd->UpdateData();
return TRUE;
}
CMyFrame::CMyFrame()
{
Create(NULL,"AAAAA");
}
程序可以编译,但是不能联接生成EXE文件。
提示错误:Linking...
msvcrtd.lib(crtexe.obj) : error LNK2001: unresolved external symbol _main
Debug/Text1.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
Creating browse info file...
Text1.exe - 2 error(s), 0 warning(s)
求教。
还有怎么样得到窗口的句柄?