Convert CBitmap object to CxImage object MFC

522 views Asked by At

I have a CBitmap object "m_bmp". I need to convert this to a CxImage Object. Any ideas? Is there any direct conversion from bitmap object to other types available from CxImage?

1

There are 1 answers

0
esh On BEST ANSWER

m_Img.CreateFromHBITMAP((HBITMAP)m_bmp.m_hObject);

m_Img is a CxImage Object. After initializing the device context to draw to "m_bmp", the CreateFromHBITMAP function is called.