=================================================================== RCS file: /home/wine/wine/dlls/comctl32/comboex.c,v retrieving revision 1.96 diff -u -r1.96 comboex.c --- dlls/comctl32/comboex.c 25 Oct 2007 13:40:11 -0000 1.96 +++ dlls/comctl32/comboex.c 16 Nov 2007 20:42:27 -0000 @@ -1578,6 +1578,27 @@ } +static void COMBOEX_ResetContent (COMBOEX_INFO *infoPtr) +{ + if (infoPtr->items) + { + CBE_ITEMDATA *item, *next; + + item = infoPtr->items; + while (item) { + next = item->next; + COMBOEX_FreeText (item); + Free (item); + item = next; + } + infoPtr->items = 0; + } + + infoPtr->selected = -1; + infoPtr->nb_items = 0; +} + + static LRESULT COMBOEX_Destroy (COMBOEX_INFO *infoPtr) { if (infoPtr->hwndCombo) @@ -1586,18 +1607,7 @@ Free (infoPtr->edit); infoPtr->edit = 0; - if (infoPtr->items) { - CBE_ITEMDATA *item, *next; - - item = infoPtr->items; - while (item) { - next = item->next; - COMBOEX_FreeText (item); - Free (item); - item = next; - } - infoPtr->items = 0; - } + COMBOEX_ResetContent (infoPtr); if (infoPtr->defaultFont) DeleteObject (infoPtr->defaultFont); @@ -2234,12 +2244,15 @@ case CB_GETLBTEXTLEN: return COMBOEX_GetListboxText(infoPtr, wParam, NULL); + case CB_RESETCONTENT: + COMBOEX_ResetContent(infoPtr); + /* fall through */ + /* Combo messages we are not sure if we need to process or just forward */ case CB_GETDROPPEDCONTROLRECT: case CB_GETITEMHEIGHT: case CB_GETEXTENDEDUI: case CB_LIMITTEXT: - case CB_RESETCONTENT: case CB_SELECTSTRING: /* Combo messages OK to just forward to the regular COMBO */