您好:
    我觉得在使用的过程中,他们没有什么区别阿?麻烦讲一讲。谢谢!

解决方案 »

  1.   

    CClientDC:客户端区域的CDC
    CWindowsDC:窗口区域的CDC
      

  2.   

    CClientDC 和CWindowDC都是CDC的派生类。很明显他们除了具有基类的特性外,还有自己的特点。CLientDC专指客户区的DC,CWindowDC值整个窗口的DC.
      

  3.   

    MSDN上如下解释,我想已经说得很明白了:
    *1:
    The CDC class defines a class of device-context objects. The CDC object provides member functions for working with a device context, such as a display or printer, as well as members for working with a display context associated with the client area of a window.*2: 
    The CClientDC class is derived from CDC and takes care of calling the Windows functions GetDC at construction time and ReleaseDC at destruction time. This means that the device context associated with a CClientDC object is the client area of a window.*3:
    The CWindowDC class is derived from CDC. It calls the Windows functions GetWindowDC at construction time and ReleaseDC at destruction time. This means that a CWindowDC object accesses the entire screen area of a CWnd (both client and nonclient areas).
      

  4.   

    CClientDC:客户端区域的CDC
    CWindowsDC:窗口区域的CDC
    都是CDC的派生类