comctl32/comboex: Use cached colors for ComboEx.
This commit is contained in:
parent
1f43da01c0
commit
649e4640d1
@ -1535,11 +1535,11 @@ static LRESULT COMBOEX_DrawItem (COMBOEX_INFO *infoPtr, DRAWITEMSTRUCT const *di
|
|||||||
|
|
||||||
/* now draw the text */
|
/* now draw the text */
|
||||||
if (!IsWindowVisible (infoPtr->hwndEdit)) {
|
if (!IsWindowVisible (infoPtr->hwndEdit)) {
|
||||||
nbkc = GetSysColor ((dis->itemState & ODS_SELECTED) ?
|
nbkc = (dis->itemState & ODS_SELECTED) ?
|
||||||
COLOR_HIGHLIGHT : COLOR_WINDOW);
|
comctl32_color.clrHighlight : comctl32_color.clrWindow;
|
||||||
bkc = SetBkColor (dis->hDC, nbkc);
|
bkc = SetBkColor (dis->hDC, nbkc);
|
||||||
ntxc = GetSysColor ((dis->itemState & ODS_SELECTED) ?
|
ntxc = (dis->itemState & ODS_SELECTED) ?
|
||||||
COLOR_HIGHLIGHTTEXT : COLOR_WINDOWTEXT);
|
comctl32_color.clrHighlightText : comctl32_color.clrWindowText;
|
||||||
txc = SetTextColor (dis->hDC, ntxc);
|
txc = SetTextColor (dis->hDC, ntxc);
|
||||||
x = xbase + xioff;
|
x = xbase + xioff;
|
||||||
y = dis->rcItem.top +
|
y = dis->rcItem.top +
|
||||||
@ -1750,7 +1750,7 @@ COMBOEX_EditWndProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||||||
* The following was determined by traces of the native
|
* The following was determined by traces of the native
|
||||||
*/
|
*/
|
||||||
hDC = (HDC) wParam;
|
hDC = (HDC) wParam;
|
||||||
obkc = SetBkColor (hDC, GetSysColor (COLOR_WINDOW));
|
obkc = SetBkColor (hDC, comctl32_color.clrWindow);
|
||||||
GetClientRect (hwnd, &rect);
|
GetClientRect (hwnd, &rect);
|
||||||
TRACE("erasing (%s)\n", wine_dbgstr_rect(&rect));
|
TRACE("erasing (%s)\n", wine_dbgstr_rect(&rect));
|
||||||
ExtTextOutW (hDC, 0, 0, ETO_OPAQUE, &rect, 0, 0, 0);
|
ExtTextOutW (hDC, 0, 0, ETO_OPAQUE, &rect, 0, 0, 0);
|
||||||
@ -1953,7 +1953,7 @@ COMBOEX_ComboWndProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||||||
* The following was determined by traces of the native
|
* The following was determined by traces of the native
|
||||||
*/
|
*/
|
||||||
hDC = (HDC) wParam;
|
hDC = (HDC) wParam;
|
||||||
obkc = SetBkColor (hDC, GetSysColor (COLOR_WINDOW));
|
obkc = SetBkColor (hDC, comctl32_color.clrWindow);
|
||||||
GetClientRect (hwnd, &rect);
|
GetClientRect (hwnd, &rect);
|
||||||
TRACE("erasing (%s)\n", wine_dbgstr_rect(&rect));
|
TRACE("erasing (%s)\n", wine_dbgstr_rect(&rect));
|
||||||
ExtTextOutW (hDC, 0, 0, ETO_OPAQUE, &rect, 0, 0, 0);
|
ExtTextOutW (hDC, 0, 0, ETO_OPAQUE, &rect, 0, 0, 0);
|
||||||
@ -2320,6 +2320,10 @@ COMBOEX_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||||||
SetFocus(infoPtr->hwndCombo);
|
SetFocus(infoPtr->hwndCombo);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
case WM_SYSCOLORCHANGE:
|
||||||
|
COMCTL32_RefreshSysColors();
|
||||||
|
return 0;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
if ((uMsg >= WM_USER) && (uMsg < WM_APP) && !COMCTL32_IsReflectedMessage(uMsg))
|
if ((uMsg >= WM_USER) && (uMsg < WM_APP) && !COMCTL32_IsReflectedMessage(uMsg))
|
||||||
ERR("unknown msg %04x wp=%08lx lp=%08lx\n",uMsg,wParam,lParam);
|
ERR("unknown msg %04x wp=%08lx lp=%08lx\n",uMsg,wParam,lParam);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user