| 568 | } |
| 569 | |
| 570 | void FillGradient(HDC hdc, const LPRECT lpRect, int sci1, int sci2, bool vertical) |
| 571 | { |
| 572 | if (!HasGradientCaption()) { |
| 573 | if (sci1 == COLOR_GRADIENTACTIVECAPTION) |
| 574 | sci1 = COLOR_ACTIVECAPTION; |
| 575 | if (sci1 == COLOR_GRADIENTINACTIVECAPTION) |
| 576 | sci1 = COLOR_INACTIVECAPTION; |
| 577 | } |
| 578 | if (ri::HaveMsImg()) { |
| 579 | COLORREF c1 = GetSysColor(sci1); |
| 580 | COLORREF c2 = GetSysColor(sci2); |
| 581 | FillGradientColors(hdc, lpRect, c1, c2, vertical); |
| 582 | } |
| 583 | else { |
| 584 | HBRUSH hbr = ri::GetSysColorBrush(sci1); |
| 585 | FillRect(hdc, lpRect, hbr); |
| 586 | } |
| 587 | } |
| 588 | |
| 589 | void FillGradientColors(HDC hdc, const LPRECT lpRect, COLORREF c1, COLORREF c2, bool vertical) |
| 590 | { |
no test coverage detected