On November 17, 2003 07:33 am, Huw D M Davies wrote:
LISTBOX_RepaintItem( hwnd, descr, i, ODA_SELECT );
if (!IS_OWNERDRAW(descr))
LISTBOX_RepaintItem( hwnd, descr, i, ODA_SELECT );
else
LISTBOX_InvalidateItemRect(hwnd, descr, i);
Why not simply invalidate rect always, even when not in owner draw?
On Mon, Nov 17, 2003 at 09:59:20AM -0500, Dimitrie O. Paun wrote:
Why not simply invalidate rect always, even when not in owner draw?
Works for me.
Aric Stewart aric@codeweavers.com invalidate items on setselection.
On November 17, 2003 10:16 am, Huw D M Davies wrote:
- if (LISTBOX_GetItemRect( descr, index, &rect ) == 1)
OK, I very sorry to nick pick so much, but this test is not only strange in C, but it's a bit dangerous as well, since in the future LISTBOX_GetItemRect may return something >1 for TRUE, and things will break silently. Why not the more common: if (LISTBOX_GetItemRect( descr, index, &rect ))
On Mon, Nov 17, 2003 at 10:33:33AM -0500, Dimitrie O. Paun wrote:
On November 17, 2003 10:16 am, Huw D M Davies wrote:
- if (LISTBOX_GetItemRect( descr, index, &rect ) == 1)
OK, I very sorry to nick pick so much, but this test is not only strange in C, but it's a bit dangerous as well, since in the future LISTBOX_GetItemRect may return something >1 for TRUE, and things will break silently. Why not the more common: if (LISTBOX_GetItemRect( descr, index, &rect ))
I guess that's because there are several other calls to LISTBOX_GetItemRect that have the same syntax. Note that LISTBOX_GetItemRect can return -1 on error.
Huw.
On November 17, 2003 10:47 am, Huw D M Davies wrote:
I guess that's because there are several other calls to LISTBOX_GetItemRect that have the same syntax. Note that LISTBOX_GetItemRect can return -1 on error.
Of course, my bad, I've commented without actually checking out the code. Please disregard my comments.
I've noticed a bit at line 437 that we may replace with a call to the new function. The only difference is that we'd erase the background in the new case which may create flicker. Oh well, it needs some experimentation I guess.