use warnings; use strict; package MyApp; use Wx qw(:everything); use base 'Wx::App'; #Loads a 16x16 BMP image my $bmp = Wx::Bitmap->new("exit.bmp",wxBITMAP_TYPE_BMP); sub OnInit { my $frame = Wx::Frame->new(undef,-1,'Menu Icon Test'); # Creates menus my $menu1 = Wx::Menu->new(); my $menu1item = $menu1->Append(wxID_EXIT, "Exit"); # I'm trying to set menu item icon here... # but the image does not show as expected $menu1item->SetBitmap ( $bmp ); # Creates menu bar my $menubar = Wx::MenuBar->new(); $menubar->Append($menu1, "File"); # Attach menubar to the window $frame->SetMenuBar($menubar); $frame->Show(); } MyApp->new->MainLoop;