Author Topic: Problems with wxCheckListBox into a new panel  (Read 2965 times)

MoiCJarod

  • Guest
Problems with wxCheckListBox into a new panel
« on: December 06, 2008, 05:35:57 pm »
Hello,

I just tried today to move an ancient project from wxDevC++ to Code::Blocks + wxSmith, but when I insert a wxCheckListBox on a new panel, some errors occured :

Code
[...]/GererInternet/PanelGestionInternet.h|24|erreur: ISO C++ forbids declaration of ‘wxCheckListBox’ with no type|
[...]/GererInternet/PanelGestionInternet.h|24|erreur: expected ‘;’ before ‘*’ token|
[...]/GererInternet/PanelGestionInternet.cpp||In constructor ‘PanelGestionInternet::PanelGestionInternet(wxWindow*, wxWindowID)’:|
[...]/GererInternet/PanelGestionInternet.cpp|33|erreur: ‘CheckListBoxUtilisateurs’ was not declared in this scope|
[...]/GererInternet/PanelGestionInternet.cpp|33|erreur: expected type-specifier before ‘wxCheckListBox’|
[...]/GererInternet/PanelGestionInternet.cpp|33|erreur: expected `;' before ‘wxCheckListBox’|
||=== Génération finie: 5 erreurs, 0 avertissements ===|

Lines 24 and 33 are auto generated lines by wxSmith :

24 : wxCheckListBox* CheckListBoxUtilisateurs;

33 :    CheckListBoxUtilisateurs = new wxCheckListBox(this, ID_CHECKLISTBOXUTILISATEURS, wxPoint(0,32), wxSize(160,200), 0, 0, 0, wxDefaultValidator, _T("ID_CHECKLISTBOXUTILISATEURS"));

It seems that when compilation is done, class wxCheckListBox isn't headered ... (although header include file (#include <wx/checklst.h>) is in my header file).

I looked the wx help file, it is mentioning something about USE_OWNER_DRAWN to be set to 1. But this has to be done only under windows, and I am under Ubuntu 8.10.

It only occurs when I put the wxCheckListBox on a panel, not on a frame or dialog ... I don't know why compilator does not see this class only when creating it on an panel ...

Has somebody ever encountered this error ?

Jarod