Eric Kohl | 654ee2c | 1999-05-22 10:52:31 +0000 | [diff] [blame] | 1 | /****************************************************************************** |
Vincent Béron | 9a62491 | 2002-05-31 23:06:46 +0000 | [diff] [blame] | 2 | * |
Eric Kohl | 654ee2c | 1999-05-22 10:52:31 +0000 | [diff] [blame] | 3 | * Common definitions (resource ids and global variables) |
| 4 | * |
| 5 | * Copyright 1999 Thuy Nguyen |
| 6 | * Copyright 1999 Eric Kohl |
Dimitrie O. Paun | 1c628e0 | 2002-09-06 18:33:18 +0000 | [diff] [blame] | 7 | * Copyright 2002 Dimitrie O. Paun |
Eric Kohl | 654ee2c | 1999-05-22 10:52:31 +0000 | [diff] [blame] | 8 | * |
Alexandre Julliard | 0799c1a | 2002-03-09 23:29:33 +0000 | [diff] [blame] | 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 |
Eric Kohl | 654ee2c | 1999-05-22 10:52:31 +0000 | [diff] [blame] | 22 | */ |
| 23 | |
Chris Morgan | 5f9fd77 | 2000-09-13 20:27:30 +0000 | [diff] [blame] | 24 | #ifndef __WINE_COMCTL32_H |
| 25 | #define __WINE_COMCTL32_H |
| 26 | |
Dimitrie O. Paun | 1c628e0 | 2002-09-06 18:33:18 +0000 | [diff] [blame] | 27 | #include "commctrl.h" |
| 28 | |
Eric Kohl | 654ee2c | 1999-05-22 10:52:31 +0000 | [diff] [blame] | 29 | extern HMODULE COMCTL32_hModule; |
Eric Kohl | 7379b89 | 2000-11-25 01:27:42 +0000 | [diff] [blame] | 30 | extern HBRUSH COMCTL32_hPattern55AABrush; |
Eric Kohl | 654ee2c | 1999-05-22 10:52:31 +0000 | [diff] [blame] | 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 |
Thuy Nguyen | bf35d80 | 1999-09-19 12:14:38 +0000 | [diff] [blame] | 38 | #define IDC_BACK_BUTTON 12323 |
| 39 | #define IDC_NEXT_BUTTON 12324 |
| 40 | #define IDC_FINISH_BUTTON 12325 |
| 41 | #define IDC_SUNKEN_LINE 12326 |
Eric Kohl | 654ee2c | 1999-05-22 10:52:31 +0000 | [diff] [blame] | 42 | |
Alexandre Julliard | 08afc1a | 1999-11-28 21:01:47 +0000 | [diff] [blame] | 43 | #define IDS_CLOSE 4160 |
Eric Kohl | 654ee2c | 1999-05-22 10:52:31 +0000 | [diff] [blame] | 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 | |
Eric Kohl | ea9d4ce | 2000-11-07 20:30:11 +0000 | [diff] [blame] | 56 | #define IDS_SEPARATOR 1024 |
| 57 | |
Eric Kohl | 4d7e877 | 1999-07-31 13:10:46 +0000 | [diff] [blame] | 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 | |
Alex Priem | b2e91b6 | 1999-07-10 12:00:04 +0000 | [diff] [blame] | 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 |
Eric Kohl | 4d7e877 | 1999-07-31 13:10:46 +0000 | [diff] [blame] | 81 | #define IDM_DEC 312 |
Alex Priem | e6e71ad | 1999-11-28 19:50:01 +0000 | [diff] [blame] | 82 | |
Uwe Bonnes | c3585ba | 2000-10-15 00:24:48 +0000 | [diff] [blame] | 83 | #define IDM_TODAY 4163 |
| 84 | #define IDM_GOTODAY 4164 |
| 85 | |
Gyorgy 'Nog' Jeney | c2c03b0 | 2002-09-17 18:30:07 +0000 | [diff] [blame] | 86 | /* Treeview Checkboxes */ |
Alex Priem | e6e71ad | 1999-11-28 19:50:01 +0000 | [diff] [blame] | 87 | |
| 88 | #define IDT_CHECK 401 |
| 89 | |
Eric Kohl | dbbc224 | 2000-11-09 20:26:34 +0000 | [diff] [blame] | 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 | |
Gyorgy 'Nog' Jeney | c2c03b0 | 2002-09-17 18:30:07 +0000 | [diff] [blame] | 99 | |
| 100 | /* HOTKEY internal strings */ |
| 101 | #define HKY_NONE 2048 |
| 102 | |
Vincent Béron | 9a62491 | 2002-05-31 23:06:46 +0000 | [diff] [blame] | 103 | typedef struct |
Guy L. Albertelli | 35d8e1e | 2002-04-05 21:14:05 +0000 | [diff] [blame] | 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 | |
| 123 | extern COMCTL32_SysColor comctl32_color; |
Eric Kohl | dbbc224 | 2000-11-09 20:26:34 +0000 | [diff] [blame] | 124 | |
Chris Morgan | 5f9fd77 | 2000-09-13 20:27:30 +0000 | [diff] [blame] | 125 | /* Internal function */ |
| 126 | HWND COMCTL32_CreateToolTip (HWND); |
Guy L. Albertelli | 35d8e1e | 2002-04-05 21:14:05 +0000 | [diff] [blame] | 127 | VOID COMCTL32_RefreshSysColors(void); |
Eric Kohl | b7546b6 | 2000-11-15 22:14:43 +0000 | [diff] [blame] | 128 | INT Str_GetPtrWtoA (LPCWSTR lpSrc, LPSTR lpDest, INT nMaxLen); |
| 129 | BOOL Str_SetPtrAtoW (LPWSTR *lppDest, LPCSTR lpSrc); |
| 130 | |
Vincent Béron | 9a62491 | 2002-05-31 23:06:46 +0000 | [diff] [blame] | 131 | #define COMCTL32_VERSION_MINOR 0 |
Gerard Patel | 8b21b6b | 2001-03-16 16:50:24 +0000 | [diff] [blame] | 132 | #define WINE_FILEVERSION 5, COMCTL32_VERSION_MINOR, 0, 0 |
| 133 | #define WINE_FILEVERSIONSTR "5.00" |
Chris Morgan | 5f9fd77 | 2000-09-13 20:27:30 +0000 | [diff] [blame] | 134 | |
Dimitrie O. Paun | 1c628e0 | 2002-09-06 18:33:18 +0000 | [diff] [blame] | 135 | /* Notification support */ |
| 136 | |
| 137 | inline static LRESULT send_notify(HWND hwnd, UINT code, NMHDR *hdr) |
| 138 | { |
| 139 | hdr->hwndFrom = hwnd; |
| 140 | hdr->idFrom = GetWindowLongW (hwnd, GWL_ID); |
| 141 | hdr->code = code; |
| 142 | |
| 143 | return SendMessageW (GetParent(hwnd), WM_NOTIFY, hdr->idFrom, (LPARAM)hdr); |
| 144 | } |
| 145 | |
| 146 | |
| 147 | inline static LRESULT hwnd_notify(HWND hwnd, UINT code) |
| 148 | { |
| 149 | NMHDR hdr; |
| 150 | |
| 151 | return send_notify(hwnd, code, &hdr); |
| 152 | } |
| 153 | |
| 154 | inline static BOOL hwnd_notify_char(HWND hwnd, UINT ch, DWORD prev, DWORD next) |
| 155 | { |
| 156 | NMCHAR nmch; |
| 157 | |
| 158 | nmch.ch = ch; |
| 159 | nmch.dwItemPrev = prev; |
| 160 | nmch.dwItemNext = next; |
| 161 | return (BOOL)send_notify(hwnd, NM_CHAR, &nmch.hdr); |
| 162 | } |
| 163 | |
| 164 | inline static BOOL hwnd_notify_keydown(HWND hwnd, UINT nVKey, UINT uFlags) |
| 165 | { |
| 166 | NMKEY nmk; |
| 167 | |
| 168 | nmk.nVKey = nVKey; |
| 169 | nmk.uFlags = uFlags; |
| 170 | return (BOOL)send_notify(hwnd, NM_KEYDOWN, &nmk.hdr); |
| 171 | } |
| 172 | |
| 173 | inline static DWORD hwnd_notify_mouse(HWND hwnd, UINT code, DWORD spec, DWORD data, POINT *pt, LPARAM dwHitInfo) |
| 174 | { |
| 175 | NMMOUSE nmm; |
| 176 | |
| 177 | nmm.dwItemSpec = spec; |
| 178 | nmm.dwItemData = data; |
| 179 | nmm.pt.x = pt->x; |
| 180 | nmm.pt.y = pt->y; |
| 181 | nmm.dwHitInfo = dwHitInfo; |
| 182 | return send_notify(hwnd, code, &nmm.hdr); |
| 183 | } |
| 184 | |
| 185 | #define DEFINE_CHAR_NOTIFICATION(CTRLINFO, hwndSelf) \ |
| 186 | inline static BOOL notify_char(CTRLINFO *infoPtr, UINT ch, DWORD prev, DWORD next) \ |
| 187 | { return hwnd_notify_char(infoPtr->hwndSelf, ch, prev, next); } |
| 188 | |
| 189 | #define DEFINE_CLICK_NOTIFICATION(CTRLINFO, hwndSelf) \ |
| 190 | inline static void notify_click(CTRLINFO *infoPtr) \ |
| 191 | { hwnd_notify(infoPtr->hwndSelf, NM_CLICK); } |
| 192 | |
| 193 | #define DEFINE_DBLCLK_NOTIFICATION(CTRLINFO, hwndSelf) \ |
| 194 | inline static void notify_dblclk(CTRLINFO *infoPtr) \ |
| 195 | { hwnd_notify(infoPtr->hwndSelf, NM_DBLCLK); } |
| 196 | |
| 197 | #define DEFINE_HOVER_NOTIFICATION(CTRLINFO, hwndSelf) \ |
| 198 | inline static BOOL notify_hover(CTRLINFO *infoPtr) \ |
| 199 | { return hwnd_notify(infoPtr->hwndSelf, NM_HOVER); } |
| 200 | |
| 201 | #define DEFINE_KEYDOWN_NOTIFICATION(CTRLINFO, hwndSelf) \ |
| 202 | inline static BOOL notify_keydown(CTRLINFO *infoPtr, UINT nVKey, UINT uFlags) \ |
| 203 | { return hwnd_notify_keydown(infoPtr->hwndSelf, nVKey, uFlags); } |
| 204 | |
| 205 | #define DEFINE_KILLFOCUS_NOTIFICATION(CTRLINFO, hwndSelf) \ |
| 206 | inline static void notify_killfocus(CTRLINFO *infoPtr) \ |
| 207 | { hwnd_notify(infoPtr->hwndSelf, NM_KILLFOCUS); } |
| 208 | |
| 209 | #define DEFINE_NCHITTEST_NOTIFICATION(CTRLINFO, hwndSelf) \ |
| 210 | inline static DWORD notify_nchittest(CTRLINFO *infoPtr, DWORD spec, DWORD data, POINT *pt, LPARAM dwHitInfo) \ |
| 211 | { return hwnd_notify_mouse(infoPtr->hwndSelf, NM_NCHITTEST, spec, data, pt, dwHitInfo); } |
| 212 | |
| 213 | #define DEFINE_OUTOFMEMORY_NOTIFICATION(CTRLINFO, hwndSelf) \ |
| 214 | inline static void notify_outofmemory(CTRLINFO *infoPtr) \ |
| 215 | { hwnd_notify(infoPtr->hwndSelf, NM_OUTOFMEMORY); } |
| 216 | |
| 217 | #define DEFINE_RCLICK_NOTIFICATION(CTRLINFO, hwndSelf) \ |
| 218 | inline static BOOL notify_rclick(CTRLINFO *infoPtr) \ |
| 219 | { return hwnd_notify(infoPtr->hwndSelf, NM_RCLICK); } |
| 220 | |
| 221 | #define DEFINE_RDBLCLK_NOTIFICATION(CTRLINFO, hwndSelf) \ |
| 222 | inline static void notify_rdblclk(CTRLINFO *infoPtr) \ |
| 223 | { hwnd_notify(infoPtr->hwndSelf, NM_RDBLCLK); } |
| 224 | |
| 225 | #define DEFINE_RELEASEDCAPTURE_NOTIFICATION(CTRLINFO, hwndSelf) \ |
| 226 | inline static void notify_releasedcapture(CTRLINFO *infoPtr) \ |
| 227 | { hwnd_notify(infoPtr->hwndSelf, NM_RELEASEDCAPTURE); } |
| 228 | |
| 229 | #define DEFINE_RETURN_NOTIFICATION(CTRLINFO, hwndSelf) \ |
| 230 | inline static void notify_return(CTRLINFO *infoPtr) \ |
| 231 | { hwnd_notify(infoPtr->hwndSelf, NM_RETURN); } |
| 232 | |
| 233 | #define DEFINE_SETCURSOR_NOTIFICATION(CTRLINFO, hwndSelf) \ |
| 234 | inline static BOOL notify_setcursor(CTRLINFO *infoPtr, DWORD spec, DWORD data, POINT *pt, LPARAM dwHitInfo) \ |
| 235 | { return hwnd_notify_mouse(infoPtr->hwndSelf, NM_SETCURSOR, spec, data, pt, dwHitInfo); } |
| 236 | |
| 237 | #define DEFINE_SETFOCUS_NOTIFICATION(CTRLINFO, hwndSelf) \ |
| 238 | inline static void notify_setfocus(CTRLINFO *infoPtr) \ |
| 239 | { hwnd_notify(infoPtr->hwndSelf, NM_SETFOCUS); } |
| 240 | |
| 241 | #define DEFINE_TOOLTIPSCREATED_NOTIFICATION(CTRLINFO, hwndSelf) \ |
| 242 | inline static void notify_tooltipscreated(CTRLINFO *infoPtr) \ |
| 243 | { hwnd_notify(infoPtr->hwndSelf, NM_TOOLTIPSCREATED); } |
| 244 | |
| 245 | #define DEFINE_COMMON_NOTIFICATIONS(CTRLINFO, hwndSelf) \ |
| 246 | DEFINE_CHAR_NOTIFICATION(CTRLINFO, hwndSelf) \ |
| 247 | DEFINE_CLICK_NOTIFICATION(CTRLINFO, hwndSelf) \ |
| 248 | DEFINE_DBLCLK_NOTIFICATION(CTRLINFO, hwndSelf) \ |
| 249 | DEFINE_HOVER_NOTIFICATION(CTRLINFO, hwndSelf) \ |
| 250 | DEFINE_KEYDOWN_NOTIFICATION(CTRLINFO, hwndSelf) \ |
| 251 | DEFINE_KILLFOCUS_NOTIFICATION(CTRLINFO, hwndSelf) \ |
| 252 | DEFINE_NCHITTEST_NOTIFICATION(CTRLINFO, hwndSelf) \ |
| 253 | DEFINE_OUTOFMEMORY_NOTIFICATION(CTRLINFO, hwndSelf) \ |
| 254 | DEFINE_RCLICK_NOTIFICATION(CTRLINFO, hwndSelf) \ |
| 255 | DEFINE_RDBLCLK_NOTIFICATION(CTRLINFO, hwndSelf) \ |
| 256 | DEFINE_RELEASEDCAPTURE_NOTIFICATION(CTRLINFO, hwndSelf) \ |
| 257 | DEFINE_RETURN_NOTIFICATION(CTRLINFO, hwndSelf) \ |
| 258 | DEFINE_SETCURSOR_NOTIFICATION(CTRLINFO, hwndSelf) \ |
| 259 | DEFINE_SETFOCUS_NOTIFICATION(CTRLINFO, hwndSelf) \ |
| 260 | DEFINE_TOOLTIPSCREATED_NOTIFICATION(CTRLINFO, hwndSelf) \ |
| 261 | struct __forward_dummy_struc_dec_to_catch_missing_semicolon |
| 262 | |
György 'Nog' Jeney | f9c0111 | 2002-10-02 20:01:01 +0000 | [diff] [blame] | 263 | /* Our internal stack structure of the window procedures to subclass */ |
| 264 | typedef struct |
| 265 | { |
| 266 | struct { |
| 267 | SUBCLASSPROC subproc; |
| 268 | UINT_PTR id; |
| 269 | DWORD_PTR ref; |
| 270 | } SubclassProcs[31]; |
| 271 | int stackpos; |
| 272 | int stacknum; |
| 273 | int stacknew; |
| 274 | WNDPROC origproc; |
| 275 | } SUBCLASS_INFO, *LPSUBCLASS_INFO; |
| 276 | |
Chris Morgan | 5f9fd77 | 2000-09-13 20:27:30 +0000 | [diff] [blame] | 277 | #endif /* __WINE_COMCTL32_H */ |