Re: Changing the Image in Microsoft Forms 2.0 Image control
first of all include
#include <afxctl.h>
now make a variable of image type control by clicking add variable on that control.
Here m_pic is the variable of that control.
CImage img;
img.Load(L"C:\\Users\\Public\\Pictures\\Sample Pictures\\Desert.jpg");
CPictureHolder pictholder;
pictholder.CreateFromBitmap(img.Detach()); // a new bitmap that I created.utref_Picture();
m_pic.putref_Picture(pictholder.GetPictureDispatch());
Bookmarks