Changeset 4674 for trunk/src/user32/button.cpp
- Timestamp:
- Nov 22, 2000, 2:44:50 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/button.cpp
r3662 r4674 1 /* $Id: button.cpp,v 1.3 7 2000-06-07 14:51:24sandervl Exp $ */1 /* $Id: button.cpp,v 1.38 2000-11-22 13:44:49 sandervl Exp $ */ 2 2 /* File: button.cpp -- Button type widgets 3 3 * … … 21 21 #include <misc.h> 22 22 #include "initterm.h" 23 #include "syscolor.h" 23 24 24 25 #define DBG_LOCALLOG DBG_button … … 951 952 if (infoPtr->hFont) SelectObject( hDC, infoPtr->hFont ); 952 953 953 /* Something is still not right, checkboxes (and edit controls) 954 * in wsping32 have white backgrounds instead of dark grey. 955 * BUTTON_SEND_CTLCOLOR() is even worse since it returns 0 in this 956 * particular case and the background is not painted at all. 954 /* GetControlBrush16 sends WM_CTLCOLORBTN, plus it returns default brush 955 * if parent didn't return valid one. So we kill two hares at once 957 956 */ 958 //SvL: 20/09/99: This works well for us. Now the background of 959 // the dialog button strings in Solitaire is gray 960 SendMessageA(GetParent(hwnd),WM_CTLCOLORBTN,hDC,hwnd); 961 962 hBrush = GetSysColorBrush(COLOR_BTNFACE); 957 hBrush = GetControlBrush( hwnd, hDC, CTLCOLOR_BTN ); 963 958 964 959 /* In order to make things right, draw the rectangle background! */ … … 1091 1086 INT textLen; 1092 1087 char* text; 1088 HBRUSH hbr; 1093 1089 1094 1090 if (action != ODA_DRAWENTIRE) return; 1095 1091 1096 SendMessageA(GetParent(hwnd),WM_CTLCOLORBTN,hDC,hwnd); 1092 /* GroupBox acts like static control, so it sends CTLCOLORSTATIC */ 1093 hbr = GetControlBrush( hwnd, hDC, CTLCOLOR_STATIC ); 1097 1094 1098 1095 GetClientRect(hwnd,&rc); … … 1117 1114 rc.left += 10; 1118 1115 1119 if (dwStyle & WS_DISABLED) DrawDisabledText(hDC,text,&rc,format); else 1116 if (dwStyle & WS_DISABLED) { 1117 DrawDisabledText(hDC,text,&rc,format); 1118 } 1119 else 1120 1120 { 1121 SetTextColor(hDC,GetSysColor(COLOR_BTNTEXT));1122 DrawTextA(hDC,text,-1,&rc,format);1121 SetTextColor(hDC,GetSysColor(COLOR_BTNTEXT)); 1122 DrawTextA(hDC,text,-1,&rc,format); 1123 1123 } 1124 1124 … … 1143 1143 1144 1144 if (infoPtr->hFont) SelectObject( hDC, infoPtr->hFont ); 1145 hBrush = GetSysColorBrush(COLOR_BTNFACE); 1146 1145 hBrush = GetControlBrush( hwnd, hDC, CTLCOLOR_BTN ); 1146 1147 FillRect( hDC, &rc, hBrush ); 1147 1148 if ((action == ODA_FOCUS) || 1148 1149 ((action == ODA_DRAWENTIRE) && (infoPtr->state & BUTTON_HASFOCUS) && IsWindowEnabled(hwnd))) … … 1151 1152 InflateRect(&rc,-1,-1); 1152 1153 } 1153 FillRect( hDC, &rc, hBrush );1154 1154 } 1155 1155
Note:
See TracChangeset
for help on using the changeset viewer.