Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
wine-mirror
GitHub Repository: wine-mirror/wine
Path: blob/master/dlls/comctl32/comctl32.h
4389 views
1
/******************************************************************************
2
*
3
* Common definitions (resource ids and global variables)
4
*
5
* Copyright 1999 Thuy Nguyen
6
* Copyright 1999 Eric Kohl
7
* Copyright 2002 Dimitrie O. Paun
8
*
9
* This library is free software; you can redistribute it and/or
10
* modify it under the terms of the GNU Lesser General Public
11
* License as published by the Free Software Foundation; either
12
* version 2.1 of the License, or (at your option) any later version.
13
*
14
* This library is distributed in the hope that it will be useful,
15
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17
* Lesser General Public License for more details.
18
*
19
* You should have received a copy of the GNU Lesser General Public
20
* License along with this library; if not, write to the Free Software
21
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
22
*/
23
24
#ifndef __WINE_COMCTL32_H
25
#define __WINE_COMCTL32_H
26
27
#ifndef RC_INVOKED
28
#include <stdarg.h>
29
#endif
30
31
#include "windef.h"
32
#include "winbase.h"
33
#include "wingdi.h"
34
#include "winuser.h"
35
#include "winnls.h"
36
#include "commctrl.h"
37
38
extern HMODULE COMCTL32_hModule;
39
extern HBRUSH COMCTL32_hPattern55AABrush;
40
41
/* Property sheet / Wizard */
42
#define IDD_PROPSHEET 1006
43
#define IDD_WIZARD 1020
44
45
#define IDC_TABCONTROL 12320
46
#define IDC_APPLY_BUTTON 12321
47
#define IDC_BACK_BUTTON 12323
48
#define IDC_NEXT_BUTTON 12324
49
#define IDC_FINISH_BUTTON 12325
50
#define IDC_SUNKEN_LINE 12326
51
#define IDC_SUNKEN_LINEHEADER 12327
52
53
#define IDS_CLOSE 4160
54
55
/* Toolbar customization dialog */
56
#define IDD_TBCUSTOMIZE 200
57
58
#define IDC_AVAILBTN_LBOX 201
59
#define IDC_RESET_BTN 202
60
#define IDC_TOOLBARBTN_LBOX 203
61
#define IDC_REMOVE_BTN 204
62
#define IDC_HELP_BTN 205
63
#define IDC_MOVEUP_BTN 206
64
#define IDC_MOVEDN_BTN 207
65
66
#define IDS_SEPARATOR 1024
67
68
/* Toolbar imagelist bitmaps */
69
#define IDB_STD_SMALL 120
70
#define IDB_STD_LARGE 121
71
#define IDB_VIEW_SMALL 124
72
#define IDB_VIEW_LARGE 125
73
#define IDB_HIST_SMALL 130
74
#define IDB_HIST_LARGE 131
75
76
#define IDM_TODAY 4163
77
#define IDM_GOTODAY 4164
78
79
/* Treeview Checkboxes */
80
81
#define IDT_CHECK 401
82
83
/* Command Link arrow */
84
#define IDB_CMDLINK 402
85
86
87
/* Cursors */
88
#define IDC_MOVEBUTTON 102
89
#define IDC_COPY 104
90
#define IDC_DIVIDER 106
91
#define IDC_DIVIDEROPEN 107
92
93
94
/* DragList resources */
95
#define IDI_DRAGARROW 501
96
97
/* HOTKEY internal strings */
98
#define HKY_NONE 2048
99
100
/* Tooltip icons */
101
#define IDI_TT_INFO_SM 22
102
#define IDI_TT_WARN_SM 25
103
#define IDI_TT_ERROR_SM 28
104
#define IDI_TT_INFO_MD 20
105
#define IDI_TT_WARN_MD 23
106
#define IDI_TT_ERROR_MD 26
107
108
/* Taskdialog strings */
109
#define IDS_BUTTON_YES 3000
110
#define IDS_BUTTON_NO 3001
111
#define IDS_BUTTON_RETRY 3002
112
#define IDS_BUTTON_OK 3003
113
#define IDS_BUTTON_CANCEL 3004
114
#define IDS_BUTTON_CLOSE 3005
115
116
/* Task dialog expando control default text */
117
#define IDS_TD_EXPANDED 3020
118
#define IDS_TD_COLLAPSED 3021
119
120
#define WM_SYSTIMER 0x0118
121
122
enum combobox_state_flags
123
{
124
CBF_DROPPED = 0x0001,
125
CBF_BUTTONDOWN = 0x0002,
126
CBF_NOROLLUP = 0x0004,
127
CBF_MEASUREITEM = 0x0008,
128
CBF_FOCUSED = 0x0010,
129
CBF_CAPTURE = 0x0020,
130
CBF_EDIT = 0x0040,
131
CBF_NORESIZE = 0x0080,
132
CBF_NOTIFY = 0x0100,
133
CBF_NOREDRAW = 0x0200,
134
CBF_SELCHANGE = 0x0400,
135
CBF_HOT = 0x0800,
136
CBF_NOEDITNOTIFY = 0x1000,
137
CBF_NOLBSELECT = 0x2000, /* do not change current selection */
138
CBF_BEENFOCUSED = 0x4000, /* has it ever had focus */
139
CBF_EUI = 0x8000,
140
};
141
142
typedef struct
143
{
144
HWND self;
145
HWND owner;
146
UINT dwStyle;
147
HWND hWndEdit;
148
HWND hWndLBox;
149
UINT wState;
150
HFONT hFont;
151
RECT textRect;
152
RECT buttonRect;
153
RECT droppedRect;
154
INT droppedIndex;
155
INT fixedOwnerDrawHeight;
156
INT droppedWidth; /* not used unless set explicitly */
157
INT item_height;
158
INT visibleItems;
159
} HEADCOMBO, *LPHEADCOMBO;
160
161
extern BOOL COMBO_FlipListbox(HEADCOMBO *lphc, BOOL ok, BOOL bRedrawButton);
162
163
typedef struct
164
{
165
COLORREF clrBtnHighlight; /* COLOR_BTNHIGHLIGHT */
166
COLORREF clrBtnShadow; /* COLOR_BTNSHADOW */
167
COLORREF clrBtnText; /* COLOR_BTNTEXT */
168
COLORREF clrBtnFace; /* COLOR_BTNFACE */
169
COLORREF clrHighlight; /* COLOR_HIGHLIGHT */
170
COLORREF clrHighlightText; /* COLOR_HIGHLIGHTTEXT */
171
COLORREF clrHotTrackingColor; /* COLOR_HOTLIGHT */
172
COLORREF clr3dHilight; /* COLOR_3DHILIGHT */
173
COLORREF clr3dShadow; /* COLOR_3DSHADOW */
174
COLORREF clr3dDkShadow; /* COLOR_3DDKSHADOW */
175
COLORREF clr3dFace; /* COLOR_3DFACE */
176
COLORREF clrWindow; /* COLOR_WINDOW */
177
COLORREF clrWindowText; /* COLOR_WINDOWTEXT */
178
COLORREF clrGrayText; /* COLOR_GREYTEXT */
179
COLORREF clrActiveCaption; /* COLOR_ACTIVECAPTION */
180
COLORREF clrInfoBk; /* COLOR_INFOBK */
181
COLORREF clrInfoText; /* COLOR_INFOTEXT */
182
} COMCTL32_SysColor;
183
184
extern COMCTL32_SysColor comctl32_color;
185
186
/* Internal function */
187
HWND COMCTL32_CreateToolTip(HWND);
188
void COMCTL32_DrawStatusText(HDC hdc, LPCRECT lprc, LPCWSTR text, UINT style, BOOL draw_background);
189
VOID COMCTL32_RefreshSysColors(void);
190
void COMCTL32_DrawInsertMark(HDC hDC, const RECT *lpRect, COLORREF clrInsertMark, BOOL bHorizontal);
191
void COMCTL32_EnsureBitmapSize(HBITMAP *pBitmap, int cxMinWidth, int cyMinHeight, COLORREF crBackground);
192
void COMCTL32_GetFontMetrics(HFONT hFont, TEXTMETRICW *ptm);
193
BOOL COMCTL32_IsReflectedMessage(UINT uMsg);
194
INT Str_GetPtrWtoA(LPCWSTR lpSrc, LPSTR lpDest, INT nMaxLen);
195
INT Str_GetPtrAtoW(LPCSTR lpSrc, LPWSTR lpDest, INT nMaxLen);
196
BOOL Str_SetPtrAtoW(LPWSTR *lppDest, LPCSTR lpSrc);
197
BOOL Str_SetPtrWtoA(LPSTR *lppDest, LPCWSTR lpSrc);
198
BOOL imagelist_has_alpha(HIMAGELIST, UINT);
199
200
/* Our internal stack structure of the window procedures to subclass */
201
typedef struct _SUBCLASSPROCS {
202
SUBCLASSPROC subproc;
203
UINT_PTR id;
204
DWORD_PTR ref;
205
struct _SUBCLASSPROCS *next;
206
} SUBCLASSPROCS, *LPSUBCLASSPROCS;
207
208
typedef struct
209
{
210
SUBCLASSPROCS *SubclassProcs;
211
SUBCLASSPROCS *stackpos;
212
WNDPROC origproc;
213
int is_unicode;
214
int running;
215
} SUBCLASS_INFO, *LPSUBCLASS_INFO;
216
217
/* WM_NOTIFY unicode to ansi conversion and forwarding stuff */
218
219
LRESULT COMCTL32_forward_notify_to_ansi_window(HWND hwnd_notify, NMHDR *hdr, WCHAR **unicode_buffer, DWORD *unicode_buffer_size);
220
221
/* undocumented functions */
222
223
BOOL WINAPI Free (LPVOID);
224
void * WINAPI Alloc (DWORD) __WINE_ALLOC_SIZE(1) __WINE_DEALLOC(Free) __WINE_MALLOC;
225
void * WINAPI ReAlloc (void *, DWORD) __WINE_ALLOC_SIZE(2) __WINE_DEALLOC(Free);
226
DWORD WINAPI GetSize (LPVOID);
227
228
INT WINAPI Str_GetPtrA (LPCSTR, LPSTR, INT);
229
INT WINAPI Str_GetPtrW (LPCWSTR, LPWSTR, INT);
230
231
LRESULT WINAPI SetPathWordBreakProc(HWND hwnd, BOOL bSet);
232
BOOL WINAPI MirrorIcon(HICON *phicon1, HICON *phicon2);
233
234
HRGN set_control_clipping(HDC hdc, const RECT *rect);
235
236
extern void ANIMATE_Register(void);
237
extern void ANIMATE_Unregister(void);
238
extern void BUTTON_Register(void);
239
extern void COMBO_Register(void);
240
extern void COMBOEX_Register(void);
241
extern void COMBOEX_Unregister(void);
242
extern void COMBOLBOX_Register(void);
243
extern void DATETIME_Register(void);
244
extern void DATETIME_Unregister(void);
245
extern void EDIT_Register(void);
246
extern void FLATSB_Register(void);
247
extern void FLATSB_Unregister(void);
248
extern void HEADER_Register(void);
249
extern void HEADER_Unregister(void);
250
extern void HOTKEY_Register(void);
251
extern void HOTKEY_Unregister(void);
252
extern void IPADDRESS_Register(void);
253
extern void IPADDRESS_Unregister(void);
254
extern void LISTBOX_Register(void);
255
extern void LISTVIEW_Register(void);
256
extern void LISTVIEW_Unregister(void);
257
extern void MONTHCAL_Register(void);
258
extern void MONTHCAL_Unregister(void);
259
extern void NATIVEFONT_Register(void);
260
extern void NATIVEFONT_Unregister(void);
261
extern void PAGER_Register(void);
262
extern void PAGER_Unregister(void);
263
extern void PROGRESS_Register(void);
264
extern void PROGRESS_Unregister(void);
265
extern void REBAR_Register(void);
266
extern void REBAR_Unregister(void);
267
extern void STATIC_Register(void);
268
extern void STATUS_Register(void);
269
extern void STATUS_Unregister(void);
270
extern void SYSLINK_Register(void);
271
extern void SYSLINK_Unregister(void);
272
extern void TAB_Register(void);
273
extern void TAB_Unregister(void);
274
extern void TOOLBAR_Register(void);
275
extern void TOOLBAR_Unregister(void);
276
extern void TOOLTIPS_Register(void);
277
extern void TOOLTIPS_Unregister(void);
278
extern void TRACKBAR_Register(void);
279
extern void TRACKBAR_Unregister(void);
280
extern void TREEVIEW_Register(void);
281
extern void TREEVIEW_Unregister(void);
282
extern void UPDOWN_Register(void);
283
extern void UPDOWN_Unregister(void);
284
285
286
int MONTHCAL_MonthLength(int month, int year);
287
int MONTHCAL_CalculateDayOfWeek(SYSTEMTIME *date, BOOL inplace);
288
LONG MONTHCAL_CompareSystemTime(const SYSTEMTIME *first, const SYSTEMTIME *second);
289
290
#endif /* __WINE_COMCTL32_H */
291
292