Commit 0e799c6d authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

user32: Set the edit text in a combobox only if combobox has strings.

parent 9e3ab87a
......@@ -1030,9 +1030,12 @@ static void CBUpdateEdit( LPHEADCOMBO lphc , INT index )
}
}
lphc->wState |= (CBF_NOEDITNOTIFY | CBF_NOLBSELECT);
SendMessageW(lphc->hWndEdit, WM_SETTEXT, 0, pText ? (LPARAM)pText : (LPARAM)empty_stringW);
lphc->wState &= ~(CBF_NOEDITNOTIFY | CBF_NOLBSELECT);
if( CB_HASSTRINGS(lphc) )
{
lphc->wState |= (CBF_NOEDITNOTIFY | CBF_NOLBSELECT);
SendMessageW(lphc->hWndEdit, WM_SETTEXT, 0, pText ? (LPARAM)pText : (LPARAM)empty_stringW);
lphc->wState &= ~(CBF_NOEDITNOTIFY | CBF_NOLBSELECT);
}
if( lphc->wState & CBF_FOCUSED )
SendMessageW(lphc->hWndEdit, EM_SETSEL, 0, (LPARAM)(-1));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment