首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > VC/MFC >

请问 OnPrepareDC 的使用

2012-04-17 
请教OnPrepareDC的使用这是我的代码C/C++ codevoid CMyTestDlg::OnMouseMove(UINT nFlags, CPoint point){

请教 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获取即可

热点排行