show_window.hpp 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. /*
  2. * Copyright 2016 Klemens D. Morgenstern
  3. *
  4. * Distributed under the Boost Software License, Version 1.0.
  5. * See http://www.boost.org/LICENSE_1_0.txt
  6. */
  7. #ifndef BOOST_WINAPI_SHOW_WINDOW_HPP_INCLUDED_
  8. #define BOOST_WINAPI_SHOW_WINDOW_HPP_INCLUDED_
  9. #include <boost/winapi/basic_types.hpp>
  10. #ifdef BOOST_HAS_PRAGMA_ONCE
  11. #pragma once
  12. #endif
  13. #if BOOST_WINAPI_PARTITION_DESKTOP
  14. #include <boost/winapi/detail/header.hpp>
  15. #if !defined( BOOST_USE_WINDOWS_H )
  16. extern "C" {
  17. BOOST_WINAPI_DETAIL_DECLARE_HANDLE(HWND);
  18. BOOST_WINAPI_IMPORT_EXCEPT_WM boost::winapi::BOOL_ BOOST_WINAPI_WINAPI_CC ShowWindow(
  19. HWND hWnd,
  20. int nCmdShow);
  21. BOOST_WINAPI_IMPORT boost::winapi::BOOL_ BOOST_WINAPI_WINAPI_CC ShowWindowAsync(
  22. HWND hWnd,
  23. int nCmdShow);
  24. } // extern "C"
  25. #endif // BOOST_USE_WINDOWS_H
  26. namespace boost {
  27. namespace winapi {
  28. typedef ::HWND HWND_;
  29. using ::ShowWindow;
  30. using ::ShowWindowAsync;
  31. #if defined( BOOST_USE_WINDOWS_H ) && !defined( NOSHOWWINDOW )
  32. BOOST_CONSTEXPR_OR_CONST DWORD_ SW_HIDE_ = SW_HIDE;
  33. BOOST_CONSTEXPR_OR_CONST DWORD_ SW_SHOWNORMAL_ = SW_SHOWNORMAL;
  34. BOOST_CONSTEXPR_OR_CONST DWORD_ SW_NORMAL_ = SW_NORMAL;
  35. BOOST_CONSTEXPR_OR_CONST DWORD_ SW_SHOWMINIMIZED_ = SW_SHOWMINIMIZED;
  36. BOOST_CONSTEXPR_OR_CONST DWORD_ SW_SHOWMAXIMIZED_ = SW_SHOWMAXIMIZED;
  37. BOOST_CONSTEXPR_OR_CONST DWORD_ SW_MAXIMIZE_ = SW_MAXIMIZE;
  38. BOOST_CONSTEXPR_OR_CONST DWORD_ SW_SHOWNOACTIVATE_ = SW_SHOWNOACTIVATE;
  39. BOOST_CONSTEXPR_OR_CONST DWORD_ SW_SHOW_ = SW_SHOW;
  40. BOOST_CONSTEXPR_OR_CONST DWORD_ SW_MINIMIZE_ = SW_MINIMIZE;
  41. BOOST_CONSTEXPR_OR_CONST DWORD_ SW_SHOWMINNOACTIVE_ = SW_SHOWMINNOACTIVE;
  42. BOOST_CONSTEXPR_OR_CONST DWORD_ SW_SHOWNA_ = SW_SHOWNA;
  43. BOOST_CONSTEXPR_OR_CONST DWORD_ SW_RESTORE_ = SW_RESTORE;
  44. BOOST_CONSTEXPR_OR_CONST DWORD_ SW_SHOWDEFAULT_ = SW_SHOWDEFAULT;
  45. BOOST_CONSTEXPR_OR_CONST DWORD_ SW_FORCEMINIMIZE_ = SW_FORCEMINIMIZE;
  46. BOOST_CONSTEXPR_OR_CONST DWORD_ SW_MAX_ = SW_MAX;
  47. BOOST_CONSTEXPR_OR_CONST DWORD_ HIDE_WINDOW_ = HIDE_WINDOW;
  48. BOOST_CONSTEXPR_OR_CONST DWORD_ SHOW_OPENWINDOW_ = SHOW_OPENWINDOW;
  49. BOOST_CONSTEXPR_OR_CONST DWORD_ SHOW_ICONWINDOW_ = SHOW_ICONWINDOW;
  50. BOOST_CONSTEXPR_OR_CONST DWORD_ SHOW_FULLSCREEN_ = SHOW_FULLSCREEN;
  51. BOOST_CONSTEXPR_OR_CONST DWORD_ SHOW_OPENNOACTIVATE_ = SHOW_OPENNOACTIVATE;
  52. BOOST_CONSTEXPR_OR_CONST DWORD_ SW_PARENTCLOSING_ = SW_PARENTCLOSING;
  53. BOOST_CONSTEXPR_OR_CONST DWORD_ SW_OTHERZOOM_ = SW_OTHERZOOM;
  54. BOOST_CONSTEXPR_OR_CONST DWORD_ SW_PARENTOPENING_ = SW_PARENTOPENING;
  55. BOOST_CONSTEXPR_OR_CONST DWORD_ SW_OTHERUNZOOM_ = SW_OTHERUNZOOM;
  56. #else
  57. BOOST_CONSTEXPR_OR_CONST DWORD_ SW_HIDE_ = 0;
  58. BOOST_CONSTEXPR_OR_CONST DWORD_ SW_SHOWNORMAL_ = 1;
  59. BOOST_CONSTEXPR_OR_CONST DWORD_ SW_NORMAL_ = 1;
  60. BOOST_CONSTEXPR_OR_CONST DWORD_ SW_SHOWMINIMIZED_ = 2;
  61. BOOST_CONSTEXPR_OR_CONST DWORD_ SW_SHOWMAXIMIZED_ = 3;
  62. BOOST_CONSTEXPR_OR_CONST DWORD_ SW_MAXIMIZE_ = 3;
  63. BOOST_CONSTEXPR_OR_CONST DWORD_ SW_SHOWNOACTIVATE_ = 4;
  64. BOOST_CONSTEXPR_OR_CONST DWORD_ SW_SHOW_ = 5;
  65. BOOST_CONSTEXPR_OR_CONST DWORD_ SW_MINIMIZE_ = 6;
  66. BOOST_CONSTEXPR_OR_CONST DWORD_ SW_SHOWMINNOACTIVE_ = 7;
  67. BOOST_CONSTEXPR_OR_CONST DWORD_ SW_SHOWNA_ = 8;
  68. BOOST_CONSTEXPR_OR_CONST DWORD_ SW_RESTORE_ = 9;
  69. BOOST_CONSTEXPR_OR_CONST DWORD_ SW_SHOWDEFAULT_ = 10;
  70. BOOST_CONSTEXPR_OR_CONST DWORD_ SW_FORCEMINIMIZE_ = 11;
  71. BOOST_CONSTEXPR_OR_CONST DWORD_ SW_MAX_ = 11;
  72. BOOST_CONSTEXPR_OR_CONST DWORD_ HIDE_WINDOW_ = 0;
  73. BOOST_CONSTEXPR_OR_CONST DWORD_ SHOW_OPENWINDOW_ = 1;
  74. BOOST_CONSTEXPR_OR_CONST DWORD_ SHOW_ICONWINDOW_ = 2;
  75. BOOST_CONSTEXPR_OR_CONST DWORD_ SHOW_FULLSCREEN_ = 3;
  76. BOOST_CONSTEXPR_OR_CONST DWORD_ SHOW_OPENNOACTIVATE_ = 4;
  77. BOOST_CONSTEXPR_OR_CONST DWORD_ SW_PARENTCLOSING_ = 1;
  78. BOOST_CONSTEXPR_OR_CONST DWORD_ SW_OTHERZOOM_ = 2;
  79. BOOST_CONSTEXPR_OR_CONST DWORD_ SW_PARENTOPENING_ = 3;
  80. BOOST_CONSTEXPR_OR_CONST DWORD_ SW_OTHERUNZOOM_ = 4;
  81. #endif
  82. }
  83. }
  84. #include <boost/winapi/detail/footer.hpp>
  85. #endif // BOOST_WINAPI_PARTITION_DESKTOP
  86. #endif // BOOST_WINAPI_SHOW_WINDOW_HPP_INCLUDED_