Oct. 22, 2024
7:54 a.m.
Zhiyi Zhang (@zhiyi) commented about dlls/comctl32/toolbar.c:
return -1; }
+static BOOL +TOOLBAR_CheckIndexButton (TBUTTON_INFO *btnPtr, const TOOLBAR_INFO *infoPtr, INT nIndex)
btnPtr should be of type TBUTTON_INFO **, which is pointer to a TBUTTON_INFO *. Currently, this helper doesn't set the btnPtr for the caller. Let's just return &infoPtr->buttons[nIndex] when the index is valid and NULL when it's not. And change its name to something like TOOLBAR_GetButton() -- https://gitlab.winehq.org/wine/wine/-/merge_requests/6169#note_85724