The problem lies a little further upwards
int ID_INTERP_WINDOW_TOGGLE=wxNewId();
The ID gets generated at runtime but the event table gets generated at compile time. Actually i wonder why this compiles at all, and also the menu eventhandler shouldn't be called as well. So either use a compile time constant for the event table (like an enum value), or use dynamic event handler registration (Bind<> is so amazing, i totally stopped using event tables at all. However this doesn't work if you still need to be compatible to wxWidgets 2.8

).