请问
         CPaintDC dc(this); //CPaintDC是一个做什么的类 CBitmap bitmap;    //CBitmap是一个做什么的类
bitmap.LoadBitmap (IDB_BKWOOD);  CDC dcMem;         //CDC是一个做什么的类
dcMem.CreateCompatibleDC(&dc);//CreateCompatibleDC是一个做什么的
                                       //函数
CBitmap* pOldBitmap = dcMem.SelectObject(&bitmap);//这句话什么意
                                                           //意思? CRect rect(0 ,0, 0, 0);//CRect是做什么的类
GetClientRect(&rect);  //这个函数是哪个类里面的,什么意思? dc.StretchBlt(0, 0, rect.Width(), rect.Height(), &dcMem,
  0, 0, 640, 640, SRCCOPY);//这个函数什么意思?问题很菜,敬请指教

解决方案 »

  1.   

    CPaintDC dc(this); //CPaintDC是一个做什么的类
    The CPaintDC class is a device-context class derived from CDC. It performs a CWnd::BeginPaint at construction time and CWnd::EndPaint at destruction time. A CPaintDC object can only be used when responding to aWM_PAINT message, usually in your OnPaint message-handler member function.是由CDC派生的一个设备上下文类!
    只响应WM_PAINT 
    CDC是一个做什么的类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.
    设备上下文类!
    For specific uses, the Microsoft Foundation Class Library provides several classes derived from CDC . CPaintDC encapsulates calls to BeginPaint and EndPaint. CClientDC manages a display context associated with a window’s client area. CWindowDC manages a display context associated with an entire window, including its frame and controls. CMetaFileDC associates a device context with a metafile.具体还是看MSDN,希望楼主E语可以!
      

  2.   

    CBitmap bitmap;    //CBitmap是一个做什么的类The CBitmap class encapsulates a Windows graphics device interface (GDI) bitmap and provides member functions to manipulate the bitmap. To use a CBitmap object, construct the object, attach a bitmap handle to it with one of the initialization member functions, and then call the object’s member functions.CBitmap Windows 图形设备接口 bitmap,
    bitmap.LoadBitmap (IDB_BKWOOD); BOOL LoadBitmap( LPCTSTR lpszResourceName );BOOL LoadBitmap( UINT nIDResource );Return ValueNonzero if successful; otherwise 0.
    Loads the bitmap resource named by lpszResourceName or identified by the ID number in nIDResource from the application’s executable file. The loaded bitmap is attached to the CBitmap object.装载bitmap资源,名为lpszResourceName ,或由ID确定的资源!
    attache到CBitmap 对象上!CBitmap* pOldBitmap = dcMem.SelectObject(&bitmap);//这句话什么意
                                                               //意思?CDC::SelectObject  
    CPen* SelectObject( CPen* pPen );CBrush* SelectObject( CBrush* pBrush );virtual CFont* SelectObject( CFont* pFont );CBitmap* SelectObject( CBitmap* pBitmap );int SelectObject( CRgn* pRgn );Return ValueA pointer to the object being replaced. This is a pointer to an object of one of the classes derived from CGdiObject, such as CPen, depending on which version of the function is used. The return value is NULL if there is an error. This function may return a pointer to a temporary object. This temporary object is only valid during the processing of one Windows message. For more information, see CGdiObject::FromHandle.
    就是设备选用了你自己定义的pBitmap ,把原来用的返回给你!