MFC中, 创建的DC在什么时候才需要Release ?
听说
ClientDC Dc; 这个就不用! 那什么情况下的DC才用?

解决方案 »

  1.   

    创建得都不需要,当且仅当你从window用GetDC之类得函数获得一个dc指针时才需要
      

  2.   

    The application must call the ReleaseDC member function for each call to the GetWindowDC member function and for each call to the GetDC member function.
    MSDN上说的很清楚
      

  3.   

    只要释放GET的DC,何时释放?不用了就释放嘛