Changeset 7296 for trunk/src/user32/static.cpp
- Timestamp:
- Nov 7, 2001, 8:19:09 PM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/static.cpp
r5685 r7296 1 /* $Id: static.cpp,v 1.2 4 2001-05-11 08:39:44sandervl Exp $ */1 /* $Id: static.cpp,v 1.25 2001-11-07 19:19:09 sandervl Exp $ */ 2 2 /* 3 3 * Static control … … 722 722 hdc, hwnd ); 723 723 FillRect( hdc, &rc, hbrush ); 724 724 725 if (dwStyle & SS_CENTERIMAGE) 725 726 { 726 727 ICONINFO ii; 727 728 BITMAP bmp; 729 730 #if 0 731 //TODO: fill with upper left pixel of icon 732 COLORREF color; 733 734 color = GetPixel(hMemDC, 0, 0); 735 hbrush = CreateSolidBrush(color); 736 FillRect( hdc, &rc, hbrush ); 737 DeleteObject(hbrush); 738 #endif 728 739 729 740 if (!GetIconInfo(infoPtr->hIcon,&ii)) return; … … 738 749 if (ii.hbmColor) DeleteObject(ii.hbmColor); 739 750 if (ii.hbmMask) DeleteObject(ii.hbmMask); 740 } else if (infoPtr->hIcon) DrawIcon(hdc,rc.left,rc.top,infoPtr->hIcon); 751 } 752 else 753 if (infoPtr->hIcon) { 754 DrawIcon(hdc,rc.left,rc.top,infoPtr->hIcon); 755 } 741 756 } 742 757 … … 753 768 hbrush = SendMessageA( GetParent(hwnd), WM_CTLCOLORSTATIC, 754 769 hdc, hwnd ); 755 FillRect( hdc, &rc, hbrush );756 770 757 771 if (infoPtr->hIcon) … … 770 784 SIZE szbm; 771 785 SIZE szdc; 786 COLORREF color; 787 788 //SvL: Fill client area with pixel in upper left corner (SDK docs) 789 color = GetPixel(hMemDC, 0, 0); 790 hbrush = CreateSolidBrush(color); 791 FillRect( hdc, &rc, hbrush ); 792 DeleteObject(hbrush); 772 793 773 794 if(bm.bmWidth > rc.right - rc.left) … … 794 815 } 795 816 BitBlt(hdc, szdc.cx, szdc.cy, bm.bmWidth, bm.bmHeight, hMemDC, 796 szbm.cx, szbm.cy, SRCCOPY);817 szbm.cx, szbm.cy, SRCCOPY); 797 818 } 798 819 else 799 820 { 821 FillRect( hdc, &rc, hbrush ); 800 822 BitBlt(hdc, 0, 0, bm.bmWidth, bm.bmHeight, hMemDC, 0, 0, SRCCOPY); 801 823 }
Note:
See TracChangeset
for help on using the changeset viewer.