S
Shao
I am using VS.Net 2003 and I need to create a IPictureDisp pointer that
points to a picture object.
IPictureDisp *pd;
PICTDESC pdesc;
memset(&pdesc,0,sizeof(pdesc));
pdesc.cbSizeofstruct = sizeof(pdesc);
pdesc.picType = PICTYPE_BITMAP;
pdesc.bmp.hbitmap = static_cast
<HBITMAP>LoadImage(hInst,MAKEINTRESOURCE(resourceID),IMAGE_BITMAP,0,0,LR_LOADMAP3DCOLORS);
pdesc.bmp.hpal = NULL;
HRESULT hr =
OleCreatePictureIndirect(&pdesc,IID_IPictureDisp,TRUE,(void**)&pd);
after this is done "pd" doesn't seem to contain any useful information.
what's wrong here?
points to a picture object.
IPictureDisp *pd;
PICTDESC pdesc;
memset(&pdesc,0,sizeof(pdesc));
pdesc.cbSizeofstruct = sizeof(pdesc);
pdesc.picType = PICTYPE_BITMAP;
pdesc.bmp.hbitmap = static_cast
<HBITMAP>LoadImage(hInst,MAKEINTRESOURCE(resourceID),IMAGE_BITMAP,0,0,LR_LOADMAP3DCOLORS);
pdesc.bmp.hpal = NULL;
HRESULT hr =
OleCreatePictureIndirect(&pdesc,IID_IPictureDisp,TRUE,(void**)&pd);
after this is done "pd" doesn't seem to contain any useful information.
what's wrong here?