Changeset 5648 for trunk/src/user32/button.cpp
- Timestamp:
- May 3, 2001, 8:13:10 PM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/button.cpp
r4674 r5648 1 /* $Id: button.cpp,v 1.3 8 2000-11-22 13:44:49sandervl Exp $ */1 /* $Id: button.cpp,v 1.39 2001-05-03 18:13:10 sandervl Exp $ */ 2 2 /* File: button.cpp -- Button type widgets 3 3 * … … 338 338 DWORD dwStyle = GetWindowLongA(hwnd,GWL_STYLE); 339 339 340 #ifdef __WIN32OS2__ 341 if ((dwStyle & 0x0f) == BS_GROUPBOX) { 342 RECT rc; 343 TEXTMETRICA tm; 344 HDC hdc = GetDC(hwnd); 345 int fh1 = 0, fh2 = 0; 346 347 // select old font (if exists) 348 if (infoPtr->hFont) { 349 SelectObject (hdc, infoPtr->hFont); 350 GetTextMetricsA (hdc, &tm); 351 fh1 = tm.tmHeight; 352 } 353 // select new font (if exists) 354 if (wParam) { 355 SelectObject (hdc, wParam); 356 GetTextMetricsA (hdc, &tm); 357 fh2 = tm.tmHeight; 358 } 359 // Erases top border line and (old) text background 360 GetClientRect(hwnd, &rc); 361 rc.bottom = rc.top + max( fh1, fh2) + 1; 362 HBRUSH hbr = GetControlBrush( hwnd, hdc, CTLCOLOR_STATIC ); 363 FillRect(hdc, &rc, hbr); 364 ReleaseDC(hwnd,hdc); 365 } 366 #endif 367 340 368 infoPtr->hFont = (HFONT)wParam; 341 369 if (lParam && (dwStyle & WS_VISIBLE)) PAINT_BUTTON(hwnd,dwStyle & 0x0f,ODA_DRAWENTIRE);
Note:
See TracChangeset
for help on using the changeset viewer.