Combobox should clear its current selection on response to
CB_SETCURSEL(-1) message.
This commit is contained in:
parent
105b0f4e64
commit
4866ac0859
|
@ -1089,13 +1089,12 @@ static void CBUpdateEdit( LPHEADCOMBO lphc , INT index )
|
||||||
{
|
{
|
||||||
INT length;
|
INT length;
|
||||||
LPWSTR pText = NULL;
|
LPWSTR pText = NULL;
|
||||||
|
static const WCHAR empty_stringW[] = { 0 };
|
||||||
|
|
||||||
TRACE("\t %i\n", index );
|
TRACE("\t %i\n", index );
|
||||||
|
|
||||||
if( index >= 0 ) /* got an entry */
|
if( index >= 0 ) /* got an entry */
|
||||||
{
|
{
|
||||||
static const WCHAR empty_stringW[] = { 0 };
|
|
||||||
|
|
||||||
length = SendMessageW(lphc->hWndLBox, LB_GETTEXTLEN, (WPARAM)index, 0);
|
length = SendMessageW(lphc->hWndLBox, LB_GETTEXTLEN, (WPARAM)index, 0);
|
||||||
if( length )
|
if( length )
|
||||||
{
|
{
|
||||||
|
@ -1105,13 +1104,11 @@ static void CBUpdateEdit( LPHEADCOMBO lphc , INT index )
|
||||||
(WPARAM)index, (LPARAM)pText );
|
(WPARAM)index, (LPARAM)pText );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
lphc->wState |= (CBF_NOEDITNOTIFY | CBF_NOLBSELECT);
|
lphc->wState |= (CBF_NOEDITNOTIFY | CBF_NOLBSELECT);
|
||||||
SendMessageW(lphc->hWndEdit, WM_SETTEXT, 0, pText ? (LPARAM)pText : (LPARAM)empty_stringW);
|
SendMessageW(lphc->hWndEdit, WM_SETTEXT, 0, pText ? (LPARAM)pText : (LPARAM)empty_stringW);
|
||||||
lphc->wState &= ~(CBF_NOEDITNOTIFY | CBF_NOLBSELECT);
|
lphc->wState &= ~(CBF_NOEDITNOTIFY | CBF_NOLBSELECT);
|
||||||
}
|
|
||||||
else
|
|
||||||
InvalidateRect(CB_HWND(lphc), &lphc->textRect, TRUE);
|
|
||||||
|
|
||||||
if( lphc->wState & CBF_FOCUSED )
|
if( lphc->wState & CBF_FOCUSED )
|
||||||
SendMessageW(lphc->hWndEdit, EM_SETSEL, 0, (LPARAM)(-1));
|
SendMessageW(lphc->hWndEdit, EM_SETSEL, 0, (LPARAM)(-1));
|
||||||
|
|
Loading…
Reference in New Issue