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=22440 Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com> Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
ce11b1bf62
commit
bb116577a3
|
@ -1257,12 +1257,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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue