X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FcreaWx.h;h=84a0390c0015180ea0475a24a003a7d71b70eece;hb=9a433b540dd8e5bfc5f533075470c1530ce1314e;hp=eee7414a4a737dabcb0e9bc3b5372aa6b4236fce;hpb=757d5fcb925e1e64e5da7ccac647c9fcc18d2a64;p=crea.git diff --git a/src/creaWx.h b/src/creaWx.h index eee7414..84a0390 100644 --- a/src/creaWx.h +++ b/src/creaWx.h @@ -9,7 +9,6 @@ #include "wx/wxprec.h" #include - #ifdef __BORLANDC__ #pragma hdrstop #endif @@ -29,16 +28,9 @@ typedef void wxWindow; #endif // EO USE_WXWIDGETS //=========================================================================== - - - - - //=========================================================================== #ifdef USE_WXWIDGETS - - #if defined(_WIN32) // How to have a Console and wxWidgets @@ -46,6 +38,7 @@ typedef void wxWindow; // 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[]) \ { \ @@ -59,14 +52,13 @@ typedef void wxWindow; #endif // defined(_WIN32) - - +#include namespace crea { //================================================================== /// Conversion std::string to wxString - inline wxString std2wx(const std::string& s){ + inline wxString std2wx(const std::string& s) { wxString wx; const char* my_string=s.c_str(); wxMBConvUTF8 *wxconv= new wxMBConvUTF8(); @@ -78,7 +70,7 @@ namespace crea return wx; } //================================================================== - + //================================================================== /// Conversion wxString to std::string inline std::string wx2std(const wxString& s){ @@ -93,8 +85,6 @@ namespace crea return s2; } //================================================================== - - } #endif // EO USE_WXWIDGETS