/Core/Dependencies/OgreSource/OgreMain/include/WIN32/OgreErrorDialogImp.h

https://bitbucket.org/barakianc/nvidia-physx-and-apex-in-gge · C Header · 77 lines · 26 code · 6 blank · 45 comment · 2 complexity · 90943af723b29cdecae4684d708e9b5b MD5 · raw file

  1. /*
  2. -----------------------------------------------------------------------------
  3. This source file is part of OGRE
  4. (Object-oriented Graphics Rendering Engine)
  5. For the latest info, see http://www.ogre3d.org/
  6. Copyright (c) 2000-2012 Torus Knot Software Ltd
  7. Permission is hereby granted, free of charge, to any person obtaining a copy
  8. of this software and associated documentation files (the "Software"), to deal
  9. in the Software without restriction, including without limitation the rights
  10. to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  11. copies of the Software, and to permit persons to whom the Software is
  12. furnished to do so, subject to the following conditions:
  13. The above copyright notice and this permission notice shall be included in
  14. all copies or substantial portions of the Software.
  15. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  16. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  17. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  18. AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  19. LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  20. OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  21. THE SOFTWARE.
  22. -----------------------------------------------------------------------------
  23. */
  24. #ifndef __WIN32ERRORDIALOG_H__
  25. #define __WIN32ERRORDIALOG_H__
  26. #define WIN32_LEAN_AND_MEAN
  27. #if !defined(NOMINMAX) && defined(_MSC_VER)
  28. # define NOMINMAX // required to stop windows.h messing up std::min
  29. #endif
  30. #include "windows.h"
  31. namespace Ogre
  32. {
  33. /** \addtogroup Core
  34. * @{
  35. */
  36. /** \addtogroup General
  37. * @{
  38. */
  39. /** Class for displaying the error dialog if Ogre fails badly. */
  40. class _OgreExport ErrorDialog
  41. {
  42. public:
  43. ErrorDialog();
  44. ~ErrorDialog() {}
  45. /**
  46. @remarks
  47. Displays the error dialog.
  48. @param
  49. errorMessage The error message which has caused the failure.
  50. @param
  51. logName Optional name of the log to display in the detail pane.
  52. */
  53. void display(const String& errorMessage, String logName = "");
  54. protected:
  55. String mErrorMsg;
  56. /** Callback to process window events */
  57. #if OGRE_ARCHITECTURE_64 == OGRE_ARCH_TYPE
  58. static INT_PTR CALLBACK DlgProc(HWND hDlg, UINT iMsg, WPARAM wParam, LPARAM lParam);
  59. #else
  60. static BOOL CALLBACK DlgProc(HWND hDlg, UINT iMsg, WPARAM wParam, LPARAM lParam);
  61. #endif
  62. HINSTANCE mHInstance; // HInstance of application, for dialog
  63. };
  64. /** @} */
  65. /** @} */
  66. }
  67. #endif