VC --- 高手请帮忙?
ren20 2000-04-04 12:12:00 请问:
1. 虚拟键盘码是什么? VK_HOME 、 VK_UP 等等 是什么???
2. void CAaaView::OnDraw(CDC* pDC)
{
CLientDC dc(this);
...
... // draw code
}
有些程序的OnDraw函数如上,为什么不用 CDC 的 pDC ,
而用 CLientDC 的 dc 。(为什么专门声名一个设备对象 dc )
在其它地方,如OnLButtonUp函数中,我打算设计: 按下左键,
显示一矩形。
void CEx04cView::OnLButtonDown(UINT nFlags, CPoint point)
{
CClientDC dc(this);
OnPrepareDC(&dc);
...
...
}
为什么不声明 :
CDC* pDC;
OnPrepareDC(pdc);
而声明:CClientDC dc(this);
非常感谢