]> Creatis software - crea.git/commitdiff
*** empty log message ***
authorEduardo Davila <Eduardo.Davila@creatis.insa-lyon.fr>
Fri, 27 Aug 2010 22:32:50 +0000 (22:32 +0000)
committerEduardo Davila <Eduardo.Davila@creatis.insa-lyon.fr>
Fri, 27 Aug 2010 22:32:50 +0000 (22:32 +0000)
appli/creaNewProject/NewProject/appli/template_wx_appli/CMakeLists.txt
appli/creaNewProject/NewProject/appli/template_wx_appli/winApp.cpp

index 1e11c91c6bebcbcbc0d153065c7c726c72b17b59..ed199903e6f9f46ed587a3261ddf9fe73e4b75bf 100644 (file)
@@ -57,8 +57,13 @@ SET ( ${EXE_NAME}_LINK_LIBRARIES
 #----------------------------------------------------------------------------
 # CREATES AND INSTALLS THE EXE
 
-set ( ${${EXE_NAME}_HAS_GUI} true )
-#set ( ${${EXE_NAME}_CONSOLE} true )
+IF (NOT  ${USE_WXWIDGETS})
+  message("You are asking to create a WX application, but the flag USE_WXWIDGETS is OFF.")
+  message("Set to ON the flag USE_WXWIDGETS in the root CMakefile.txt of your project. ")
+ENDIF(NOT  ${USE_WXWIDGETS})
+
+set ( ${EXE_NAME}_HAS_GUI true )
+#set ( ${EXE_NAME}_CONSOLE true )
 
 CREA_ADD_EXECUTABLE( ${EXE_NAME} )
 #----------------------------------------------------------------------------
index 0c2e25e569a854998daa4ce9f99b1f61ec954492..cb488f4d2b1f9f9d896baa62f8df812bc37c8baf 100644 (file)
@@ -1,4 +1,15 @@
 
+// For compilers that support precompilation, includes "wx/wx.h".
+#include "wx/wxprec.h"
+
+#ifdef __BORLANDC__
+#pragma hdrstop
+#endif
+
+#ifndef WX_PRECOMP
+#include <wx/wx.h>
+#endif
+
 #include <wx/frame.h>
 class myApp : public wxApp
 {
@@ -18,7 +29,7 @@ bool myApp::OnInit( )
 #endif
 
 
-       wxWindows *frame = new wxFrame(this , _T("My window.."));
+       wxFrame *frame = new wxFrame(NULL , -1 ,_T("My window.."));
        SetTopWindow(frame);  
        frame->Show(true);