When combobox selection changes, update its edit box accordingly.

This commit is contained in:
Dmitry Timoshkov 1999-11-28 19:45:58 +00:00 committed by Alexandre Julliard
parent e0f493e5b0
commit f4a27b8d41
1 changed files with 12 additions and 2 deletions

View File

@ -1460,8 +1460,15 @@ static LRESULT COMBO_Command( LPHEADCOMBO lphc, WPARAM wParam, HWND hWnd )
CBRollUp( lphc, (HIWORD(wParam) == LBN_SELCHANGE), TRUE );
else lphc->wState &= ~CBF_NOROLLUP;
if( lphc->wState & CBF_EDIT )
{
INT index = SendMessageA(lphc->hWndLBox, LB_GETCURSEL, 0, 0);
CBUpdateEdit( lphc, index );
}
else
InvalidateRect(CB_HWND(lphc), &lphc->textRect, TRUE);
CB_NOTIFY( lphc, CBN_SELCHANGE );
InvalidateRect(CB_HWND(lphc), &lphc->textRect, TRUE);
/* fall through */
case LBN_SETFOCUS:
@ -2078,7 +2085,10 @@ static inline LRESULT WINAPI ComboWndProc_locked( WND* pWnd, UINT message,
if( lphc->wState & CBF_SELCHANGE )
{
/* no LBN_SELCHANGE in this case, update manually */
InvalidateRect(CB_HWND(lphc), &lphc->textRect, TRUE);
if( lphc->wState & CBF_EDIT )
CBUpdateEdit( lphc, (INT)wParam );
else
InvalidateRect(CB_HWND(lphc), &lphc->textRect, TRUE);
lphc->wState &= ~CBF_SELCHANGE;
}
return lParam;