wx/msw/ownerdrawnbutton.h don't included
|Reported by:||anhsoft||Owned by:||VZ|
Compile error occurs when I try to build on MSW platform with minimal configuration, which includes wxControl-derived controls (for this reproduction - the button):
./configure --without-subdirs \ --disable-all-features \ --enable-dynlib \ --enable-dynamicloader \ --enable-image \ --enable-gui \ --enable-ownerdrawn \ --enable-uxtheme \ --enable-menus \ --enable-button
./src/msw/control.cpp:469:1: error: 'wxMSWOwnerDrawnButtonBase' has not been dec lared ...
Class 'wxMSWOwnerDrawnButtonBase' is defined in wx\msw\ownerdrawnbutton.h and implemented in src\msw\control.cpp, but this header file is included in control.cpp only if the WX_PRECOMP macros isn't defined:
#ifndef WX_PRECOMP //skip #include "wx/msw/ownerdrawnbutton.h" #endif
It's causes this error (because WX_PRECOMP isn't defined).
File ownerdrawnbutton.h is also included in two other files: wx\msw\checkbox.h and wx\msw\radiobut.h. Therefore, if configuring was with --enable-checkbox or --enable-radiobtn option, we won't have this error.
The patch makes the following: includes ownerdrawnbutton.h outside the scope of the macro.