Adding single Icons to Imagelist (+ How to create a mask for icon) 
Author Message
 Adding single Icons to Imagelist (+ How to create a mask for icon)

I have 40 single Icons without a mask, each Icon having transp
backgound
color=RGB(255,0,255). I need to put them into an Imagelist.
The Imagelist is connected later to a toolbar as a cold/hot imagelist
by
        SendMessage(TB_SETIMAGELIST, 0,
(LPARAM)TmpImageListA.GetSmall()->m_hImageList);

So I did the following
Note: The IDB_TMPBITMAP is a 16 pixel width and height Bitmap in the
Resource Editor.

TmpImageListA.Create(IDB_TMPBITMAP, i_iIconSizeX, 1, RGB(255,0,255));

TmpImageListA.SetImageCount(iCntToolBarButtons);

loop(for all Icons){

        HICON hIcon = AfxGetApp()->LoadIcon(uiIconID);
        int iRetIndex = TmpImageListA.Replace(idx++, hIcon);

Quote:
}

---- Question:

 {"The accessnumber is not defined"}  German:"Die Zugriffsnummer ist
nicht definiert"
 What's wrong ?

--- Question:
Is this guaranteed to put the Icon into the imagelist
and **getting a mask**automatically created**, because Icon
BG color is RGB(255,0,255) and Imagelist BG color is RGB(255,0,255)  ?

I can not get the ToolBar to display the Icons ...



Tue, 05 Aug 2003 17:16:06 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. ImageList - add single Icons with transp.BG - HOW ??

2. ImageList add folder icon ?

3. Possible to add Icons to Imagelist ???

4. Adding an icon to the Win95 icon tray.

5. How can I create Icons and add Image to CLI

6. Loading an Icon from an ImageList

7. File icons and inheriting ImageList

8. Problem with Background color when port Icon file to ImageList

9. Icons, Bitmaps and Imagelist

10. Converting an Imagelist Icon to a CBitmap

11. CTreeView ImageList with 256 color icons

12. 256 color icons into an imagelist...

 

 
Powered by phpBB® Forum Software