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 #include "windowsx.h" 38 39 #ifdef __REACTOS__ 40 // This is really ComCtl32 v5.82, the last one not supporting SxS 41 #undef COMCTL32_VERSION // Undefines what the PSDK gave to us 42 #define COMCTL32_VERSION 5 43 #define COMCTL32_VERSION_MINOR 82 44 #endif 45 46 extern HMODULE COMCTL32_hModule DECLSPEC_HIDDEN; 47 extern HBRUSH COMCTL32_hPattern55AABrush DECLSPEC_HIDDEN; 48 49 /* Property sheet / Wizard */ 50 #define IDD_PROPSHEET 1006 51 #define IDD_WIZARD 1020 52 53 #define IDC_TABCONTROL 12320 54 #define IDC_APPLY_BUTTON 12321 55 #define IDC_BACK_BUTTON 12323 56 #define IDC_NEXT_BUTTON 12324 57 #define IDC_FINISH_BUTTON 12325 58 #define IDC_SUNKEN_LINE 12326 59 #define IDC_SUNKEN_LINEHEADER 12327 60 61 #define IDS_CLOSE 4160 62 63 /* Toolbar customization dialog */ 64 #define IDD_TBCUSTOMIZE 200 65 66 #define IDC_AVAILBTN_LBOX 201 67 #define IDC_RESET_BTN 202 68 #define IDC_TOOLBARBTN_LBOX 203 69 #define IDC_REMOVE_BTN 204 70 #define IDC_HELP_BTN 205 71 #define IDC_MOVEUP_BTN 206 72 #define IDC_MOVEDN_BTN 207 73 74 #define IDS_SEPARATOR 1024 75 76 /* Toolbar imagelist bitmaps */ 77 #define IDB_STD_SMALL 120 78 #define IDB_STD_LARGE 121 79 #define IDB_VIEW_SMALL 124 80 #define IDB_VIEW_LARGE 125 81 #define IDB_HIST_SMALL 130 82 #define IDB_HIST_LARGE 131 83 84 #define IDM_TODAY 4163 85 #define IDM_GOTODAY 4164 86 87 /* Treeview Checkboxes */ 88 89 #define IDT_CHECK 401 90 91 /* Command Link arrow */ 92 #define IDB_CMDLINK 402 93 94 95 /* Cursors */ 96 #define IDC_MOVEBUTTON 102 97 #define IDC_COPY 104 98 #define IDC_DIVIDER 106 99 #define IDC_DIVIDEROPEN 107 100 101 102 /* DragList resources */ 103 #define IDI_DRAGARROW 501 104 105 /* HOTKEY internal strings */ 106 #define HKY_NONE 2048 107 108 /* Tooltip icons */ 109 #define IDI_TT_INFO_SM 22 110 #define IDI_TT_WARN_SM 25 111 #define IDI_TT_ERROR_SM 28 112 113 /* Taskdialog strings */ 114 #define IDS_BUTTON_YES 3000 115 #define IDS_BUTTON_NO 3001 116 #define IDS_BUTTON_RETRY 3002 117 #define IDS_BUTTON_OK 3003 118 #define IDS_BUTTON_CANCEL 3004 119 #define IDS_BUTTON_CLOSE 3005 120 121 #define IDS_TD_EXPANDED 3020 122 #define IDS_TD_COLLAPSED 3021 123 124 #ifndef __REACTOS__ 125 #define WM_SYSTIMER 0x0118 126 #endif 127 128 enum combobox_state_flags 129 { 130 CBF_DROPPED = 0x0001, 131 CBF_BUTTONDOWN = 0x0002, 132 CBF_NOROLLUP = 0x0004, 133 CBF_MEASUREITEM = 0x0008, 134 CBF_FOCUSED = 0x0010, 135 CBF_CAPTURE = 0x0020, 136 CBF_EDIT = 0x0040, 137 CBF_NORESIZE = 0x0080, 138 CBF_NOTIFY = 0x0100, 139 CBF_NOREDRAW = 0x0200, 140 CBF_SELCHANGE = 0x0400, 141 CBF_HOT = 0x0800, 142 CBF_NOEDITNOTIFY = 0x1000, 143 CBF_NOLBSELECT = 0x2000, /* do not change current selection */ 144 CBF_BEENFOCUSED = 0x4000, /* has it ever had focus */ 145 CBF_EUI = 0x8000, 146 }; 147 148 typedef struct 149 { 150 HWND self; 151 HWND owner; 152 UINT dwStyle; 153 HWND hWndEdit; 154 HWND hWndLBox; 155 UINT wState; 156 HFONT hFont; 157 RECT textRect; 158 RECT buttonRect; 159 RECT droppedRect; 160 INT droppedIndex; 161 INT fixedOwnerDrawHeight; 162 INT droppedWidth; /* not used unless set explicitly */ 163 INT item_height; 164 INT visibleItems; 165 } HEADCOMBO, *LPHEADCOMBO; 166 167 extern BOOL COMBO_FlipListbox(HEADCOMBO *lphc, BOOL ok, BOOL bRedrawButton) DECLSPEC_HIDDEN; 168 169 typedef struct 170 { 171 COLORREF clrBtnHighlight; /* COLOR_BTNHIGHLIGHT */ 172 COLORREF clrBtnShadow; /* COLOR_BTNSHADOW */ 173 COLORREF clrBtnText; /* COLOR_BTNTEXT */ 174 COLORREF clrBtnFace; /* COLOR_BTNFACE */ 175 COLORREF clrHighlight; /* COLOR_HIGHLIGHT */ 176 COLORREF clrHighlightText; /* COLOR_HIGHLIGHTTEXT */ 177 COLORREF clrHotTrackingColor; /* COLOR_HOTLIGHT */ 178 COLORREF clr3dHilight; /* COLOR_3DHILIGHT */ 179 COLORREF clr3dShadow; /* COLOR_3DSHADOW */ 180 COLORREF clr3dDkShadow; /* COLOR_3DDKSHADOW */ 181 COLORREF clr3dFace; /* COLOR_3DFACE */ 182 COLORREF clrWindow; /* COLOR_WINDOW */ 183 COLORREF clrWindowText; /* COLOR_WINDOWTEXT */ 184 COLORREF clrGrayText; /* COLOR_GREYTEXT */ 185 COLORREF clrActiveCaption; /* COLOR_ACTIVECAPTION */ 186 COLORREF clrInfoBk; /* COLOR_INFOBK */ 187 COLORREF clrInfoText; /* COLOR_INFOTEXT */ 188 } COMCTL32_SysColor; 189 190 extern COMCTL32_SysColor comctl32_color DECLSPEC_HIDDEN; 191 192 /* Internal function */ 193 HWND COMCTL32_CreateToolTip (HWND) DECLSPEC_HIDDEN; 194 VOID COMCTL32_RefreshSysColors(void) DECLSPEC_HIDDEN; 195 void COMCTL32_DrawInsertMark(HDC hDC, const RECT *lpRect, COLORREF clrInsertMark, BOOL bHorizontal) DECLSPEC_HIDDEN; 196 void COMCTL32_EnsureBitmapSize(HBITMAP *pBitmap, int cxMinWidth, int cyMinHeight, COLORREF crBackground) DECLSPEC_HIDDEN; 197 void COMCTL32_GetFontMetrics(HFONT hFont, TEXTMETRICW *ptm) DECLSPEC_HIDDEN; 198 BOOL COMCTL32_IsReflectedMessage(UINT uMsg) DECLSPEC_HIDDEN; 199 INT Str_GetPtrWtoA (LPCWSTR lpSrc, LPSTR lpDest, INT nMaxLen) DECLSPEC_HIDDEN; 200 INT Str_GetPtrAtoW (LPCSTR lpSrc, LPWSTR lpDest, INT nMaxLen) DECLSPEC_HIDDEN; 201 BOOL Str_SetPtrAtoW (LPWSTR *lppDest, LPCSTR lpSrc) DECLSPEC_HIDDEN; 202 BOOL Str_SetPtrWtoA (LPSTR *lppDest, LPCWSTR lpSrc) DECLSPEC_HIDDEN; 203 204 #ifndef __REACTOS__ 205 #define COMCTL32_VERSION_MINOR 81 206 #endif 207 208 /* Our internal stack structure of the window procedures to subclass */ 209 typedef struct _SUBCLASSPROCS { 210 SUBCLASSPROC subproc; 211 UINT_PTR id; 212 DWORD_PTR ref; 213 struct _SUBCLASSPROCS *next; 214 } SUBCLASSPROCS, *LPSUBCLASSPROCS; 215 216 typedef struct 217 { 218 SUBCLASSPROCS *SubclassProcs; 219 SUBCLASSPROCS *stackpos; 220 WNDPROC origproc; 221 int running; 222 } SUBCLASS_INFO, *LPSUBCLASS_INFO; 223 224 /* undocumented functions */ 225 226 LPVOID WINAPI Alloc (DWORD) __WINE_ALLOC_SIZE(1); 227 LPVOID WINAPI ReAlloc (LPVOID, DWORD) __WINE_ALLOC_SIZE(2); 228 BOOL WINAPI Free (LPVOID); 229 DWORD WINAPI GetSize (LPVOID); 230 231 INT WINAPI Str_GetPtrA (LPCSTR, LPSTR, INT); 232 INT WINAPI Str_GetPtrW (LPCWSTR, LPWSTR, INT); 233 234 LRESULT WINAPI SetPathWordBreakProc(HWND hwnd, BOOL bSet); 235 BOOL WINAPI MirrorIcon(HICON *phicon1, HICON *phicon2); 236 237 HRGN set_control_clipping(HDC hdc, const RECT *rect) DECLSPEC_HIDDEN; 238 239 extern void ANIMATE_Register(void) DECLSPEC_HIDDEN; 240 extern void ANIMATE_Unregister(void) DECLSPEC_HIDDEN; 241 extern void BUTTON_Register(void) DECLSPEC_HIDDEN; 242 extern void COMBO_Register(void) DECLSPEC_HIDDEN; 243 extern void COMBOEX_Register(void) DECLSPEC_HIDDEN; 244 extern void COMBOEX_Unregister(void) DECLSPEC_HIDDEN; 245 extern void COMBOLBOX_Register(void) DECLSPEC_HIDDEN; 246 extern void DATETIME_Register(void) DECLSPEC_HIDDEN; 247 extern void DATETIME_Unregister(void) DECLSPEC_HIDDEN; 248 extern void EDIT_Register(void) DECLSPEC_HIDDEN; 249 extern void FLATSB_Register(void) DECLSPEC_HIDDEN; 250 extern void FLATSB_Unregister(void) DECLSPEC_HIDDEN; 251 extern void HEADER_Register(void) DECLSPEC_HIDDEN; 252 extern void HEADER_Unregister(void) DECLSPEC_HIDDEN; 253 extern void HOTKEY_Register(void) DECLSPEC_HIDDEN; 254 extern void HOTKEY_Unregister(void) DECLSPEC_HIDDEN; 255 extern void IPADDRESS_Register(void) DECLSPEC_HIDDEN; 256 extern void IPADDRESS_Unregister(void) DECLSPEC_HIDDEN; 257 extern void LISTBOX_Register(void) DECLSPEC_HIDDEN; 258 extern void LISTVIEW_Register(void) DECLSPEC_HIDDEN; 259 extern void LISTVIEW_Unregister(void) DECLSPEC_HIDDEN; 260 extern void MONTHCAL_Register(void) DECLSPEC_HIDDEN; 261 extern void MONTHCAL_Unregister(void) DECLSPEC_HIDDEN; 262 extern void NATIVEFONT_Register(void) DECLSPEC_HIDDEN; 263 extern void NATIVEFONT_Unregister(void) DECLSPEC_HIDDEN; 264 extern void PAGER_Register(void) DECLSPEC_HIDDEN; 265 extern void PAGER_Unregister(void) DECLSPEC_HIDDEN; 266 extern void PROGRESS_Register(void) DECLSPEC_HIDDEN; 267 extern void PROGRESS_Unregister(void) DECLSPEC_HIDDEN; 268 extern void REBAR_Register(void) DECLSPEC_HIDDEN; 269 extern void REBAR_Unregister(void) DECLSPEC_HIDDEN; 270 extern void STATIC_Register(void) DECLSPEC_HIDDEN; 271 extern void STATUS_Register(void) DECLSPEC_HIDDEN; 272 extern void STATUS_Unregister(void) DECLSPEC_HIDDEN; 273 extern void SYSLINK_Register(void) DECLSPEC_HIDDEN; 274 extern void SYSLINK_Unregister(void) DECLSPEC_HIDDEN; 275 extern void TAB_Register(void) DECLSPEC_HIDDEN; 276 extern void TAB_Unregister(void) DECLSPEC_HIDDEN; 277 extern void TOOLBAR_Register(void) DECLSPEC_HIDDEN; 278 extern void TOOLBAR_Unregister(void) DECLSPEC_HIDDEN; 279 extern void TOOLTIPS_Register(void) DECLSPEC_HIDDEN; 280 extern void TOOLTIPS_Unregister(void) DECLSPEC_HIDDEN; 281 extern void TRACKBAR_Register(void) DECLSPEC_HIDDEN; 282 extern void TRACKBAR_Unregister(void) DECLSPEC_HIDDEN; 283 extern void TREEVIEW_Register(void) DECLSPEC_HIDDEN; 284 extern void TREEVIEW_Unregister(void) DECLSPEC_HIDDEN; 285 extern void UPDOWN_Register(void) DECLSPEC_HIDDEN; 286 extern void UPDOWN_Unregister(void) DECLSPEC_HIDDEN; 287 #ifdef __REACTOS__ 288 extern void BUTTON_Unregister(void) DECLSPEC_HIDDEN; 289 extern void COMBO_Unregister(void) DECLSPEC_HIDDEN; 290 extern void COMBOLBOX_Unregister(void) DECLSPEC_HIDDEN; 291 extern void EDIT_Unregister(void) DECLSPEC_HIDDEN; 292 extern void LISTBOX_Unregister(void) DECLSPEC_HIDDEN; 293 extern void STATIC_Unregister(void) DECLSPEC_HIDDEN; 294 extern void TOOLBARv6_Register(void) DECLSPEC_HIDDEN; 295 extern void TOOLBARv6_Unregister(void) DECLSPEC_HIDDEN; 296 #endif /* __REACTOS__ */ 297 298 int MONTHCAL_MonthLength(int month, int year) DECLSPEC_HIDDEN; 299 int MONTHCAL_CalculateDayOfWeek(SYSTEMTIME *date, BOOL inplace) DECLSPEC_HIDDEN; 300 LONG MONTHCAL_CompareSystemTime(const SYSTEMTIME *first, const SYSTEMTIME *second) DECLSPEC_HIDDEN; 301 #ifdef __REACTOS__ 302 extern void THEMING_Initialize(HANDLE hActCtx5, HANDLE hActCtx6) DECLSPEC_HIDDEN; 303 #else 304 extern void THEMING_Initialize(void) DECLSPEC_HIDDEN; 305 #endif 306 extern void THEMING_Uninitialize(void) DECLSPEC_HIDDEN; 307 extern LRESULT THEMING_CallOriginalClass(HWND, UINT, WPARAM, LPARAM) DECLSPEC_HIDDEN; 308 309 #ifdef __REACTOS__ 310 #define IDI_SHIELD 32518 311 #define wcsnicmp _wcsnicmp 312 #define GetDpiForWindow(PVOID) 96 313 #endif 314 315 #endif /* __WINE_COMCTL32_H */ 316