Re: transparent PNG for toolbar
"umeca74" <[email protected]>
| Newsgroups | gmane.comp.windows.wtl |
|---|---|
| Message-ID | <[email protected]> |
here's how it's done using GDI+
// somewhere after CreateSimpleToolBarCtrl is called...
Gdiplus::Bitmap* gbm = Gdiplus::Bitmap::FromFile(L"res\\test.png");
Gdiplus::Color clr(Gdiplus::Color::Transparent);
HIMAGELIST hImageList = ::ImageList_Create(16, 16, ILC_COLOR32, 5, 1);
HBITMAP inner = 0;
gbm->GetHBITMAP(clr, &inner); // this must be destroyed
::ImageList_Add(hImageList, inner, 0);
::SendMessage(hWndToolBar, TB_SETIMAGELIST, 0, (LPARAM)hImageList);
delete gbm;
so the idea is to create a new imagelist from the png and set it to the toolbar. It works from windows XP onwards
hth
nikos
---
www.zabkat.com
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/wtl/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/wtl/join
(Yahoo! ID required)
<*> To change settings via email:
[email protected]
[email protected]
<*> To unsubscribe from this group, send an email to:
[email protected]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/