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
This commit is contained in:
parent
c0cb30dc8f
commit
0a4c16d6c4
BIN
samples/ownerdrw/nosound.png
Normal file
BIN
samples/ownerdrw/nosound.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 275 B |
@ -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"));
|
||||
|
BIN
samples/ownerdrw/sound.png
Normal file
BIN
samples/ownerdrw/sound.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 227 B |
Loading…
Reference in New Issue
Block a user