// check that the wxBuildOptions object (constructed in the application
// itself, usually the one from IMPLEMENT_APP() macro) matches the build
// options of the library and abort if it doesn't
static bool CheckBuildOptions(const char *optionsSignature,
const char *componentName);
// check that the wxBuildOptions object (constructed in the application
// itself, usually the one from IMPLEMENT_APP() macro) matches the build
// options of the library and abort if it doesn't
static bool CheckBuildOptions(const char *optionsSignature,
const char *componentName);
// command line parsing (GUI-specific)
// ------------------------------------------------------------------------
// command line parsing (GUI-specific)
// ------------------------------------------------------------------------
virtual bool OnCmdLineParsed(wxCmdLineParser& parser);
virtual void OnInitCmdLine(wxCmdLineParser& parser);
virtual bool OnCmdLineParsed(wxCmdLineParser& parser);
virtual void OnInitCmdLine(wxCmdLineParser& parser);
// miscellaneous other stuff
// ------------------------------------------------------------------------
// miscellaneous other stuff
// ------------------------------------------------------------------------
- int main(int argc, char **argv) { return wxEntry(argc, argv); }
-#elif defined(__WXMSW__) && defined(WXUSINGDLL)
+ IMPLEMENT_WXWIN_MAIN_CONSOLE
+#elif defined(__WXMSW__)
#define IMPLEMENT_WXWIN_MAIN \
extern int wxEntry(HINSTANCE hInstance, \
HINSTANCE hPrevInstance = NULL, \
char *pCmdLine = NULL, \
#define IMPLEMENT_WXWIN_MAIN \
extern int wxEntry(HINSTANCE hInstance, \
HINSTANCE hPrevInstance = NULL, \
char *pCmdLine = NULL, \
extern "C" int WINAPI WinMain(HINSTANCE hInstance, \
HINSTANCE hPrevInstance, \
char *lpCmdLine, \
extern "C" int WINAPI WinMain(HINSTANCE hInstance, \
HINSTANCE hPrevInstance, \
char *lpCmdLine, \
wxAppConsole *wxCreateApp() \
{ \
wxAppConsole::CheckBuildOptions(WX_BUILD_OPTIONS_SIGNATURE, \
wxAppConsole *wxCreateApp() \
{ \
wxAppConsole::CheckBuildOptions(WX_BUILD_OPTIONS_SIGNATURE, \
+// Same as IMPLEMENT_APP(), but for console applications.
+#define IMPLEMENT_APP_CONSOLE(appname) \
+ IMPLEMENT_APP_NO_MAIN(appname) \
+ IMPLEMENT_WXWIN_MAIN_CONSOLE
+
// this macro can be used multiple times and just allows you to use wxGetApp()
// function
#define DECLARE_APP(appname) extern appname& wxGetApp();
// this macro can be used multiple times and just allows you to use wxGetApp()
// function
#define DECLARE_APP(appname) extern appname& wxGetApp();