[PATCH 1/2] comctl32/listbox: Don't update scrollbar during window creation
Fabian Maurer
dark.shadow4 at web.de
Fri Sep 14 07:29:07 CDT 2018
On Freitag, 14. September 2018 14:14:07 CEST Nikolay Sivov wrote:
> What is the issue exactly?
As the tests show, a listbox with WS_VSCROLL and height 0 has the WS_VSCROLL style set
after window creation.
However, when LISTBOX_UpdateScroll is called, this hides the scrollbar (removing the
WS_VSCROLL style) - since it's not needed when the listbox is empty.
Now, CreateWindowEx sends WM_SIZE with SIZE_RESTORED, this triggers
LISTBOX_UpdateSize which then calls LISTBOX_UpdateScroll.
CreateWindowEx also sends WM_SETFONT which will trigger a resize - leading to the same
issue.
But as the tests also show, this is only relevant during CreateWindowEx. When with listbox
empty and height 0, causing a WM_SIZE due to SetWindowPos causes the scrollbar to be
hidden.
I didn't find a better solution yet, since it indeed seems to only be problematic during
initial window creation.
FWIW, the issue is themed delphi programs, their comboboxes are *very* sensitive about
listbox height/WS_VSCROLL style when WM_NCCALCSIZE is sent.
Regards,
Fabian Maurer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20180914/c4811e24/attachment-0001.html>
More information about the wine-devel
mailing list