#94 3.3.1-beta: Error in generated code for MSW

open
nobody
None
5
2012-03-01
2012-03-01
Anonymous
No

Version 3.3.1-beta generates incorrect code for a wxITEM_NORMAL menu item with a bitmap:

wxMenuItem* c_pItemFileOpen;
c_pItemFileOpen = new wxMenuItem( c_pMenuFile, wxID_ANY, wxString( _("&Open...") ) + wxT('\t') + wxT("CTRL+O"), _("Open an existing database."), wxITEM_NORMAL );
#ifdef __WXMSW__
c_pItemFileOpen->SetBitmaps( wxBitmap( wxT("gfx/icons/menu/open.ico"), wxBITMAP_TYPE_ANY ), );
#elif defined( __WXGTK__ )
c_pItemFileOpen->SetBitmap( wxBitmap( wxT("gfx/icons/menu/open.ico"), wxBITMAP_TYPE_ANY ) );
#endif

"Kind" is set to "wxITEM_NORMAL", "bitmap" to "load from file" and the correct filename, "unchecked_bitmap" is set to "load from file" and the filename is blank of course as the menu item is now wxITEM_CHECK.

"Unchecked_bitmap" should only be generated if "kind" is set to "wxITEM_CHECK" according the help text within the program.

Discussion