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

user32/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 bb116577
......@@ -1262,12 +1262,19 @@ static LRESULT LISTBOX_SetHorizontalExtent( LB_DESCR *descr, INT extent )
/***********************************************************************
* 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;
TRACE("[%p]: new column width = %d\n", descr->self, width );
descr->column_width = width;
LISTBOX_UpdatePage( descr );
RECT rect;
TRACE("[%p]: new column width = %d\n", descr->self, column_width);
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;
}
......
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