Re: [PATCH v4 0/6] MR1857: Draft: comdlg32: IFileDialog navigation bar
Esme Povirk (@madewokherd) commented about dlls/comdlg32/navbar.c:
+ menu_item.hbmpItem = HBMMENU_CALLBACK; /* see NAVBAR_OVERFLOW_DrawIcon */ + + InsertMenuItemW(info->overflow_menu, -1, TRUE, &menu_item); +} + +static void NAVBAR_OVERFLOW_Clear(NAVBAR_INFO *info) +{ + INT i, menu_item_count = GetMenuItemCount(info->overflow_menu); + MENUITEMINFOW menu_item = {0}; + + menu_item.cbSize = sizeof(MENUITEMINFOW); + menu_item.fMask = MIIM_DATA; + + for (i = 0; i < menu_item_count; i++) + { + /* deleting an item shifts further indices, so don't use `i` */ It would probably be simpler to delete the items from the end, and slightly more efficient because it removes the need to shift indices.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/1857#note_20175
participants (1)
-
Esme Povirk (@madewokherd)