GteLogToMessageBox.cpp
Go to the documentation of this file.
1 // David Eberly, Geometric Tools, Redmond WA 98052
2 // Copyright (c) 1998-2017
3 // Distributed under the Boost Software License, Version 1.0.
4 // http://www.boost.org/LICENSE_1_0.txt
5 // http://www.geometrictools.com/License/Boost/LICENSE_1_0.txt
6 // File Version: 3.0.0 (2016/06/19)
7 
8 #include <GTEnginePCH.h>
10 #include <windows.h>
11 using namespace gte;
12 
14  :
15  Logger::Listener(flags)
16 {
17 }
18 
20 {
21  std::string output = message + "Do you want to debug?";
22 
23  std::wstring text(output.begin(), output.end());
24  int selection = MessageBox(nullptr, text.c_str(), L"Report",
25  MB_ICONERROR | MB_YESNOCANCEL | MB_APPLMODAL | MB_TOPMOST);
26 
27  switch (selection)
28  {
29  case IDYES:
30  // Break and debug.
31  __debugbreak();
32  break;
33 
34  case IDNO:
35  // Continue execution.
36  break;
37 
38  case IDCANCEL:
39  default:
40  // Terminate execution.
41  exit(0);
42  break;
43  }
44 }
GLsizei const GLchar *const * string
Definition: glcorearb.h:809
GLuint GLsizei const GLchar * message
Definition: glcorearb.h:2538
GLbitfield flags
Definition: glcorearb.h:1591
virtual void Report(std::string const &message)


geometric_tools_engine
Author(s): Yijiang Huang
autogenerated on Thu Jul 18 2019 04:00:00