You can also extract the handle to the picture by calling IPicture::get_Handle(). You can cast the handle to the appropriate type; that is, for example HBITMAP, HICON, and HMETAFILE. To determine what type of handle to cast it to, call IPicture::get_Type(). 

解决方案 »

  1.   

    masterz你好,我明白你的意思:是这样吗?HBITMAP hbmRet=NULL;
    OLE_HANDLE hPic = NULL;
    if (SUCCEEDED(piPic->get_Handle(&hPic)) && hPic)
    {
        hbmRet = (HBITMAP)hPic;
        .....
    }
    是这样子的吗?
    但是我想要的不是HBITMAP而是DIB,应该怎么由HBITMAP得到DIB呢?GZ~~~~!                        
      

  2.   

    由HBITMAP得到图片的DIB数据又该怎么做啊。
      

  3.   

    用,GetDIBits,SetDIBits这两个函数可以帮你完成!有意可来信要原代码!
    [email protected]