Changeset 1203 for trunk/src/user32/static.cpp
- Timestamp:
- Oct 8, 1999, 11:26:08 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/static.cpp
r992 r1203 1 /* $Id: static.cpp,v 1. 3 1999-09-20 19:17:58 sandervlExp $ */1 /* $Id: static.cpp,v 1.4 1999-10-08 21:26:08 cbratschi Exp $ */ 2 2 /* 3 3 * Static control … … 7 7 * Copyright David W. Metcalfe, 1993 8 8 * 9 * WINE version: 990923 9 10 */ 10 11 … … 92 93 93 94 if (hBitmap && GetObjectType(hBitmap) != OBJ_BITMAP) { 94 95 95 //ERR("huh? hBitmap!=0, but not bitmap\n"); 96 return 0; 96 97 } 97 98 hOldBitmap = infoPtr->hIcon; … … 102 103 GetObjectA(hBitmap, sizeof(bm), &bm); 103 104 SetWindowPos( hwnd, 0, 0, 0, bm.bmWidth, bm.bmHeight, 104 105 SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOZORDER ); 105 106 /* CB: alternative code, if necessary 106 107 HDC hdc = GetDC(hwnd); … … 113 114 } 114 115 ReleaseDC(hwnd,hdc); 115 */ 116 116 */ 117 117 118 } 118 119 return hOldBitmap; … … 463 464 FillRect( hdc, &rc, hBrush ); 464 465 466 if (!IsWindowEnabled(hwnd)) SetTextColor(hdc,GetSysColor(COLOR_GRAYTEXT)); 467 465 468 textLen = GetWindowTextLengthA(hwnd); 466 469 if (textLen > 0) … … 545 548 if (infoPtr->hIcon) { 546 549 BITMAP bm; 547 550 SIZE sz; 548 551 549 552 if(GetObjectType(infoPtr->hIcon) != OBJ_BITMAP) 550 553 return; 551 554 if (!(hMemDC = CreateCompatibleDC( hdc ))) return; 552 553 554 555 556 557 558 555 GetObjectA(infoPtr->hIcon, sizeof(bm), &bm); 556 GetBitmapDimensionEx(infoPtr->hIcon, &sz); 557 oldbitmap = SelectObject(hMemDC, infoPtr->hIcon); 558 BitBlt(hdc, sz.cx, sz.cy, bm.bmWidth, bm.bmHeight, hMemDC, 0, 0, 559 SRCCOPY); 560 SelectObject(hMemDC, oldbitmap); 561 DeleteDC(hMemDC); 559 562 } 560 563 }
Note:
See TracChangeset
for help on using the changeset viewer.