-// hello.cpp). Now IMPLEMENT_APP should add this code if required.
-
-#define IMPLEMENT_WXWIN_MAIN_CONSOLE \
- int main(int argc, char **argv) { return wxEntry(argc, argv); }
+// hello.cpp). Now wxIMPLEMENT_APP should add this code if required.
+
+// For compilers that support it, prefer to use wmain() as this ensures any
+// Unicode strings can be passed as command line parameters and not just those
+// representable in the current locale.
+#if wxUSE_UNICODE && defined(__VISUALC__)
+ #define wxIMPLEMENT_WXWIN_MAIN_CONSOLE \
+ int wmain(int argc, wchar_t **argv) \
+ { \
+ wxDISABLE_DEBUG_SUPPORT(); \
+ \
+ return wxEntry(argc, argv); \
+ }
+#else // Use standard main()
+ #define wxIMPLEMENT_WXWIN_MAIN_CONSOLE \
+ int main(int argc, char **argv) \
+ { \
+ wxDISABLE_DEBUG_SUPPORT(); \
+ \
+ return wxEntry(argc, argv); \
+ }
+#endif