xtd 0.2.0
Loading...
Searching...
No Matches
extended_window_styles.h
Go to the documentation of this file.
1
4#pragma once
6#if !defined(__XTD_FORMS_NATIVE_LIBRARY__)
7#error "Do not include this file: Internal use only"
8#endif
10
11#include <cstddef>
12#include <xtd/string.h>
13
14// https://docs.microsoft.com/en-us/cpp/mfc/reference/styles-used-by-mfc
15
16#if !defined(WS_EX_DLGMODALFRAME)
23constexpr size_t WS_EX_DLGMODALFRAME = 0x00000001;
30constexpr size_t WS_EX_NOPARENTNOTIFY = 0x00000004;
37constexpr size_t WS_EX_TOPMOST = 0x00000008;
44constexpr size_t WS_EX_ACCEPTFILES = 0x00000010;
51constexpr size_t WS_EX_TRANSPARENT = 0x00000020;
58constexpr size_t WS_EX_MDICHILD = 0x00000040;
65constexpr size_t WS_EX_TOOLWINDOW = 0x00000080;
72constexpr size_t WS_EX_WINDOWEDGE = 0x00000100;
79constexpr size_t WS_EX_CLIENTEDGE = 0x00000200;
86constexpr size_t WS_EX_CONTEXTHELP = 0x00000400;
93constexpr size_t WS_EX_RIGHT = 0x00001000;
100constexpr size_t WS_EX_LEFT = 0x00000000;
107constexpr size_t WS_EX_RTLREADING = 0x00002000;
114constexpr size_t WS_EX_LTRREADING = 0x00000000;
121constexpr size_t WS_EX_LEFTSCROLLBAR = 0x00004000;
128constexpr size_t WS_EX_RIGHTSCROLLBAR = 0x00000000;
129
136constexpr size_t WS_EX_CONTROLPARENT = 0x00010000;
143constexpr size_t WS_EX_STATICEDGE = 0x00020000;
150constexpr size_t WS_EX_APPWINDOW = 0x00040000;
151
152
167
174constexpr size_t WS_EX_LAYERED = 0x00080000;
175
182constexpr size_t WS_EX_NOINHERITLAYOUT = 0x00100000; // Disable inheritance of mirroring by children
183
190constexpr size_t WS_EX_NOREDIRECTIONBITMAP = 0x00200000;
191
198constexpr size_t WS_EX_LAYOUTRTL = 0x00400000; // Right to left mirroring
199
206constexpr size_t WS_EX_COMPOSITED = 0x02000000;
213constexpr size_t WS_EX_NOACTIVATE = 0x08000000;
214#endif
221constexpr size_t WS_EX_AUTOSCROLL = 0x40000000;
229constexpr size_t WS_EX_MODALWINDOW = 0x80000000;
230
231inline static xtd::string __windows_extended_style_to_string__(size_t style) {
232 xtd::string result = "";
233
234 if ((style & WS_EX_DLGMODALFRAME) == WS_EX_DLGMODALFRAME) result += " | WS_EX_DLGMODALFRAME";
235 if ((style & WS_EX_NOPARENTNOTIFY) == WS_EX_NOPARENTNOTIFY) result += " | WS_EX_NOPARENTNOTIFY";
236 if ((style & WS_EX_TOPMOST) == WS_EX_TOPMOST) result += " | WS_EX_TOPMOST";
237 if ((style & WS_EX_ACCEPTFILES) == WS_EX_ACCEPTFILES) result += " | WS_EX_ACCEPTFILES";
238 if ((style & WS_EX_TRANSPARENT) == WS_EX_TRANSPARENT) result += " | WS_EX_TRANSPARENT";
239 if ((style & WS_EX_MDICHILD) == WS_EX_MDICHILD) result += " | WS_EX_MDICHILD";
240 if ((style & WS_EX_TOOLWINDOW) == WS_EX_TOOLWINDOW) result += " | WS_EX_TOOLWINDOW";
241 if ((style & WS_EX_WINDOWEDGE) == WS_EX_WINDOWEDGE) result += " | WS_EX_WINDOWEDGE";
242 if ((style & WS_EX_CLIENTEDGE) == WS_EX_CLIENTEDGE) result += " | WS_EX_CLIENTEDGE";
243 if ((style & WS_EX_CONTEXTHELP) == WS_EX_CONTEXTHELP) result += " | WS_EX_CONTEXTHELP";
244 if ((style & WS_EX_RIGHT) == WS_EX_RIGHT) result += " | WS_EX_RIGHT";
245 if ((style & WS_EX_LEFT) == WS_EX_LEFT) result += " | WS_EX_LEFT";
246 if ((style & WS_EX_RTLREADING) == WS_EX_RTLREADING) result += " | WS_EX_RTLREADING";
247 if ((style & WS_EX_LTRREADING) == WS_EX_LTRREADING) result += " | WS_EX_LTRREADING";
248 if ((style & WS_EX_LEFTSCROLLBAR) == WS_EX_LEFTSCROLLBAR) result += " | WS_EX_LEFTSCROLLBAR";
249 if ((style & WS_EX_RIGHTSCROLLBAR) == WS_EX_RIGHTSCROLLBAR) result += " | WS_EX_RIGHTSCROLLBAR";
250 if ((style & WS_EX_CONTROLPARENT) == WS_EX_CONTROLPARENT) result += " | WS_EX_CONTROLPARENT";
251 if ((style & WS_EX_STATICEDGE) == WS_EX_STATICEDGE) result += " | WS_EX_STATICEDGE";
252 if ((style & WS_EX_APPWINDOW) == WS_EX_APPWINDOW) result += " | WS_EX_APPWINDOW";
253 if ((style & WS_EX_LAYERED) == WS_EX_LAYERED) result += " | WS_EX_LAYERED";
254 if ((style & WS_EX_NOINHERITLAYOUT) == WS_EX_NOINHERITLAYOUT) result += " | WS_EX_NOINHERITLAYOUT";
255 if ((style & WS_EX_NOREDIRECTIONBITMAP) == WS_EX_NOREDIRECTIONBITMAP) result += " | WS_EX_NOREDIRECTIONBITMAP";
256 if ((style & WS_EX_LAYOUTRTL) == WS_EX_LAYOUTRTL) result += " | WS_EX_LAYOUTRTL";
257 if ((style & WS_EX_COMPOSITED) == WS_EX_COMPOSITED) result += " | WS_EX_COMPOSITED";
258 if ((style & WS_EX_NOACTIVATE) == WS_EX_NOACTIVATE) result += " | WS_EX_NOACTIVATE";
259 if ((style & WS_EX_AUTOSCROLL) == WS_EX_AUTOSCROLL) result += " | WS_EX_AUTOSCROLL";
260 if ((style & WS_EX_MODALWINDOW) == WS_EX_MODALWINDOW) result += " | WS_EX_MODALWINDOW";
261 return result.substring(3);
262}
Represents text as a sequence of character units.
Definition basic_string.h:79
basic_string substring(xtd::size start_index) const
Retrieves a substring from this instance. The substring starts at a specified character position and ...
Definition basic_string.h:1872
constexpr size_t WS_EX_RIGHT
Gives a window generic right-aligned properties. This depends on the window class.
Definition extended_window_styles.h:93
constexpr size_t WS_EX_RTLREADING
Displays the window text using right-to-left reading order properties.
Definition extended_window_styles.h:107
constexpr size_t WS_EX_RIGHTSCROLLBAR
Places a vertical scroll bar (if present) to the right of the client area. This is the default.
Definition extended_window_styles.h:128
constexpr size_t WS_EX_DLGMODALFRAME
Designates a window with a double border that may (optionally) be created with a title bar when you s...
Definition extended_window_styles.h:23
constexpr size_t WS_EX_MODALWINDOW
Create a modal window.
Definition extended_window_styles.h:229
constexpr size_t WS_EX_LEFT
Gives window generic left-aligned properties. This is the default.
Definition extended_window_styles.h:100
constexpr size_t WS_EX_NOREDIRECTIONBITMAP
The window does not render to a redirection surface. This is for windows that do not have visible con...
Definition extended_window_styles.h:190
constexpr size_t WS_EX_PALETTEWINDOW
Combines the WS_EX_WINDOWEDGE and WS_EX_TOPMOST styles.
Definition extended_window_styles.h:166
constexpr size_t WS_EX_APPWINDOW
Forces a top-level window onto the taskbar when the window is visible.
Definition extended_window_styles.h:150
constexpr size_t WS_EX_ACCEPTFILES
Specifies that a window created with this style accepts drag-and-drop files.
Definition extended_window_styles.h:44
constexpr size_t WS_EX_OVERLAPPEDWINDOW
Combines the WS_EX_CLIENTEDGE and WS_EX_WINDOWEDGE styles.
Definition extended_window_styles.h:159
constexpr size_t WS_EX_LAYERED
The window is a layered window. This style cannot be used if the window has a class style of either C...
Definition extended_window_styles.h:174
constexpr size_t WS_EX_NOINHERITLAYOUT
Specifies that a child window created with this style will not send the WM_PARENTNOTIFY message to it...
Definition extended_window_styles.h:182
constexpr size_t WS_EX_STATICEDGE
Creates a window with a three-dimensional border style intended to be used for items that do not acce...
Definition extended_window_styles.h:143
constexpr size_t WS_EX_TRANSPARENT
Specifies that a window created with this style is to be transparent. That is, any windows that are b...
Definition extended_window_styles.h:51
constexpr size_t WS_EX_MDICHILD
Creates an MDI child window.
Definition extended_window_styles.h:58
constexpr size_t WS_EX_TOPMOST
Specifies that a window created with this style should be placed above all non topmost windows and st...
Definition extended_window_styles.h:37
constexpr size_t WS_EX_CONTEXTHELP
Includes a question mark in the title bar of the window. When the user clicks the question mark,...
Definition extended_window_styles.h:86
constexpr size_t WS_EX_NOPARENTNOTIFY
Specifies that a child window created with this style will not send the WM_PARENTNOTIFY message to it...
Definition extended_window_styles.h:30
constexpr size_t WS_EX_COMPOSITED
Paints all descendants of a window in bottom-to-top painting order using double-buffering....
Definition extended_window_styles.h:206
constexpr size_t WS_EX_CONTROLPARENT
Allows the user to navigate among the child windows of the window by using the TAB key.
Definition extended_window_styles.h:136
constexpr size_t WS_EX_LAYOUTRTL
If the shell language is Hebrew, Arabic, or another language that supports reading order alignment,...
Definition extended_window_styles.h:198
constexpr size_t WS_EX_CLIENTEDGE
Specifies that a window has a 3D look — that is, a border with a sunken edge.
Definition extended_window_styles.h:79
constexpr size_t WS_EX_AUTOSCROLL
Activate automatic scroll based on virtual size.
Definition extended_window_styles.h:221
constexpr size_t WS_EX_NOACTIVATE
A top-level window created with this style does not become the foreground window when the user clicks...
Definition extended_window_styles.h:213
constexpr size_t WS_EX_WINDOWEDGE
Specifies that a window has a border with a raised edge.
Definition extended_window_styles.h:72
constexpr size_t WS_EX_LEFTSCROLLBAR
Places a vertical scroll bar to the left of the client area.
Definition extended_window_styles.h:121
constexpr size_t WS_EX_TOOLWINDOW
Creates a tool window, which is a window intended to be used as a floating toolbar....
Definition extended_window_styles.h:65
constexpr size_t WS_EX_LTRREADING
Displays the window text using left-to-right reading order properties. This is the default.
Definition extended_window_styles.h:114
Contains xtd::string alias.