-
September 16th, 2005, 12:10 PM
#1
How to merge two image lists?
For example, I have two image lists CImageList il1 and CImageList il2. I want to merge them into one image list? How can I do that? Thanks for your inputs.
-
September 16th, 2005, 12:51 PM
#2
Re: How to merge two image lists?
It looks like there's an overload for Create that might do just that:
Code:
BOOL Create(
CImageList& imagelist1,
int nImage1,
CImageList& imagelist2,
int nImage2,
int dx,
int dy
);
Check out the MSDN:
http://msdn.microsoft.com/library/de...a3a.create.asp
Viggy
-
September 19th, 2005, 11:56 AM
#3
Re: How to merge two image lists?
Thanks for your reply. The function Create is a MFC function but I am working with ATL. There is not similar overload in ATL for Create. Any idea how to do that in ATL? Thanks a lot.
Originally Posted by MrViggy
-
September 19th, 2005, 02:16 PM
#4
Re: How to merge two image lists?
I don't see a CImageList in the ATL reference. Are you really using an MFC CImageList, or did you roll your own?
Viggy
-
September 19th, 2005, 02:34 PM
#5
Re: How to merge two image lists?
ATL does have CImageList and It is under ATLControls namespace but somehow ATL is poorly documented. That is why you didn't see a CImageList in the ATL reference.
Originally Posted by MrViggy
I don't see a CImageList in the ATL reference. Are you really using an MFC CImageList, or did you roll your own?
Viggy
-
September 19th, 2005, 02:44 PM
#6
Re: How to merge two image lists?
Hmm, okay, I haven't really dabbled in ATL, however the MFC version of "Create" is just:
Code:
BOOL CImageList::Create(CImageList& imagelist1, int nImage1,
CImageList& imagelist2, int nImage2, int dx, int dy)
{
return Attach(ImageList_Merge(imagelist1.m_hImageList, nImage1,
imagelist2.m_hImageList, nImage2, dx, dy));
}
And, 'ImageList_Merge' looks like it's just an API call (in 'commctrl.h'):
Code:
WINCOMMCTRLAPI HIMAGELIST WINAPI ImageList_Merge(HIMAGELIST himl1, int i1, HIMAGELIST himl2, int i2, int dx, int dy);
HTH...
Viggy
-
September 19th, 2005, 02:46 PM
#7
Re: How to merge two image lists?
-
June 17th, 2013, 01:23 AM
#8
Re: How to merge two image lists?
i think you'd better roll your own to c# merge image lists. this version of codes work well for me. but i have no idea how to do this in atl.
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
|