From 0a4c16d6c4c05f01a72d2a7b0db45c539045e3e0 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Wed, 21 May 2003 22:01:31 +0000 Subject: [PATCH] Test using transparency in menu bitmaps. Better, but still shows background when menu item selected. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20687 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- samples/ownerdrw/nosound.png | Bin 0 -> 275 bytes samples/ownerdrw/ownerdrw.cpp | 6 +++++- samples/ownerdrw/sound.png | Bin 0 -> 227 bytes 3 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 samples/ownerdrw/nosound.png create mode 100644 samples/ownerdrw/sound.png diff --git a/samples/ownerdrw/nosound.png b/samples/ownerdrw/nosound.png new file mode 100644 index 0000000000000000000000000000000000000000..0fa3116d5422ebf6f660926f9a4a9cf60a3fa620 GIT binary patch literal 275 zcmeAS@N?(olHy`uVBq!ia0vp^B0wz4!VDz0{JuOJNU@iA`ns}TW)&6TS3mc}?+Z|f zv%n*=n1O*?2!t6g-L3lr6f_9%32_C|4Pe{=rW$~}hK2(N4m310{0EBvXZR1MfHaT= z1pdNmo^s+)gX5ZCaPJGw*X? zx7O5F^>z)$8vZXQ9Q#ju2!>p4mb~4;5V`1Jx8UtPvlji#xHPrbb*=q7_M68Z?M%q> tTVTei_aK4yTBqDi@38mjU;i#VE4_Yytb5g8+ajQC44$rjF6*2Ung9!GX$=4X literal 0 HcmV?d00001 diff --git a/samples/ownerdrw/ownerdrw.cpp b/samples/ownerdrw/ownerdrw.cpp index 85608c96e6..18c3ed7c02 100644 --- a/samples/ownerdrw/ownerdrw.cpp +++ b/samples/ownerdrw/ownerdrw.cpp @@ -26,6 +26,7 @@ #include "wx/ownerdrw.h" #include "wx/menuitem.h" +#include "wx/image.h" #include "wx/msw/checklst.h" // Define a new application type @@ -83,6 +84,7 @@ IMPLEMENT_APP(OwnerDrawnApp); // init our app: create windows bool OwnerDrawnApp::OnInit(void) { + wxInitAllImageHandlers(); OwnerDrawnFrame *pFrame = new OwnerDrawnFrame(NULL, _T("wxWindows Ownerdraw Sample"), 50, 50, 450, 340); @@ -108,7 +110,9 @@ void OwnerDrawnFrame::InitMenu() fontBmp(14, wxDEFAULT, wxNORMAL, wxNORMAL, FALSE); // sorry for my artistic skills... - wxBitmap bmpBell(_T("bell")), bmpSound(_T("sound")), bmpNoSound(_T("nosound")); + wxBitmap bmpBell(_T("bell")); + wxBitmap bmpSound(_T("sound.png"), wxBITMAP_TYPE_PNG); + wxBitmap bmpNoSound(_T("nosound.png"), wxBITMAP_TYPE_PNG); // construct submenu pItem = new wxMenuItem(sub_menu, Menu_Sub1, _T("Submenu &first"), _T("large")); diff --git a/samples/ownerdrw/sound.png b/samples/ownerdrw/sound.png new file mode 100644 index 0000000000000000000000000000000000000000..a62c127a2b2eff270d20c5c7b26075bbabc1efb0 GIT binary patch literal 227 zcmeAS@N?(olHy`uVBq!ia0vp^B0wz4!VDz0{JuOJNU@iA`ns}TW)&6T6*SJ+`5q|5 zS>O>_%)r1c1j3A$?$-SQ3K|6Xgt!9f1~6^_Qw=~~L&Jds2O1h0{sYDTGyDfrKpMyb z0)JsOPoOwQNswPKSO6%0uX%4IP|V2F#WAGfR