]> Creatis software - crea.git/blobdiff - src/creaWx.h
* creaNewProject executable
[crea.git] / src / creaWx.h
index 3a7d6bbd3edccfdbc0da4516c41deac232c8fc70..29fb0619f09ec2c72aafe29335bd9f42a5a95eaa 100644 (file)
@@ -37,6 +37,27 @@ typedef void wxWindow;
 //===========================================================================
 #ifdef USE_WXWIDGETS
 
+
+
+#if defined(_WIN32) 
+//  How to have a Console and wxWidgets
+//  http://www.wxwidgets.org/wiki/index.php/MSVC_Setup_Guide
+//   In Visual C++ 6 (7 should be similar), to create an application that is both a console application 
+//  (cout's to the console are visible) and has a wxWidgets GUI, 
+//  you need to use the linker option "/subsystem:console" and the following code:
+#define CREA_WXMAIN_WITH_CONSOLE                                       \
+  int main(int argc, char* argv[])                                     \
+  {                                                                    \
+    return WinMain(::GetModuleHandle(NULL), NULL,                      \
+                  ::GetCommandLine(), SW_SHOWNORMAL);                  \
+  }                                                                    
+#else // defined(_WIN32) 
+#define CREA_WXMAIN_WITH_CONSOLE
+#endif // defined(_WIN32) 
+
+
+
+
 namespace crea
 {
   //==================================================================