Author Topic: Auto Generated code with wxWidgets  (Read 1061 times)

Offline asd34

  • Multiple posting newcomer
  • *
  • Posts: 27
Auto Generated code with wxWidgets
« on: May 17, 2015, 07:39:34 am »
Dear All,

I have problem with auto generated code for wxWidgets (3.0.0) in C::B, the supposed codes are not generated automatical in C::B editor. For example, I 've main menu, status bar and a toolbar in my project,  Below is the code portion which is produced in the C::B IDE automatically for components in the wxSmith, especailly for toolbar there is nothing definitive and object is not declared is there any automatic shortcuts to force C::B to refresh the autogenerated code ?

Code: [Select]
Widget_TestFrame::Widget_TestFrame(wxWindow* parent,wxWindowID id)
{
    //( *Initialize(Widget_TestFrame)
    wxMenuItem* MenuItem2;
    wxMenuItem* MenuItem1;
    wxMenu* Menu1;
    wxMenuBar* MenuBar1;
    wxMenu* Menu2;

    Create(parent, id, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxDEFAULT_FRAME_STYLE, _T("id"));
    SetClientSize(wxSize(542,214));
    Button1 = new wxButton(this, ID_BUTTON1, _("Label"), wxPoint(56,48), wxDefaultSize, 0, wxDefaultValidator, _T("ID_BUTTON1"));
    Button2 = new wxButton(this, ID_BUTTON2, _("Label"), wxPoint(184,48), wxDefaultSize, 0, wxDefaultValidator, _T("ID_BUTTON2"));
    MenuBar1 = new wxMenuBar();
    Menu1 = new wxMenu();
    MenuItem1 = new wxMenuItem(Menu1, idMenuQuit, _("Quit\tAlt-F4"), _("Quit the application"), wxITEM_NORMAL);
    Menu1->Append(MenuItem1);
    MenuBar1->Append(Menu1, _("&File"));
    Menu2 = new wxMenu();
    MenuItem2 = new wxMenuItem(Menu2, idMenuAbout, _("About\tF1"), _("Show info about this application"), wxITEM_NORMAL);
    Menu2->Append(MenuItem2);
    MenuBar1->Append(Menu2, _("Help"));
    SetMenuBar(MenuBar1);
    StatusBar1 = new wxStatusBar(this, ID_STATUSBAR1, 0, _T("ID_STATUSBAR1"));
    int __wxStatusBarWidths_1[1] = { -1 };
    int __wxStatusBarStyles_1[1] = { wxSB_NORMAL };
    StatusBar1->SetFieldsCount(1,__wxStatusBarWidths_1);
    StatusBar1->SetStatusStyles(1,__wxStatusBarStyles_1);
    SetStatusBar(StatusBar1);

    Connect(idMenuQuit,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&Widget_TestFrame::OnQuit);
    Connect(idMenuAbout,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&Widget_TestFrame::OnAbout);
    Connect(ID_BUTTON1,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&Widget_TestFrame::OnButton1Click);
    Connect(ID_BUTTON2,wxEVT_COMMAND_BUTTON_CLICKED,(wxObjectEventFunction)&Widget_TestFrame::OnButton2Click);


     //Connect( wxEVT_MOVE,(wxObjectEventFunction)&wid_testFrame::OnMouseMove);
    // *)
}