[PATCH 1/4] shell32/autocomplete: Implement the listbox scrollbar manually

Huw Davies huw at codeweavers.com
Fri Apr 12 04:33:11 CDT 2019


On Fri, Apr 05, 2019 at 03:14:24PM +0300, Gabriel Ivăncescu wrote:
> Signed-off-by: Gabriel Ivăncescu <gabrielopcode at gmail.com>
> ---
> 
> This is a no-op patch; its purpose is to keep the next patch smaller and
> focused only on implementing the resizing grip, because IMO it was a bit
> large before I split it. Note that to avoid more pointless changes in the
> next patch, names with "grip" have been used for the scrollbar, I hope
> that's not a problem.
> 
> Some of the things are done purposefully to keep the next patch smaller, while
> they may not make sense by themselves. For example, the WM_WINDOWPOSCHANGED
> is also useful to that end.
> 
>  dlls/shell32/autocomplete.c | 132 ++++++++++++++++++++++++++++++++++--
>  1 file changed, 127 insertions(+), 5 deletions(-)
> 
> diff --git a/dlls/shell32/autocomplete.c b/dlls/shell32/autocomplete.c
> index f0777ff..38ca8ca 100644
> --- a/dlls/shell32/autocomplete.c
> +++ b/dlls/shell32/autocomplete.c

> @@ -899,8 +1010,15 @@ static void create_listbox(IAutoCompleteImpl *This)
>      }
>  
>      /* FIXME : The listbox should be resizable with the mouse. WS_THICKFRAME looks ugly */
> +    This->hwndListBoxGrip = CreateWindowExW(WS_EX_NOACTIVATE, WC_STATICW, NULL,
> +                                            WS_CHILD | WS_VISIBLE, 0, 0, grip_sz, grip_sz,
> +                                            This->hwndListBoxOwner, NULL, shell32_hInstance, NULL);
> +    if (!This->hwndListBoxGrip) goto fail;
> +

You should be able to use a SBS_SIZEBOX scrollbar for this, rather
than re-invent the wheel.

Huw.



More information about the wine-devel mailing list