wxCustomBackgroundWindow lacks headers it depends on
|Reported by:||SasQ_pl||Owned by:||VZ|
When #include <wx/custombgwin.h> is the first header on the list, it floods with compile errors about incomplete types from wxWdigets library. When I peeked into this header, I discovered that it doesn't include any wxWidgets headers which would define the symbols it uses. Those symbols are, in order they occur in the source:
wx/custombgwin.h: wxBitmap // #include <wx/bitmap.h> wxDECLARE_NO_COPY_CLASS // #include <wx/defs.h> wx/generic/custombgwin.h: wxEraseEvent // #include <wx/event.h> wxWindow // #include <wx/window.h> wxDC // #include <wx/dc.h> wxSize // #include <wx/gdicmn.h>
Depending on the order the user includes the file, or requiring him to include some other header first, is considered bad style coding. The problem can be solved by including the required headers at the top of the header in question. I tried to add the above list of headers inside the library headers and it solved the problem, no more strange errors from the wxWidgets library.