CWnd::GetDC();
CClientDC dc([window pointer]);

解决方案 »

  1.   

    怎么又出来一个卖男孩的小火柴?你是在什么上面画图呢?如果在View中,直接在OnDraw里使用pDC画不就行了?
      

  2.   

    CClientDC dc(pWnd);   //pWnd为你要在其中画图的窗口指针
      

  3.   

    GetDC()也是CWnd的一个成员函数。在CWnd及其派生类的成员函数中可以直接调用GetDC()
      

  4.   

    我在void CPgsView::OnLButtonUp(UINT nFlags, CPoint point) 中画图CClientDC dc(this);
    PolyBezier(hdc,apt,iCount);能用GetDC吗?
      

  5.   

    CWindow::GetDC()
    怎么这么多的
    class  CXX卖火柴XX : Public C卖火柴的小女孩
    {
    ....
    }
      

  6.   

    CWindowDC dc(this);//this为当前窗口指针
    HDC hDC=dc.GetSafeHdc();