Commit bb116577 authored by Gabriel Ivăncescu's avatar Gabriel Ivăncescu Committed by Alexandre Julliard

comctl32/listbox: Update the size in SetColumnWidth before calling UpdatePage.

Some applications don't forward WM_SIZE from DefWindowProc to the control, but instead only send a LB_SETCOLUMNWIDTH message, even when the column width doesn't change (but the listbox size does). Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=22440Signed-off-by: 's avatarGabriel Ivăncescu <gabrielopcode@gmail.com> Signed-off-by: 's avatarNikolay Sivov <nsivov@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent ce11b1bf
...@@ -1257,12 +1257,19 @@ static LRESULT LISTBOX_SetHorizontalExtent( LB_DESCR *descr, INT extent ) ...@@ -1257,12 +1257,19 @@ static LRESULT LISTBOX_SetHorizontalExtent( LB_DESCR *descr, INT extent )
/*********************************************************************** /***********************************************************************
* LISTBOX_SetColumnWidth * LISTBOX_SetColumnWidth
*/ */
static LRESULT LISTBOX_SetColumnWidth( LB_DESCR *descr, INT width) static LRESULT LISTBOX_SetColumnWidth( LB_DESCR *descr, INT column_width)
{ {
if (width == descr->column_width) return LB_OKAY; RECT rect;
TRACE("[%p]: new column width = %d\n", descr->self, width );
descr->column_width = width; TRACE("[%p]: new column width = %d\n", descr->self, column_width);
LISTBOX_UpdatePage( descr );
GetClientRect(descr->self, &rect);
descr->width = rect.right - rect.left;
descr->height = rect.bottom - rect.top;
descr->column_width = column_width;
LISTBOX_UpdatePage(descr);
LISTBOX_UpdateScroll(descr);
return LB_OKAY; return LB_OKAY;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment