Re: Switch Bug

new topic     » goto parent     » topic index » view thread      » older message » newer message

I'm not sure of the reason but if you define new_id's for the built in wxID_ constants, things work as expected. I tried the following:

    wxID_CUSTOM1        = new_id(),  
wxID_NEW            = new_id(),  
wxID_OPEN           = new_id(), 
wxID_SAVE           = new_id(), 
wxID_SAVEAS         = new_id(), 
wxID_PRINT_SETUP    = new_id(), 
wxID_PRINT          = new_id(), 
wxID_EXIT           = new_id(), 
    ...... 

Also, probably not necessary but I passed in the Menu id's to the set_event_handler...

constant menuids = {wxID_NEW,wxID_OPEN,wxID_SAVE,wxID_SAVEAS,wxID_PRINT_SETUP,wxID_PRINT,wxID_CUSTOM1,wxID_EXIT} 
set_event_handler( mnuFile, menuids, wxEVT_COMMAND_MENU_SELECTED, routine_id("menu_handler") ) 

It sorta defeats the purpose of using the built in id's, but it seems to work!

Hope this helps,
Ira

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu