Changeset 8382 for trunk/src/comctl32/commctrl.c
- Timestamp:
- May 8, 2002, 1:26:30 PM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/comctl32/commctrl.c
r7815 r8382 5 5 * Copyright 1998,2000 Eric Kohl 6 6 * 7 * This library is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU Lesser General Public 9 * License as published by the Free Software Foundation; either 10 * version 2.1 of the License, or (at your option) any later version. 11 * 12 * This library is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 * Lesser General Public License for more details. 16 * 17 * You should have received a copy of the GNU Lesser General Public 18 * License along with this library; if not, write to the Free Software 19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 7 20 */ 8 21 … … 17 30 #include "shlwapi.h" 18 31 #include "comctl32.h" 19 #include " debugtools.h"20 21 DEFAULT_DEBUG_CHANNEL(commctrl);32 #include "wine/debug.h" 33 34 WINE_DEFAULT_DEBUG_CHANNEL(commctrl); 22 35 23 36 extern void ANIMATE_Register(void); … … 68 81 LANGID COMCTL32_uiLang = MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL); 69 82 HBRUSH COMCTL32_hPattern55AABrush = (HANDLE)NULL; 83 COMCTL32_SysColor comctl32_color; 70 84 71 85 static HBITMAP COMCTL32_hPattern55AABitmap = (HANDLE)NULL; … … 111 125 COMCTL32_hPattern55AABitmap = CreateBitmap (8, 8, 1, 1, wPattern55AA); 112 126 COMCTL32_hPattern55AABrush = CreatePatternBrush (COMCTL32_hPattern55AABitmap); 127 128 /* Get all the colors at DLL load */ 129 COMCTL32_RefreshSysColors(); 113 130 114 131 /* register all Win95 common control classes */ … … 396 413 */ 397 414 398 VOID WINAPI 399 DrawStatusTextW (HDC hdc, LPRECT lprc, LPCWSTR text, UINT style) 415 void WINAPI DrawStatusTextW (HDC hdc, LPRECT lprc, LPCWSTR text, UINT style) 400 416 { 401 417 RECT r = *lprc; … … 403 419 404 420 if (style & SBT_POPOUT) 405 border = BDR_RAISEDOUTER;421 border = BDR_RAISEDOUTER; 406 422 else if (style & SBT_NOBORDERS) 407 border = 0;408 409 DrawEdge (hdc, &r, border, BF_RECT|BF_ADJUST |BF_MIDDLE);423 border = 0; 424 425 DrawEdge (hdc, &r, border, BF_RECT|BF_ADJUST); 410 426 411 427 /* now draw text */ 412 428 if (text) { 413 int oldbkmode = SetBkMode (hdc, TRANSPARENT); 414 r.left += 3; 415 DrawTextW (hdc, text, lstrlenW(text), 416 &r, DT_LEFT|DT_VCENTER|DT_SINGLELINE); 417 if (oldbkmode != TRANSPARENT) 429 int oldbkmode = SetBkMode (hdc, TRANSPARENT); 430 UINT align = DT_LEFT; 431 if (*text == L'\t') { 432 text++; 433 align = DT_CENTER; 434 if (*text == L'\t') { 435 text++; 436 align = DT_RIGHT; 437 } 438 } 439 r.left += 3; 440 if (style & SBT_RTLREADING) 441 FIXME("Usupported RTL style!"); 442 DrawTextW (hdc, text, -1, &r, align|DT_VCENTER|DT_SINGLELINE); 418 443 SetBkMode(hdc, oldbkmode); 419 444 } … … 437 462 */ 438 463 439 VOID WINAPI 440 DrawStatusTextA (HDC hdc, LPRECT lprc, LPCSTR text, UINT style) 464 void WINAPI DrawStatusTextA (HDC hdc, LPRECT lprc, LPCSTR text, UINT style) 441 465 { 442 466 INT len; … … 1015 1039 return hwndToolTip; 1016 1040 } 1041 1042 1043 /*********************************************************************** 1044 * COMCTL32_RefreshSysColors [NOT AN API] 1045 * 1046 * Invoked on any control recognizing a WM_SYSCOLORCHANGE message to 1047 * refresh the color values in the color structure 1048 * 1049 * PARAMS 1050 * none 1051 * 1052 * RETURNS 1053 * none 1054 */ 1055 VOID 1056 COMCTL32_RefreshSysColors(void) 1057 { 1058 comctl32_color.clrBtnHighlight = GetSysColor (COLOR_BTNHIGHLIGHT); 1059 comctl32_color.clrBtnShadow = GetSysColor (COLOR_BTNSHADOW); 1060 comctl32_color.clrBtnText = GetSysColor (COLOR_BTNTEXT); 1061 comctl32_color.clrBtnFace = GetSysColor (COLOR_BTNFACE); 1062 comctl32_color.clrHighlight = GetSysColor (COLOR_HIGHLIGHT); 1063 comctl32_color.clrHighlightText = GetSysColor (COLOR_HIGHLIGHTTEXT); 1064 comctl32_color.clr3dHilight = GetSysColor (COLOR_3DHILIGHT); 1065 comctl32_color.clr3dShadow = GetSysColor (COLOR_3DSHADOW); 1066 comctl32_color.clr3dDkShadow = GetSysColor (COLOR_3DDKSHADOW); 1067 comctl32_color.clr3dFace = GetSysColor (COLOR_3DFACE); 1068 comctl32_color.clrWindow = GetSysColor (COLOR_WINDOW); 1069 comctl32_color.clrWindowText = GetSysColor (COLOR_WINDOWTEXT); 1070 comctl32_color.clrGrayText = GetSysColor (COLOR_GRAYTEXT); 1071 comctl32_color.clrActiveCaption = GetSysColor (COLOR_ACTIVECAPTION); 1072 comctl32_color.clrInfoBk = GetSysColor (COLOR_INFOBK); 1073 comctl32_color.clrInfoText = GetSysColor (COLOR_INFOTEXT); 1074 }
Note:
See TracChangeset
for help on using the changeset viewer.