use GetWindowElementPixelEx instead of GetWindowElementPixel or GetWindowElementColor

This commit is contained in:
Vincent Wei
2020-02-12 13:26:01 +08:00
parent 575ef72246
commit df2d74fb0a
53 changed files with 252 additions and 211 deletions
+5 -3
View File
@@ -79,7 +79,8 @@ BOOL RegisterAnimationControl (void)
#ifdef _MGSCHEMA_COMPOSITING
WndClass.dwBkColor = GetWindowElementAttr (HWND_NULL, WE_BGC_WINDOW);
#else
WndClass.iBkColor = GetWindowElementPixel (HWND_NULL, WE_BGC_WINDOW);
WndClass.iBkColor =
GetWindowElementPixelEx (HWND_NULL, HDC_SCREEN, WE_BGC_WINDOW);
#endif
WndClass.WinProc = AnimationCtrlProc;
@@ -295,10 +296,11 @@ static void setup_anim_mem_dc (HWND hwnd, ANIMATIONINFO* anim_info)
if (GetWindowStyle (hwnd) & ANS_WINBGC) {
if (hwnd != HWND_NULL) {
bk_pixel = GetWindowElementPixel (hwnd, WE_BGC_WINDOW);
bk_pixel = GetWindowElementPixelEx (hwnd, hdc, WE_BGC_WINDOW);
}
else {
bk_pixel = GetWindowElementPixel (HWND_DESKTOP, WE_BGC_DESKTOP);
bk_pixel = GetWindowElementPixelEx (HWND_DESKTOP,
hdc, WE_BGC_DESKTOP);
}
}
else {
+2 -2
View File
@@ -85,8 +85,8 @@ BOOL RegisterCoolBarControl (void)
WndClass.dwBkColor = GetWindowElementAttr (HWND_NULL,
WE_MAINC_THREED_BODY);
#else
WndClass.iBkColor = GetWindowElementPixel (HWND_DESKTOP,
WE_MAINC_THREED_BODY);
WndClass.iBkColor = GetWindowElementPixelEx (HWND_DESKTOP,
HDC_SCREEN, WE_MAINC_THREED_BODY);
#endif
WndClass.WinProc = CoolBarCtrlProc;
+2 -1
View File
@@ -2532,7 +2532,8 @@ BOOL RegisterGridViewControl (void)
#ifdef _MGSCHEMA_COMPOSITING
WndClass.dwBkColor = GetWindowElementAttr (HWND_NULL, WE_BGC_WINDOW);
#else
WndClass.iBkColor = GetWindowElementPixel (HWND_NULL, WE_BGC_WINDOW);
WndClass.iBkColor =
GetWindowElementPixelEx (HWND_NULL, HDC_SCREEN, WE_BGC_WINDOW);
#endif
WndClass.WinProc = GridViewCtrlProc;
-24
View File
@@ -503,15 +503,11 @@ void GridCellTypeTableHeader_get_format(gvGridCellData* cell, HWND hWnd, HDC hdc
memset(format, 0, sizeof(GridCellFormat));
format->mask = 0;
//format->color_bg = GetWindowElementColor (BKC_BUTTON_DEF);
//format->hl_color_bg = GetWindowElementColor (BKC_HILIGHT_NORMAL);
format->color_bg = GetWindowElementPixelEx(hWnd, hdc, WE_MAINC_THREED_BODY);
format->hl_color_bg = GetWindowElementPixelEx(hWnd, hdc, WE_BGC_HIGHLIGHT_ITEM);
if(cell->mask & GVITEM_BGCOLOR)
format->color_bg = format->hl_color_bg = cell->data.header.color_bg;
//format->color_fg = GetWindowElementColor (FGC_BUTTON_NORMAL);
//format->hl_color_fg = GetWindowElementColor (FGC_HILIGHT_NORMAL);
format->color_fg = GetWindowElementPixelEx(hWnd, hdc, WE_FGC_THREED_BODY);
format->hl_color_fg = GetWindowElementPixelEx(hWnd, hdc, WE_FGC_HIGHLIGHT_ITEM);
if(cell->mask & GVITEM_FGCOLOR)
@@ -709,15 +705,11 @@ void GridCellTypeHeader_get_format(gvGridCellData* cell, HWND hWnd, HDC hdc, Gri
memset(format, 0, sizeof(GridCellFormat));
format->mask = 0;
// format->color_bg = GetWindowElementColor (BKC_BUTTON_DEF);
// format->hl_color_bg = GetWindowElementColor (BKC_HILIGHT_NORMAL);
format->color_bg = GetWindowElementPixelEx(hWnd, hdc, WE_MAINC_THREED_BODY);
format->hl_color_bg = GetWindowElementPixelEx(hWnd, hdc, WE_BGC_HIGHLIGHT_ITEM);
if(cell->mask & GVITEM_BGCOLOR)
format->color_bg = format->hl_color_bg = cell->data.header.color_bg;
//format->color_fg = GetWindowElementColor (FGC_BUTTON_NORMAL);
//format->hl_color_fg = GetWindowElementColor (FGC_HILIGHT_NORMAL);
format->color_fg = GetWindowElementPixelEx(hWnd, hdc, WE_FGC_THREED_BODY);
format->hl_color_fg = GetWindowElementPixelEx(hWnd, hdc, WE_FGC_THREED_BODY);
if(cell->mask & GVITEM_FGCOLOR)
@@ -870,8 +862,6 @@ void GridCellTypeText_get_format(gvGridCellData* cell, HWND hWnd, HDC hdc, GridC
memset(format, 0, sizeof(GridCellFormat));
format->mask = 0;
// format->color_bg = GetWindowElementColor (BKC_EDIT_DEF);
// format->hl_color_bg = GetWindowElementColor (BKC_HILIGHT_NORMAL);
format->color_bg = GetWindowElementPixelEx(hWnd, hdc, WE_BGC_WINDOW);
format->hl_color_bg = GetWindowElementPixelEx(hWnd, hdc, WE_BGC_HIGHLIGHT_ITEM);
if(cell->mask & GVITEM_BGCOLOR) {
@@ -879,8 +869,6 @@ void GridCellTypeText_get_format(gvGridCellData* cell, HWND hWnd, HDC hdc, GridC
format->hl_color_bg = ~cell->data.text.color_bg;
}
// format->color_fg = GetWindowElementColor (FGC_CONTROL_NORMAL);
// format->hl_color_fg = GetWindowElementColor (FGC_HILIGHT_NORMAL);
format->color_fg = GetWindowElementPixelEx(hWnd, hdc, WE_FGC_WINDOW);
format->hl_color_fg = GetWindowElementPixelEx(hWnd, hdc, WE_FGC_HIGHLIGHT_ITEM);
if(cell->mask & GVITEM_FGCOLOR) {
@@ -1133,8 +1121,6 @@ void GridCellTypeNumber_get_format(gvGridCellData* cell, HWND hWnd, HDC hdc, Gri
memset(format, 0, sizeof(GridCellFormat));
format->mask = 0;
// format->color_bg = GetWindowElementColor (BKC_EDIT_DEF);
// format->hl_color_bg = GetWindowElementColor (BKC_HILIGHT_NORMAL);
format->color_bg = GetWindowElementPixelEx(hWnd, hdc, WE_BGC_WINDOW);
format->hl_color_bg = GetWindowElementPixelEx(hWnd, hdc, WE_BGC_HIGHLIGHT_ITEM);
if(cell->mask & GVITEM_BGCOLOR) {
@@ -1142,8 +1128,6 @@ void GridCellTypeNumber_get_format(gvGridCellData* cell, HWND hWnd, HDC hdc, Gri
format->hl_color_bg = ~cell->data.number.color_bg;
}
// format->color_fg = GetWindowElementColor (FGC_CONTROL_NORMAL);
// format->hl_color_fg = GetWindowElementColor (FGC_HILIGHT_NORMAL);
format->color_fg = GetWindowElementPixelEx(hWnd, hdc, WE_FGC_WINDOW);
format->hl_color_fg = GetWindowElementPixelEx(hWnd, hdc, WE_FGC_HIGHLIGHT_ITEM);
if(cell->mask & GVITEM_FGCOLOR) {
@@ -1315,8 +1299,6 @@ void GridCellTypeCheckBox_get_format(gvGridCellData* cell, HWND hWnd, HDC hdc, G
memset(format, 0, sizeof(GridCellFormat));
format->mask = 0;
//format->color_bg = GetWindowElementColor (BKC_CONTROL_DEF);
//format->hl_color_bg = GetWindowElementColor (BKC_HILIGHT_NORMAL);
format->color_bg = GetWindowElementPixelEx(hWnd, hdc, WE_MAINC_THREED_BODY);
format->hl_color_bg = GetWindowElementPixelEx(hWnd, hdc, WE_BGC_HIGHLIGHT_ITEM);
if(cell->mask & GVITEM_BGCOLOR) {
@@ -1324,8 +1306,6 @@ void GridCellTypeCheckBox_get_format(gvGridCellData* cell, HWND hWnd, HDC hdc, G
format->hl_color_bg = ~cell->data.checkbox.color_bg;
}
//format->color_fg = GetWindowElementColor (FGC_CONTROL_NORMAL);
//format->hl_color_fg = GetWindowElementColor (FGC_HILIGHT_NORMAL);
format->color_fg = GetWindowElementPixelEx(hWnd, hdc, WE_FGC_THREED_BODY);
format->hl_color_fg = GetWindowElementPixelEx(hWnd, hdc, WE_FGC_HIGHLIGHT_ITEM);
if(cell->mask & GVITEM_FGCOLOR) {
@@ -1582,8 +1562,6 @@ void GridCellTypeSelection_get_format(gvGridCellData* cell, HWND hWnd, HDC hdc,
memset(format, 0, sizeof(GridCellFormat));
format->mask = 0;
//format->color_bg = GetWindowElementColor (BKC_CONTROL_DEF);
//format->hl_color_bg = GetWindowElementColor (BKC_HILIGHT_NORMAL);
format->color_bg = GetWindowElementPixelEx(hWnd, hdc, WE_MAINC_THREED_BODY);
format->hl_color_bg = GetWindowElementPixelEx(hWnd, hdc, WE_BGC_HIGHLIGHT_ITEM);
if(cell->mask & GVITEM_BGCOLOR) {
@@ -1591,8 +1569,6 @@ void GridCellTypeSelection_get_format(gvGridCellData* cell, HWND hWnd, HDC hdc,
format->hl_color_bg = ~cell->data.selection.color_bg;
}
//format->color_fg = GetWindowElementColor (FGC_CONTROL_NORMAL);
//format->hl_color_fg = GetWindowElementColor (FGC_HILIGHT_NORMAL);
format->color_fg = GetWindowElementPixelEx(hWnd, hdc, WE_FGC_THREED_BODY);
format->hl_color_fg = GetWindowElementPixelEx(hWnd, hdc, WE_FGC_HIGHLIGHT_ITEM);
if(cell->mask & GVITEM_FGCOLOR) {
+4 -3
View File
@@ -380,12 +380,12 @@ static void ivDrawItem (HWND hWnd, GHANDLE hivi, HDC hdc, RECT *rcDraw)
SetBkMode (hdc, BM_TRANSPARENT);
if (iconview_is_item_hilight(hWnd, hivi)) {
SetTextColor (hdc, GetWindowElementPixel (hWnd, WE_FGC_HIGHLIGHT_ITEM));
SetTextColor (hdc, GetWindowElementPixelEx (hWnd, hdc, WE_FGC_HIGHLIGHT_ITEM));
win_info->we_rdr->draw_hilite_item (hWnd, hdc, rcDraw,
GetWindowElementAttr (hWnd, WE_BGC_HIGHLIGHT_ITEM));
}
else {
SetTextColor (hdc, GetWindowElementPixel (hWnd, WE_FGC_WINDOW));
SetTextColor (hdc, GetWindowElementPixelEx (hWnd, hdc, WE_FGC_WINDOW));
// win_info->we_rdr->draw_normal_item (hWnd, hdc, rcDraw,
// GetWindowElementAttr (hWnd, WE_BGC_WINDOW));
}
@@ -726,7 +726,8 @@ BOOL RegisterIconViewControl (void)
#ifdef _MGSCHEMA_COMPOSITING
WndClass.dwBkColor = GetWindowElementAttr (HWND_NULL, WE_BGC_WINDOW);
#else
WndClass.iBkColor = GetWindowElementPixel (HWND_NULL, WE_BGC_WINDOW);
WndClass.iBkColor =
GetWindowElementPixelEx (HWND_NULL, HDC_SCREEN, WE_BGC_WINDOW);
#endif
WndClass.WinProc = IconViewCtrlProc;
+5 -4
View File
@@ -1290,9 +1290,9 @@ static void setup_color (HWND hWnd, PLVDATA plvdata)
{
int color;
color = (GetFocusChild(GetParent(hWnd)) == hWnd) ?
WE_BGC_SELECTED_ITEM: WE_BGC_SELECTED_LOSTFOCUS;
plvdata->bkc_selected = GetWindowElementPixel (hWnd, color);
color = (GetFocusChild (GetParent(hWnd)) == hWnd) ?
WE_BGC_SELECTED_ITEM : WE_BGC_SELECTED_LOSTFOCUS;
plvdata->bkc_selected = GetWindowElementPixelEx (hWnd, HDC_INVALID, color);
}
static SVITEMOPS listview_iops =
@@ -2202,7 +2202,8 @@ BOOL RegisterListViewControl (void)
#ifdef _MGSCHEMA_COMPOSITING
WndClass.dwBkColor = GetWindowElementAttr (HWND_NULL, WE_BGC_WINDOW);
#else
WndClass.iBkColor = GetWindowElementPixel (HWND_NULL, WE_BGC_WINDOW);
WndClass.iBkColor =
GetWindowElementPixelEx (HWND_NULL, HDC_SCREEN, WE_BGC_WINDOW);
#endif
WndClass.WinProc = ListViewCtrlProc;
+24 -22
View File
@@ -95,22 +95,22 @@
#define ARROW_BORDER 10
// color info
#define MCCLR_DF_TITLEBK GetWindowElementPixel(hWnd, WE_MAINC_THREED_BODY)
#define MCCLR_DF_TITLETEXT GetWindowElementPixel(hWnd, WE_FGC_THREED_BODY)
#define MCCLR_DF_TITLEBK GetWindowElementPixelEx(hWnd, HDC_INVALID, WE_MAINC_THREED_BODY)
#define MCCLR_DF_TITLETEXT GetWindowElementPixelEx(hWnd, HDC_INVALID, WE_FGC_THREED_BODY)
#define MCCLR_DF_ARROW GetWindowElementPixel(hWnd, WE_FGC_WINDOW)
#define MCCLR_DF_ARROWHIBK GetWindowElementPixel(hWnd, WE_BGC_WINDOW)
#define MCCLR_DF_ARROW GetWindowElementPixelEx(hWnd, HDC_INVALID, WE_FGC_WINDOW)
#define MCCLR_DF_ARROWHIBK GetWindowElementPixelEx(hWnd, HDC_INVALID, WE_BGC_WINDOW)
#define MCCLR_DF_DAYBK GetWindowElementPixel(hWnd, WE_BGC_WINDOW)
#define MCCLR_DF_DAYTEXT GetWindowElementPixel(hWnd, WE_FGC_WINDOW)
#define MCCLR_DF_DAYBK GetWindowElementPixelEx(hWnd, HDC_INVALID, WE_BGC_WINDOW)
#define MCCLR_DF_DAYTEXT GetWindowElementPixelEx(hWnd, HDC_INVALID, WE_FGC_WINDOW)
#define MCCLR_DF_DAYHIBK GetWindowElementPixel(hWnd, WE_BGC_HIGHLIGHT_ITEM)
#define MCCLR_DF_DAYHITEXT GetWindowElementPixel(hWnd, WE_FGC_HIGHLIGHT_ITEM)
#define MCCLR_DF_DAYHIBK GetWindowElementPixelEx(hWnd, HDC_INVALID, WE_BGC_HIGHLIGHT_ITEM)
#define MCCLR_DF_DAYHITEXT GetWindowElementPixelEx(hWnd, HDC_INVALID, WE_FGC_HIGHLIGHT_ITEM)
#define MCCLR_DF_TRAILINGTEXT GetWindowElementPixel(hWnd, WE_FGC_DISABLED_ITEM)
#define MCCLR_DF_TRAILINGTEXT GetWindowElementPixelEx(hWnd, HDC_INVALID, WE_FGC_DISABLED_ITEM)
#define MCCLR_DF_WEEKCAPTBK GetWindowElementPixel(hWnd, WE_BGC_HIGHLIGHT_ITEM)
#define MCCLR_DF_WEEKCAPTTEXT GetWindowElementPixel(hWnd, WE_FGC_HIGHLIGHT_ITEM)
#define MCCLR_DF_WEEKCAPTBK GetWindowElementPixelEx(hWnd, HDC_INVALID, WE_BGC_HIGHLIGHT_ITEM)
#define MCCLR_DF_WEEKCAPTTEXT GetWindowElementPixelEx(hWnd, HDC_INVALID, WE_FGC_HIGHLIGHT_ITEM)
static LRESULT MonthCalendarCtrlProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
@@ -125,7 +125,8 @@ BOOL RegisterMonthCalendarControl (void)
#ifdef _MGSCHEMA_COMPOSITING
WndClass.dwBkColor = GetWindowElementAttr (HWND_NULL, WE_BGC_WINDOW);
#else
WndClass.iBkColor = GetWindowElementPixel (HWND_DESKTOP, WE_BGC_WINDOW);
WndClass.iBkColor =
GetWindowElementPixelEx (HWND_DESKTOP, HDC_SCREEN, WE_BGC_WINDOW);
#endif
WndClass.WinProc = MonthCalendarCtrlProc;
@@ -439,7 +440,7 @@ static void mcHilightRect (HWND hWnd, PMONCALDDATA mc_data, HDC hdc, RECT* prcIt
item_w = prcItem->right - prcItem->left;
item_h = prcItem->bottom - prcItem->top;
FillBox (hdc, prcItem->left, prcItem->top, item_w, item_h);
SetPenColor(hdc, GetWindowElementPixel (hWnd, WE_MAINC_THREED_BODY));
SetPenColor(hdc, GetWindowElementPixelEx (hWnd, hdc, WE_MAINC_THREED_BODY));
Rectangle (hdc, prcItem->left, prcItem->top, prcItem->left+item_w-1, prcItem->top+item_h-1);
if (day < 10)
sprintf (daytext, " %d", day);
@@ -515,7 +516,8 @@ static void mcDrawMonthDay (HWND hWnd, HDC hdc, RECT* prcMDay, PMONCALDDATA mc_d
FillBox (hdc, rcMonthDay.left, rcMonthDay.top,
mc_data->item_w, mc_data->item_h);
SetPenColor(hdc, GetWindowElementPixel (hWnd, WE_MAINC_THREED_BODY));
SetPenColor(hdc,
GetWindowElementPixelEx (hWnd, hdc, WE_MAINC_THREED_BODY));
Rectangle (hdc, rcMonthDay.left, rcMonthDay.top,
rcMonthDay.left+mc_data->item_w-1 ,
rcMonthDay.top+mc_data->item_h-1);
@@ -780,16 +782,16 @@ static BOOL mcInitMonthCalendarData (HWND hWnd, MONCALDDATA* mc_data)
// color info
pmcci = (PMCCOLORINFO) mc_data->dwClrData;
pmcci->clr_titlebk = MCCLR_DF_TITLEBK;
pmcci->clr_titletext = MCCLR_DF_TITLETEXT;
pmcci->clr_arrow = MCCLR_DF_ARROW;
pmcci->clr_arrowHibk = MCCLR_DF_ARROWHIBK;
pmcci->clr_titlebk = MCCLR_DF_TITLEBK;
pmcci->clr_titletext = MCCLR_DF_TITLETEXT;
pmcci->clr_arrow = MCCLR_DF_ARROW;
pmcci->clr_arrowHibk = MCCLR_DF_ARROWHIBK;
pmcci->clr_daybk = MCCLR_DF_DAYBK;
pmcci->clr_dayHibk = MCCLR_DF_DAYHIBK;
pmcci->clr_daytext = MCCLR_DF_DAYTEXT;
pmcci->clr_trailingtext = MCCLR_DF_TRAILINGTEXT;
pmcci->clr_dayHibk = MCCLR_DF_DAYHIBK;
pmcci->clr_daytext = MCCLR_DF_DAYTEXT;
pmcci->clr_trailingtext = MCCLR_DF_TRAILINGTEXT;
pmcci->clr_dayHitext = MCCLR_DF_DAYHITEXT;
pmcci->clr_weekcaptbk = MCCLR_DF_WEEKCAPTBK;
pmcci->clr_weekcaptbk = MCCLR_DF_WEEKCAPTBK;
pmcci->clr_weekcapttext = MCCLR_DF_WEEKCAPTTEXT;
mc_data->customed_day = 0;
+2 -1
View File
@@ -414,7 +414,8 @@ BOOL RegisterSpinControl (void)
#ifdef _MGSCHEMA_COMPOSITING
WndClass.dwBkColor = GetWindowElementAttr (HWND_NULL, WE_BGC_WINDOW);
#else
WndClass.iBkColor = GetWindowElementPixel (HWND_NULL, WE_BGC_WINDOW);
WndClass.iBkColor =
GetWindowElementPixelEx (HWND_NULL, HDC_SCREEN, WE_BGC_WINDOW);
#endif
WndClass.WinProc = SpinCtrlProc;
+5 -4
View File
@@ -115,7 +115,8 @@ BOOL RegisterTreeViewControl (void)
#ifdef _MGSCHEMA_COMPOSITING
WndClass.dwBkColor = GetWindowElementAttr (HWND_NULL, WE_BGC_WINDOW);
#else
WndClass.iBkColor = GetWindowElementPixel (HWND_NULL, WE_BGC_WINDOW);
WndClass.iBkColor =
GetWindowElementPixelEx (HWND_NULL, HDC_SCREEN, WE_BGC_WINDOW);
#endif
WndClass.WinProc = TreeViewCtrlProc;
@@ -652,8 +653,8 @@ static void tvDrawItem (HWND hWnd, HDC hdc, PTVDATA pData, int centerX, int cent
if (p->dwFlags & TVIF_SELECTED) {
SetBkMode (hdc, BM_OPAQUE);
SetBkColor (hdc, GetWindowElementColorEx (hWnd, BKC_HILIGHT_NORMAL));
SetTextColor (hdc, GetWindowElementColorEx (hWnd, FGC_HILIGHT_NORMAL));
SetBkColor (hdc, GetWindowElementPixelEx (hWnd, hdc, BKC_HILIGHT_NORMAL));
SetTextColor (hdc, GetWindowElementPixelEx (hWnd, hdc, FGC_HILIGHT_NORMAL));
TextOut (hdc, centerX, centerY - (h>>1), p->text);
#ifndef _GRAY_SCREEN
if (pData->dwStyle & TVS_FOCUS) {
@@ -665,7 +666,7 @@ static void tvDrawItem (HWND hWnd, HDC hdc, PTVDATA pData, int centerX, int cent
} else {
SetBkMode (hdc, BM_TRANSPARENT);
SetBkColor (hdc, GetWindowBkColor (hWnd));
SetTextColor (hdc, GetWindowElementColorEx (hWnd, FGC_CONTROL_NORMAL));
SetTextColor (hdc, GetWindowElementPixelEx (hWnd, hdc, FGC_CONTROL_NORMAL));
TextOut (hdc, centerX, centerY - (h>>1), p->text);
}
}
+5 -4
View File
@@ -87,7 +87,8 @@ BOOL RegisterTreeViewRdrControl (void)
#ifdef _MGSCHEMA_COMPOSITING
WndClass.dwBkColor = GetWindowElementAttr (HWND_NULL, WE_BGC_WINDOW);
#else
WndClass.iBkColor = GetWindowElementPixel (HWND_NULL, WE_BGC_WINDOW);
WndClass.iBkColor =
GetWindowElementPixelEx (HWND_NULL, HDC_SCREEN, WE_BGC_WINDOW);
#endif
WndClass.WinProc = TreeViewCtrlProc;
@@ -626,8 +627,8 @@ static void tvDrawItem (HWND hWnd, HDC hdc, PTVDATA pData, int centerX,
if (p->dwFlags & TVIF_SELECTED)
{
SetBkMode (hdc, BM_OPAQUE);
SetBkColor (hdc, GetWindowElementPixel (hWnd, WE_BGC_HIGHLIGHT_ITEM));
SetTextColor (hdc, GetWindowElementPixel (hWnd, WE_FGC_HIGHLIGHT_ITEM));
SetBkColor (hdc, GetWindowElementPixelEx (hWnd, hdc, WE_BGC_HIGHLIGHT_ITEM));
SetTextColor (hdc, GetWindowElementPixelEx (hWnd, hdc, WE_FGC_HIGHLIGHT_ITEM));
rc.left = centerX;
rc.top = centerY - (h>>1);
@@ -644,7 +645,7 @@ static void tvDrawItem (HWND hWnd, HDC hdc, PTVDATA pData, int centerX,
} else {
SetBkMode (hdc, BM_TRANSPARENT);
SetBkColor (hdc, GetWindowBkColor (hWnd));
SetTextColor (hdc, GetWindowElementPixel (hWnd, WE_FGC_WINDOW));
SetTextColor (hdc, GetWindowElementPixelEx (hWnd, hdc, WE_FGC_WINDOW));
TextOut (hdc, centerX, centerY - (h>>1), p->text);
}