Esme Povirk (@madewokherd) commented about dlls/comdlg32/navbar.c:
- SendMessageW(info->fwd_btn_hwnd, WM_SETFONT, (WPARAM)gui_font, FALSE);
- icon = ImageList_GetIcon(info->icons, ILI_FORWARD, ILD_NORMAL);
- SendMessageW(info->fwd_btn_hwnd, BM_SETIMAGE, (WPARAM)IMAGE_ICON, (LPARAM)icon);
- DestroyIcon(icon);
- SetWindowLongPtrW(hwnd, 0, (DWORD_PTR)info);
- return DefWindowProcW(hwnd, msg, wparam, lparam);
+}
+static LRESULT NAVBAR_Destroy(HWND hwnd, NAVBAR_INFO *info, UINT msg, WPARAM wparam, LPARAM lparam) +{
- SetWindowLongPtrW(hwnd, 0, 0);
- ImageList_Destroy(info->icons);
- DestroyWindow(info->back_btn_hwnd);
- DestroyWindow(info->fwd_btn_hwnd);
The system will automatically destroy child windows, so I don't think this is needed.