user32: Set the edit text in a combobox only if combobox has strings
Dmitry Timoshkov
dmitry at codeweavers.com
Wed Dec 19 03:36:36 CST 2007
Hello,
this patch fixes a problem reported in the bug 10816.
Changelog:
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));
--
1.5.3.7
More information about the wine-patches
mailing list