mirror of
https://github.com/boostorg/process.git
synced 2026-01-20 04:42:24 +00:00
32 lines
1.5 KiB
Plaintext
32 lines
1.5 KiB
Plaintext
== `windows/show_window.hpp`
|
|
|
|
Creation flags allows explicitly setting `wShowWindow` options
|
|
|
|
[source,cpp]
|
|
----
|
|
/// A templated initializer to set wShowWindow flags.
|
|
template<DWORD Flags>
|
|
struct process_show_window;
|
|
|
|
//Hides the window and activates another window.
|
|
constexpr static process_show_window<SW_HIDE > show_window_hide;
|
|
//Activates the window and displays it as a maximized window.
|
|
constexpr static process_show_window<SW_SHOWMAXIMIZED > show_window_maximized;
|
|
//Activates the window and displays it as a minimized window.
|
|
constexpr static process_show_window<SW_SHOWMINIMIZED > show_window_minimized;
|
|
//Displays the window as a minimized window. This value is similar to `minimized`, except the window is not activated.
|
|
constexpr static process_show_window<SW_SHOWMINNOACTIVE> show_window_minimized_not_active;
|
|
//Displays a window in its most recent size and position. This value is similar to show_normal`, except that the window is not activated.
|
|
constexpr static process_show_window<SW_SHOWNOACTIVATE > show_window_not_active;
|
|
//Activates and displays a window. If the window is minimized or maximized, the system restores it to its original size and position. An application should specify this flag when displaying the window for the first time.
|
|
constexpr static process_show_window<SW_SHOWNORMAL > show_window_normal;
|
|
|
|
----
|
|
|
|
|
|
The flags can be used like this:
|
|
|
|
[source,cpp]
|
|
----
|
|
process p{"C:\\not-a-virus.exe", {}, process::windows::show_window_minimized};
|
|
---- |