From be072a1f7f8ed1b487717acf226cd381192c26f3 Mon Sep 17 00:00:00 2001 From: Eduardo DAVILA Date: Thu, 10 Mar 2016 16:00:14 +0100 Subject: [PATCH] #2887 creaContours Feature New Normal - Avoid vtk messages window in Windows --- .../wxContourGUIExample.cxx | 8 ++++++++ .../wxContourGUIExample/wxContourGUIExample.h | 20 +++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/appli/wxContourGUIExample/wxContourGUIExample.cxx b/appli/wxContourGUIExample/wxContourGUIExample.cxx index 38a8b9f..46c896e 100644 --- a/appli/wxContourGUIExample/wxContourGUIExample.cxx +++ b/appli/wxContourGUIExample/wxContourGUIExample.cxx @@ -82,6 +82,8 @@ #include + + wxContourMainFrame* wxTheApplication::frame = 0; //---------------------------------------------------------------------------------------------------------------- @@ -113,8 +115,14 @@ void wxAppConsole::OnAssertFailure(char const *,int,char const *,char const *,ch } #endif + + bool wxTheApplication :: OnInit() { + vtkOutputWindowCreaContour *outputWindowCreaContour= vtkOutputWindowCreaContour::New(); + vtkOutputWindow::SetInstance( outputWindowCreaContour ); + outputWindowCreaContour->Delete(); + wxString infoImage; wxInitAllImageHandlers(); diff --git a/appli/wxContourGUIExample/wxContourGUIExample.h b/appli/wxContourGUIExample/wxContourGUIExample.h index d4ea832..4a88e94 100644 --- a/appli/wxContourGUIExample/wxContourGUIExample.h +++ b/appli/wxContourGUIExample/wxContourGUIExample.h @@ -42,6 +42,26 @@ #include #include "wxContourMainFrame.h" +#include "vtkOutputWindow.h" + + +class vtkOutputWindowCreaContour : public vtkOutputWindow +{ +public: + vtkOutputWindowCreaContour() {} + static vtkOutputWindowCreaContour* New() { return new vtkOutputWindowCreaContour;} + + virtual void DisplayDebugText (const char *) {} + virtual void DisplayText (const char *) {} + virtual void DisplayErrorText (const char *) {} + virtual void DisplayWarningText (const char *) {} + virtual void DisplayGenericWarningText (const char *) {} + +protected: +}; + + + /* eed -- 2.47.1