comctl32/header: Add support for HDS_FLAT style.

This commit is contained in:
Nikolay Sivov 2009-06-21 01:25:03 +04:00 committed by Alexandre Julliard
parent 85224d7f17
commit 25d916e73a

View File

@ -330,6 +330,8 @@ HEADER_DrawItem (HEADER_INFO *infoPtr, HDC hdc, INT iItem, BOOL bHotTrack, LRESU
else {
HBRUSH hbr;
if (!(infoPtr->dwStyle & HDS_FLAT))
{
if (infoPtr->dwStyle & HDS_BUTTONS) {
if (phdi->bDown) {
DrawEdge (hdc, &r, BDR_RAISEDOUTER,
@ -341,6 +343,7 @@ HEADER_DrawItem (HEADER_INFO *infoPtr, HDC hdc, INT iItem, BOOL bHotTrack, LRESU
}
else
DrawEdge (hdc, &r, EDGE_ETCHED, BF_BOTTOM | BF_RIGHT | BF_ADJUST);
}
hbr = CreateSolidBrush(GetBkColor(hdc));
FillRect(hdc, &r, hbr);
@ -547,7 +550,12 @@ HEADER_Refresh (HEADER_INFO *infoPtr, HDC hdc)
if (theme != NULL) {
DrawThemeBackground(theme, hdc, HP_HEADERITEM, HIS_NORMAL, &rcRest, NULL);
}
else {
else if (infoPtr->dwStyle & HDS_FLAT) {
hbrBk = GetSysColorBrush(COLOR_3DFACE);
FillRect(hdc, &rcRest, hbrBk);
}
else
{
if (infoPtr->dwStyle & HDS_BUTTONS)
DrawEdge (hdc, &rcRest, EDGE_RAISED, BF_TOP|BF_LEFT|BF_BOTTOM|BF_SOFT|BF_MIDDLE);
else