File indexing completed on 2025-01-18 09:50:11
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef BOOST_PROCESS_V2_WINDOWS_SHOW_WINDOW_HPP
0012 #define BOOST_PROCESS_V2_WINDOWS_SHOW_WINDOW_HPP
0013
0014 #include <boost/process/v2/windows/default_launcher.hpp>
0015
0016 BOOST_PROCESS_V2_BEGIN_NAMESPACE
0017 namespace windows
0018 {
0019
0020
0021 template<DWORD Flags>
0022 struct process_show_window
0023 {
0024 constexpr process_show_window() {}
0025
0026 error_code on_setup(windows::default_launcher & launcher,
0027 const filesystem::path &,
0028 const std::wstring &) const
0029 {
0030 launcher.startup_info.StartupInfo.dwFlags |= STARTF_USESHOWWINDOW;
0031 launcher.startup_info.StartupInfo.wShowWindow |= Flags;
0032
0033 return error_code {};
0034 };
0035 };
0036
0037
0038 constexpr static process_show_window<SW_HIDE > show_window_hide;
0039
0040 constexpr static process_show_window<SW_SHOWMAXIMIZED > show_window_maximized;
0041
0042 constexpr static process_show_window<SW_SHOWMINIMIZED > show_window_minimized;
0043
0044 constexpr static process_show_window<SW_SHOWMINNOACTIVE> show_window_minimized_not_active;
0045
0046 constexpr static process_show_window<SW_SHOWNOACTIVATE > show_window_not_active;
0047
0048 constexpr static process_show_window<SW_SHOWNORMAL > show_window_normal;
0049
0050 }
0051 BOOST_PROCESS_V2_END_NAMESPACE
0052
0053 #endif