请教 OnPrepareDC 的使用
这是我的代码
- C/C++ code
void CMyTestDlg::OnMouseMove(UINT nFlags, CPoint point){ // TODO: Add your message handler code here and/or call default if(bcapture) { CClientDC dc(this); OnPrepareDC(&dc); //error C3861: 'OnPrepareDC': identifier not found CRect oldrc(pt,size); InvalidateRect(oldrc,TRUE); pt=point-offsetsize; CRect newrc(pt,size); InvalidateRect(newrc,TRUE); } CDialog::OnMouseMove(nFlags, point);}我想移动对话框上的图片,这是OnMouseMove函数,提示onpreparedc出错,求指点。
[解决办法]
onpreparedc是为打印功能服务的消息函数
你为什么要这么用
你这个位置通过GetDC获取即可