Changeset 2394 for trunk/src/user32/win32wbasepaint.cpp
- Timestamp:
- Jan 9, 2000, 8:46:27 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/win32wbasepaint.cpp
r2391 r2394 1 /* $Id: win32wbasepaint.cpp,v 1. 4 2000-01-09 17:57:50sandervl Exp $ */1 /* $Id: win32wbasepaint.cpp,v 1.5 2000-01-09 19:46:27 sandervl Exp $ */ 2 2 /* 3 3 * Win32 Window Base Class for OS/2 … … 710 710 r.bottom--; 711 711 712 FillRect( hdc, &r, GetSysColorBrush(active ? COLOR_ACTIVECAPTION : COLOR_INACTIVECAPTION) ); 712 //CB: todo: 713 //COLOR_GRADIENTACTIVECAPTION 714 //COLOR_GRADIENTINACTIVECAPTION 715 //-> end color 716 717 if (SYSCOLOR_GetUseWinColors()) 718 { 719 COLORREF startColor = GetSysColor(active ? COLOR_ACTIVECAPTION:COLOR_INACTIVECAPTION),endColor = GetSysColor(active ? COLOR_GRADIENTACTIVECAPTION:COLOR_GRADIENTINACTIVECAPTION); 720 721 if (startColor == endColor) 722 FillRect(hdc,&r,GetSysColorBrush(startColor)); 723 else 724 { 725 INT rDiff = GetRValue(endColor)-GetRValue(startColor); 726 INT gDiff = GetGValue(endColor)-GetGValue(startColor); 727 INT bDiff = GetBValue(endColor)-GetBValue(startColor); 728 INT steps = MAX(MAX(abs(rDiff),abs(gDiff)),abs(bDiff)); 729 INT w = r.right-r.left; 730 RECT r2; 731 732 if (w < steps) steps = w; 733 r2.left = r2.right = r.left; 734 r2.top = r.top; 735 r2.bottom = r.bottom; 736 for (INT x = 0;x <= steps;x++) 737 { 738 COLORREF color = RGB(GetRValue(startColor)+rDiff*x/steps,GetGValue(startColor)+gDiff*x/steps,GetBValue(startColor)+bDiff*x/steps); 739 HBRUSH brush = CreateSolidBrush(color); 740 741 r2.left = r2.right; 742 r2.right = r.left+w*x/steps; 743 FillRect(hdc,&r2,brush); 744 DeleteObject(brush); 745 } 746 } 747 } 748 else FillRect(hdc,&r,GetSysColorBrush(active ? COLOR_ACTIVECAPTION:COLOR_INACTIVECAPTION)); 713 749 714 750 if (!hbitmapClose)
Note:
See TracChangeset
for help on using the changeset viewer.