Changeset 7409 for trunk/src/user32/button.cpp
- Timestamp:
- Nov 21, 2001, 12:51:39 PM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/button.cpp
r6605 r7409 1 /* $Id: button.cpp,v 1.4 3 2001-08-29 10:37:25 phallerExp $ */1 /* $Id: button.cpp,v 1.44 2001-11-21 11:51:37 sandervl Exp $ */ 2 2 /* File: button.cpp -- Button type widgets 3 3 * … … 336 336 337 337 DefWindowProcA(hwnd,WM_SETTEXT,wParam,lParam); 338 #ifdef __WIN32OS2__ 339 BUTTONINFO* infoPtr = (BUTTONINFO*)GetInfoPtr(hwnd); 340 if ((dwStyle & 0x0f) == BS_GROUPBOX) { 341 RECT rc; 342 TEXTMETRICA tm; 343 HDC hdc = GetDC(hwnd); 344 int fh1 = 0, fh2 = 0; 345 346 // select old font (if exists) 347 if (infoPtr->hFont) { 348 SelectObject (hdc, infoPtr->hFont); 349 GetTextMetricsA (hdc, &tm); 350 fh1 = tm.tmHeight; 351 } 352 // select new font (if exists) 353 if (wParam) { 354 SelectObject (hdc, wParam); 355 GetTextMetricsA (hdc, &tm); 356 fh2 = tm.tmHeight; 357 } 358 // Erases top border line and (old) text background 359 GetClientRect(hwnd, &rc); 360 rc.bottom = rc.top + max( fh1, fh2) + 1; 361 HBRUSH hbr = GetControlBrush( hwnd, hdc, CTLCOLOR_STATIC ); 362 FillRect(hdc, &rc, hbr); 363 ReleaseDC(hwnd,hdc); 364 } 365 #endif 366 338 367 if (dwStyle & WS_VISIBLE) PAINT_BUTTON(hwnd,dwStyle & 0x0f,ODA_DRAWENTIRE); 339 368
Note:
See TracChangeset
for help on using the changeset viewer.