|
-
March 29th, 1999, 03:56 PM
#1
How to add a picture in CImageList1(ActiveX control)?
I've added several ActiveX controls to my project, including CImage, CImages,
CImageList1. But I can't successfully add a picture to the CImageList1 objct.
Below is part of my program. I used debug to trace my program and error occured
at the last line.
CImage myImage;
CImages myImages;
CImageList1 myImageList;
CPictureHolder pict;
VARIANT var1, var2, var3;
pict.CreateFromBitmap(IDB_BMWORD);
myImage.SetRefPicture(pict.GetPictureDispatch());
var1.vt = VT_i4;
var1.lVar = (long) 1;
var2.vt = VT_BSTR;
var2.bstr = CString("picture1" ;
var3.vt = VT_DISPATCH;
var3.ppdispVal = (&myImage.m_lpDispatch);
myImages.Add(&vtv1, &vtv2 ,&tvariant);
m_ImageList1.SetRefListImages(m_Images.m_lpDispatch); // error occured.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|