Correct the test for the ODS_SELECTED bit in the WM_DRAWITEM message

handler.
This commit is contained in:
Rein Klazes 2003-12-04 21:53:14 +00:00 committed by Alexandre Julliard
parent 4c90416d40
commit c69a522e3e
1 changed files with 2 additions and 2 deletions

View File

@ -823,7 +823,7 @@ LRESULT CFn_WMDrawItem(HWND hDlg, WPARAM wParam, LPARAM lParam)
{
if (lpdi->CtlType == ODT_COMBOBOX)
{
if (lpdi->itemState ==ODS_SELECTED)
if (lpdi->itemState & ODS_SELECTED)
{
hBrush=GetSysColorBrush(COLOR_HIGHLIGHT);
oldText=SetTextColor(lpdi->hDC, GetSysColor(COLOR_HIGHLIGHTTEXT));
@ -898,7 +898,7 @@ LRESULT CFn_WMDrawItem(HWND hDlg, WPARAM wParam, LPARAM lParam)
default:
return TRUE; /* this should never happen */
}
if (lpdi->itemState == ODS_SELECTED)
if (lpdi->itemState & ODS_SELECTED)
{
SetTextColor(lpdi->hDC, oldText);
SetBkColor(lpdi->hDC, oldBk);