CBitmap in IPicture
-
Hallo!
Ich habe eine CBitmap und möchte das ganze gerne in ein IPicture umwandeln.
Hab da mal ein bischen was gefunden, nur funktionierts nicht so richtig:
//Do the conversion from a HBITMAP to IPicture PICTDESC picture_desc; picture_desc.cbSizeofstruct = sizeof(picture_desc); picture_desc.picType = PICTYPE_BITMAP; picture_desc.bmp.hbitmap = (HBITMAP)m_bmp; picture_desc.bmp.hpal = NULL; HRESULT hr = OleCreatePictureIndirect(&picture_desc, IID_IPicture, TRUE, (void**)m_pPic->GetIPicture());m_pPic = CPicture.
GetIPicture() liefert das IPicture Objekt aus der CPicture Klasse.Ich hab die Bitmap nicht als File.
Kann mir bitte wer weiterhelfen?