-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathStyleNames.pas
135 lines (122 loc) · 2.84 KB
/
StyleNames.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
unit StyleNames;
{$MODE Delphi}
interface
uses Classes;
function GetWindowStyleNames(style: Integer): TStringList;
function GetExtendedWindowStyleNames(style: Integer): TStringList;
implementation
uses Windows;
const
WindowStyle: array [0..21] of DWORD = (
WS_BORDER,
WS_CAPTION,
WS_CHILD,
WS_CLIPCHILDREN,
WS_CLIPSIBLINGS,
WS_DISABLED,
WS_DLGFRAME,
WS_GROUP,
WS_HSCROLL,
WS_MAXIMIZE,
WS_MAXIMIZEBOX,
WS_MINIMIZE,
WS_MINIMIZEBOX,
WS_OVERLAPPED,
WS_OVERLAPPEDWINDOW,
WS_POPUP,
WS_POPUPWINDOW,
WS_SYSMENU,
WS_TABSTOP,
WS_THICKFRAME,
WS_VISIBLE,
WS_VSCROLL);
WindowStyleName: array [0..21] of String = (
'Border',
'Caption',
'Child',
'Clip children',
'Clip siblings',
'Disabled',
'Dialog frame',
'Group',
'Horizontal scroll bar',
'Maximized',
'Maximize button',
'Minimized',
'Minimize button',
'Overlapped',
'Overlapped window',
'Pop-up',
'Pop-up window',
'System menu',
'Tab stop',
'Sizing frame',
'Visible',
'Vertical scroll bar');
ExtendedWindowStyle: array [0..20] of Integer = (
WS_EX_ACCEPTFILES,
WS_EX_APPWINDOW,
WS_EX_CLIENTEDGE,
WS_EX_CONTEXTHELP,
WS_EX_CONTROLPARENT,
WS_EX_DLGMODALFRAME,
WS_EX_LEFT,
WS_EX_LEFTSCROLLBAR,
WS_EX_LTRREADING,
WS_EX_MDICHILD,
WS_EX_NOPARENTNOTIFY,
WS_EX_OVERLAPPEDWINDOW,
WS_EX_PALETTEWINDOW,
WS_EX_RIGHT,
WS_EX_RIGHTSCROLLBAR,
WS_EX_RTLREADING,
WS_EX_STATICEDGE,
WS_EX_TOOLWINDOW,
WS_EX_TOPMOST,
WS_EX_TRANSPARENT,
WS_EX_WINDOWEDGE);
ExtendedWindowStyleName: array [0..20] of String = (
'Drag drop recepient',
'Minimize on taskbar',
'Sunken edge border',
'Context help',
'TAB key navigation',
'Double border',
'Left aligned (default)',
'Left vertical scrollbar',
'Left to Right Text (default)',
'MDI Child',
'No parent notify',
'Client & Window edge',
'Window & ToolWindow & TopMost edge',
'Right aligned',
'Right vertical scrollbar (default)',
'Right to Left text',
'Static edge',
'Tool window',
'Topmost',
'Transparent',
'Raised edge');
function GetWindowStyleNames(style: Integer): TStringList;
var
list: TStringList;
i: Integer;
begin
list := TStringList.Create();
for i := Low(WindowStyle) to High(WindowStyle) do
if ((style and WindowStyle[i]) = WindowStyle[i]) then
list.Add(WindowStyleName[i]);
Result := list;
end;
function GetExtendedWindowStyleNames(style: Integer): TStringList;
var
list: TStringList;
i: Integer;
begin
list := TStringList.Create();
for i := Low(ExtendedWindowStyle) to High(ExtendedWindowStyle) do
if ((style and ExtendedWindowStyle[i]) = ExtendedWindowStyle[i]) then
list.Add(ExtendedWindowStyleName[i]);
Result := list;
end;
end.