Linking...
LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/ch5_2.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.ch5_2.exe - 2 error(s), 0 warning(s)
这种错误是什么原因呀!
好好的,我只是改了几句代码就这样了,我改回去都不行了
希望各位能给出鼠标显示的原代码。拒绝灌水说话的人!!!!
还有怎么输出文字数不确定的文本呀??
我很急的,谢谢了
LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/ch5_2.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.ch5_2.exe - 2 error(s), 0 warning(s)
这种错误是什么原因呀!
好好的,我只是改了几句代码就这样了,我改回去都不行了
希望各位能给出鼠标显示的原代码。拒绝灌水说话的人!!!!
还有怎么输出文字数不确定的文本呀??
我很急的,谢谢了
OnMouseMove(CPoint point)
{
m_point=point;
}在OnDraw中加入:
CString str;
str.Format("x=%d,y=%d",m_point.x,m_point.y);
pDC->TextOut(0,0,str);
{
char str[64];
sprintf(str,"当前鼠标X坐标位置=%d,当前鼠标Y坐标位置=%d",
point.x,point.y);
AfxGetApp()->AfxGetMainWnd()->SetWindowText(str);
}
{
// TODO: Add your message handler code here and/or call default
CChildFrame *pFrame=(CChildFrame*)(this->GetParentFrame());
CStatusBar *pStatusBar=pFrame->GetChildStatusBar();
int index_x=pStatusBar->CommandToIndex(ID_INDICATOR_X);
int index_y=pStatusBar->CommandToIndex(ID_INDICATOR_Y);
CString str;
str.Format("x=%4d",point.x);
pStatusBar->SetPaneText(index_x,str);
str.Format("y=%4d",point.y);
pStatusBar->SetPaneText(index_y,str); CView::OnMouseMove(nFlags, point);
}----------------------
干脆给你个例子吧?
你的信箱?
[email protected]
....
GetCursorPos