I am trying to set up a wxSpinCtrl where the minimum, maximum and default values are set by variables (g_default, g_min, g_max, see the code snippet below. I currently have them in a file global.cpp, later they will be read from a configuration file). wxCrafter is accepting the variables, but in order to compile the generated code, I manually have to edit wxcrafter.cpp (which I am not supposed to do

For illustration, the code generated by wxCrafter looks like this:
Code: Select all
m_spinCtrl = new wxSpinCtrl(m_panel, wxID_ANY, wxT("g_default"), wxDefaultPosition, wxSize(-1,-1), wxSP_ARROW_KEYS);
m_spinCtrl->SetRange(g_min, g_max);
m_spinCtrl->SetValue(0);
Any suggestions how one could solve these problems, e.g. is there a way to make wxCrafter automatically include some lines of user code into generated code for the GUI? Or do I simply follow the wrong approach (being still pretty new to C++, wxWidgets, CodeLite and wxCrafter).
Many thanks for your help and suggestions!