if ( OpenClipboard() )
{
         EmptyClipboard();
         //create some data
         CBitmap * junk = new CBitmap();
         CClientDC cdc(this);
         CDC dc;
         dc.CreateCompatibleDC(&cdc);
         CRect client(0,0,200,200);
         junk->CreateCompatibleBitmap(&cdc,client.Width(),client.Height());
         dc.SelectObject(junk);
 
         //call draw routine here that makes GDI calls
         DrawImage(&dc,CString("Bitmap"));
 
         //put the data on the clipboard
         SetClipboardData(CF_BITMAP,junk->m_hObject);
         CloseClipboard();
 
         //copy has been made on clipboard so we can delete
         delete junk;
}
中间的 DrawImage(&dc,CString("Bitmap")) 函数没定义!
好象是GDI的函数,不知道要加什么头文件的。不大清楚,请各位指教!

解决方案 »

  1.   

    Stock Implementation gdiplus.dll 
    Header Declared in Gdiplusgraphics.h, include gdiplus.h 
    Import library gdiplus.lib 
    Minimum availability GDI+ 1.0 
    Minimum operating systems Windows 98/Me, Windows XP, Windows 2000, Windows NT 4.0 SP6 
      

  2.   

    GDI+的东东,使用就没那么方便了。
    先要包含GDI+的头文件,
    然后要使用命名空间。
    然后要初始化GDI+。
    然后才能使用
      

  3.   

    不好意思,没看到miranda2002(天天天蓝)
      

  4.   

       我也遇到了GDI问题,就是把50多张带标号的jpg格式的地图切片图元组织成地图,然后显示,听说GDI+可以实现,但是具体操作不知道,求大神解答。