Toolbar Custom ID
Posted: Mon Nov 04, 2013 2:07 am
Right now in wxCrafter we can choose an ID from a dropdown list for a toolbar item, for example. However, if we type in a custom ID, of course we need to declare it as a wxNewId(). However, if I add
in wxcrafter.cpp and
in wxcrafter.h, these will be erased automatically by wxCrafter whenever I "Generate Code".
I understand that it is not recommended to edit wxcrafter.cpp and wxcrafter.h in the first place, so how can I use custom IDs? I am asking this because I have several similar toolbar buttons which need unique IDs.
Code: Select all
const long MainFrame::ID_MYID = wxNewId();
Code: Select all
static const long ID_MYID;
I understand that it is not recommended to edit wxcrafter.cpp and wxcrafter.h in the first place, so how can I use custom IDs? I am asking this because I have several similar toolbar buttons which need unique IDs.