source: trunk/src/comctl32/comctl32.h@ 10367

Last change on this file since 10367 was 10097, checked in by sandervl, 22 years ago

Wine resync

File size: 11.1 KB
Line 
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 */
23
24#ifndef __WINE_COMCTL32_H
25#define __WINE_COMCTL32_H
26
27#include "commctrl.h"
28
29extern HMODULE COMCTL32_hModule;
30extern HBRUSH COMCTL32_hPattern55AABrush;
31
32/* Property sheet / Wizard */
33#define IDD_PROPSHEET 1006
34#define IDD_WIZARD 1020
35
36#define IDC_TABCONTROL 12320
37#define IDC_APPLY_BUTTON 12321
38#define IDC_BACK_BUTTON 12323
39#define IDC_NEXT_BUTTON 12324
40#define IDC_FINISH_BUTTON 12325
41#define IDC_SUNKEN_LINE 12326
42
43#define IDS_CLOSE 4160
44
45/* Toolbar customization dialog */
46#define IDD_TBCUSTOMIZE 200
47
48#define IDC_AVAILBTN_LBOX 201
49#define IDC_RESET_BTN 202
50#define IDC_TOOLBARBTN_LBOX 203
51#define IDC_REMOVE_BTN 204
52#define IDC_HELP_BTN 205
53#define IDC_MOVEUP_BTN 206
54#define IDC_MOVEDN_BTN 207
55
56#define IDS_SEPARATOR 1024
57
58/* Toolbar imagelist bitmaps */
59#define IDB_STD_SMALL 120
60#define IDB_STD_LARGE 121
61#define IDB_VIEW_SMALL 124
62#define IDB_VIEW_LARGE 125
63#define IDB_HIST_SMALL 130
64#define IDB_HIST_LARGE 131
65
66
67/* Month calendar month menu popup */
68#define IDD_MCMONTHMENU 300
69
70#define IDM_JAN 301
71#define IDM_FEB 302
72#define IDM_MAR 303
73#define IDM_APR 304
74#define IDM_MAY 305
75#define IDM_JUN 306
76#define IDM_JUL 307
77#define IDM_AUG 308
78#define IDM_SEP 309
79#define IDM_OCT 310
80#define IDM_NOV 311
81#define IDM_DEC 312
82
83#define IDM_TODAY 4163
84#define IDM_GOTODAY 4164
85
86/* Treeview Checkboxes */
87
88#define IDT_CHECK 401
89
90
91/* Header cursors */
92#define IDC_DIVIDER 106
93#define IDC_DIVIDEROPEN 107
94
95
96/* DragList icon */
97#define IDI_DRAGARROW 150
98
99
100/* HOTKEY internal strings */
101#define HKY_NONE 2048
102
103typedef struct
104{
105 COLORREF clrBtnHighlight; /* COLOR_BTNHIGHLIGHT */
106 COLORREF clrBtnShadow; /* COLOR_BTNSHADOW */
107 COLORREF clrBtnText; /* COLOR_BTNTEXT */
108 COLORREF clrBtnFace; /* COLOR_BTNFACE */
109 COLORREF clrHighlight; /* COLOR_HIGHLIGHT */
110 COLORREF clrHighlightText; /* COLOR_HIGHLIGHTTEXT */
111 COLORREF clr3dHilight; /* COLOR_3DHILIGHT */
112 COLORREF clr3dShadow; /* COLOR_3DSHADOW */
113 COLORREF clr3dDkShadow; /* COLOR_3DDKSHADOW */
114 COLORREF clr3dFace; /* COLOR_3DFACE */
115 COLORREF clrWindow; /* COLOR_WINDOW */
116 COLORREF clrWindowText; /* COLOR_WINDOWTEXT */
117 COLORREF clrGrayText; /* COLOR_GREYTEXT */
118 COLORREF clrActiveCaption; /* COLOR_ACTIVECAPTION */
119 COLORREF clrInfoBk; /* COLOR_INFOBK */
120 COLORREF clrInfoText; /* COLOR_INFOTEXT */
121} COMCTL32_SysColor;
122
123extern COMCTL32_SysColor comctl32_color;
124
125/* Internal function */
126HWND COMCTL32_CreateToolTip (HWND);
127VOID COMCTL32_RefreshSysColors(void);
128INT Str_GetPtrWtoA (LPCWSTR lpSrc, LPSTR lpDest, INT nMaxLen);
129BOOL Str_SetPtrAtoW (LPWSTR *lppDest, LPCSTR lpSrc);
130
131#define COMCTL32_VERSION_MINOR 0
132#define WINE_FILEVERSION 5, COMCTL32_VERSION_MINOR, 0, 0
133#define WINE_FILEVERSIONSTR "5.00"
134
135/* Notification support */
136
137#ifndef RC_INVOKED
138
139#ifdef __WIN32OS2__
140#include <heapstring.h>
141
142#define snprintf wsnprintfA
143
144#ifndef __cplusplus
145#undef inline
146#define inline
147#endif
148#endif
149
150inline static LRESULT send_notify(HWND hwnd, UINT code, NMHDR *hdr)
151{
152 hdr->hwndFrom = hwnd;
153 hdr->idFrom = GetWindowLongW (hwnd, GWL_ID);
154 hdr->code = code;
155
156 return SendMessageW (GetParent(hwnd), WM_NOTIFY, hdr->idFrom, (LPARAM)hdr);
157}
158
159
160inline static LRESULT hwnd_notify(HWND hwnd, UINT code)
161{
162 NMHDR hdr;
163
164 return send_notify(hwnd, code, &hdr);
165}
166
167inline static BOOL hwnd_notify_char(HWND hwnd, UINT ch, DWORD prev, DWORD next)
168{
169 NMCHAR nmch;
170
171 nmch.ch = ch;
172 nmch.dwItemPrev = prev;
173 nmch.dwItemNext = next;
174 return (BOOL)send_notify(hwnd, NM_CHAR, &nmch.hdr);
175}
176
177inline static BOOL hwnd_notify_keydown(HWND hwnd, UINT nVKey, UINT uFlags)
178{
179 NMKEY nmk;
180
181 nmk.nVKey = nVKey;
182 nmk.uFlags = uFlags;
183 return (BOOL)send_notify(hwnd, NM_KEYDOWN, &nmk.hdr);
184}
185
186inline static DWORD hwnd_notify_mouse(HWND hwnd, UINT code, DWORD spec, DWORD data, POINT *pt, LPARAM dwHitInfo)
187{
188 NMMOUSE nmm;
189
190 nmm.dwItemSpec = spec;
191 nmm.dwItemData = data;
192 nmm.pt.x = pt->x;
193 nmm.pt.y = pt->y;
194 nmm.dwHitInfo = dwHitInfo;
195 return send_notify(hwnd, code, &nmm.hdr);
196}
197
198#define DEFINE_CHAR_NOTIFICATION(CTRLINFO, hwndSelf) \
199 inline static BOOL notify_char(CTRLINFO *infoPtr, UINT ch, DWORD prev, DWORD next) \
200 { return hwnd_notify_char(infoPtr->hwndSelf, ch, prev, next); }
201
202#define DEFINE_CLICK_NOTIFICATION(CTRLINFO, hwndSelf) \
203 inline static void notify_click(CTRLINFO *infoPtr) \
204 { hwnd_notify(infoPtr->hwndSelf, NM_CLICK); }
205
206#define DEFINE_DBLCLK_NOTIFICATION(CTRLINFO, hwndSelf) \
207 inline static void notify_dblclk(CTRLINFO *infoPtr) \
208 { hwnd_notify(infoPtr->hwndSelf, NM_DBLCLK); }
209
210#define DEFINE_HOVER_NOTIFICATION(CTRLINFO, hwndSelf) \
211 inline static BOOL notify_hover(CTRLINFO *infoPtr) \
212 { return hwnd_notify(infoPtr->hwndSelf, NM_HOVER); }
213
214#define DEFINE_KEYDOWN_NOTIFICATION(CTRLINFO, hwndSelf) \
215 inline static BOOL notify_keydown(CTRLINFO *infoPtr, UINT nVKey, UINT uFlags) \
216 { return hwnd_notify_keydown(infoPtr->hwndSelf, nVKey, uFlags); }
217
218#define DEFINE_KILLFOCUS_NOTIFICATION(CTRLINFO, hwndSelf) \
219 inline static void notify_killfocus(CTRLINFO *infoPtr) \
220 { hwnd_notify(infoPtr->hwndSelf, NM_KILLFOCUS); }
221
222#define DEFINE_NCHITTEST_NOTIFICATION(CTRLINFO, hwndSelf) \
223 inline static DWORD notify_nchittest(CTRLINFO *infoPtr, DWORD spec, DWORD data, POINT *pt, LPARAM dwHitInfo) \
224 { return hwnd_notify_mouse(infoPtr->hwndSelf, NM_NCHITTEST, spec, data, pt, dwHitInfo); }
225
226#define DEFINE_OUTOFMEMORY_NOTIFICATION(CTRLINFO, hwndSelf) \
227 inline static void notify_outofmemory(CTRLINFO *infoPtr) \
228 { hwnd_notify(infoPtr->hwndSelf, NM_OUTOFMEMORY); }
229
230#define DEFINE_RCLICK_NOTIFICATION(CTRLINFO, hwndSelf) \
231 inline static BOOL notify_rclick(CTRLINFO *infoPtr) \
232 { return hwnd_notify(infoPtr->hwndSelf, NM_RCLICK); }
233
234#define DEFINE_RDBLCLK_NOTIFICATION(CTRLINFO, hwndSelf) \
235 inline static void notify_rdblclk(CTRLINFO *infoPtr) \
236 { hwnd_notify(infoPtr->hwndSelf, NM_RDBLCLK); }
237
238#define DEFINE_RELEASEDCAPTURE_NOTIFICATION(CTRLINFO, hwndSelf) \
239 inline static void notify_releasedcapture(CTRLINFO *infoPtr) \
240 { hwnd_notify(infoPtr->hwndSelf, NM_RELEASEDCAPTURE); }
241
242#define DEFINE_RETURN_NOTIFICATION(CTRLINFO, hwndSelf) \
243 inline static void notify_return(CTRLINFO *infoPtr) \
244 { hwnd_notify(infoPtr->hwndSelf, NM_RETURN); }
245
246#define DEFINE_SETCURSOR_NOTIFICATION(CTRLINFO, hwndSelf) \
247 inline static BOOL notify_setcursor(CTRLINFO *infoPtr, DWORD spec, DWORD data, POINT *pt, LPARAM dwHitInfo) \
248 { return hwnd_notify_mouse(infoPtr->hwndSelf, NM_SETCURSOR, spec, data, pt, dwHitInfo); }
249
250#define DEFINE_SETFOCUS_NOTIFICATION(CTRLINFO, hwndSelf) \
251 inline static void notify_setfocus(CTRLINFO *infoPtr) \
252 { hwnd_notify(infoPtr->hwndSelf, NM_SETFOCUS); }
253
254#define DEFINE_TOOLTIPSCREATED_NOTIFICATION(CTRLINFO, hwndSelf) \
255 inline static void notify_tooltipscreated(CTRLINFO *infoPtr) \
256 { hwnd_notify(infoPtr->hwndSelf, NM_TOOLTIPSCREATED); }
257
258#define DEFINE_COMMON_NOTIFICATIONS(CTRLINFO, hwndSelf) \
259 DEFINE_CHAR_NOTIFICATION(CTRLINFO, hwndSelf) \
260 DEFINE_CLICK_NOTIFICATION(CTRLINFO, hwndSelf) \
261 DEFINE_DBLCLK_NOTIFICATION(CTRLINFO, hwndSelf) \
262 DEFINE_HOVER_NOTIFICATION(CTRLINFO, hwndSelf) \
263 DEFINE_KEYDOWN_NOTIFICATION(CTRLINFO, hwndSelf) \
264 DEFINE_KILLFOCUS_NOTIFICATION(CTRLINFO, hwndSelf) \
265 DEFINE_NCHITTEST_NOTIFICATION(CTRLINFO, hwndSelf) \
266 DEFINE_OUTOFMEMORY_NOTIFICATION(CTRLINFO, hwndSelf) \
267 DEFINE_RCLICK_NOTIFICATION(CTRLINFO, hwndSelf) \
268 DEFINE_RDBLCLK_NOTIFICATION(CTRLINFO, hwndSelf) \
269 DEFINE_RELEASEDCAPTURE_NOTIFICATION(CTRLINFO, hwndSelf) \
270 DEFINE_RETURN_NOTIFICATION(CTRLINFO, hwndSelf) \
271 DEFINE_SETCURSOR_NOTIFICATION(CTRLINFO, hwndSelf) \
272 DEFINE_SETFOCUS_NOTIFICATION(CTRLINFO, hwndSelf) \
273 DEFINE_TOOLTIPSCREATED_NOTIFICATION(CTRLINFO, hwndSelf) \
274 struct __forward_dummy_struc_dec_to_catch_missing_semicolon
275
276#endif //#ifndef RC_INVOKED
277
278/* Our internal stack structure of the window procedures to subclass */
279typedef struct
280{
281 struct {
282 SUBCLASSPROC subproc;
283 UINT_PTR id;
284 DWORD_PTR ref;
285 } SubclassProcs[31];
286 int stackpos;
287 int stacknum;
288 int stacknew;
289 WNDPROC origproc;
290} SUBCLASS_INFO, *LPSUBCLASS_INFO;
291
292#ifdef __WIN32OS2__
293
294/* Header filter bitmap */
295#define IDB_HEADER_FILTER 140
296
297#define IDC_COMCTL32_DRAGHLINE 106
298#define IDC_COMCTL32_SPLITHLINE 107
299
300#define swprintf wsprintfW
301
302#ifdef __cplusplus
303extern "C" {
304#endif
305
306void ANIMATE_Register(void);
307void ANIMATE_Unregister(void);
308void COMBOEX_Register(void);
309void COMBOEX_Unregister(void);
310void DATETIME_Register(void);
311void DATETIME_Unregister(void);
312void FLATSB_Register(void);
313void FLATSB_Unregister(void);
314void HEADER_Register(void);
315void HEADER_Unregister(void);
316void HOTKEY_Register(void);
317void HOTKEY_Unregister(void);
318void IPADDRESS_Register(void);
319void IPADDRESS_Unregister(void);
320void LISTVIEW_Register(void);
321void LISTVIEW_Unregister(void);
322void MONTHCAL_Register(void);
323void MONTHCAL_Unregister(void);
324void NATIVEFONT_Register(void);
325void NATIVEFONT_Unregister(void);
326void PAGER_Register(void);
327void PAGER_Unregister(void);
328void PROGRESS_Register(void);
329void PROGRESS_Unregister(void);
330void REBAR_Register(void);
331void REBAR_Unregister(void);
332void STATUS_Register(void);
333void STATUS_Unregister(void);
334void TAB_Register(void);
335void TAB_Unregister(void);
336void TOOLBAR_Register(void);
337void TOOLBAR_Unregister(void);
338void TOOLTIPS_Register(void);
339void TOOLTIPS_Unregister(void);
340void TRACKBAR_Register(void);
341void TRACKBAR_Unregister(void);
342void TREEVIEW_Register(void);
343void TREEVIEW_Unregister(void);
344void UPDOWN_Register(void);
345void UPDOWN_Unregister(void);
346
347
348#ifdef __cplusplus
349}
350#endif
351
352#endif
353
354#endif /* __WINE_COMCTL32_H */
Note: See TracBrowser for help on using the repository browser.