Dmitry Timoshkov : user32: Set the edit text in a combobox only if combobox has strings.
Alexandre Julliard
julliard at winehq.org
Wed Dec 19 06:58:27 CST 2007
Module: wine
Branch: master
Commit: 0e799c6d7bfefcce10323680ecd249286046cce4
URL: http://source.winehq.org/git/wine.git/?a=commit;h=0e799c6d7bfefcce10323680ecd249286046cce4
Author: Dmitry Timoshkov <dmitry at codeweavers.com>
Date: Wed Dec 19 17:36:36 2007 +0800
user32: Set the edit text in a combobox only if combobox has strings.
---
dlls/user32/combo.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/dlls/user32/combo.c b/dlls/user32/combo.c
index b846618..6f0fd84 100644
--- a/dlls/user32/combo.c
+++ b/dlls/user32/combo.c
@@ -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));
More information about the wine-cvs
mailing list