[PATCH 2/3] shell32/autocomplete: Use an owner-drawn listbox for the dropdown

Huw Davies huw at codeweavers.com
Thu Mar 28 04:22:05 CDT 2019


On Wed, Mar 20, 2019 at 03:40:33PM +0200, Gabriel Ivăncescu wrote:
> Signed-off-by: Gabriel Ivăncescu <gabrielopcode at gmail.com>
> ---
> 
> This patch is needed for future patches and to implement some of the remaining
> options. Windows seems is using an owner-drawn virtual listview, and in our
> case, an owner-drawn LBS_NODATA listbox serves the same purpose (next patch).
> 
> Note that encapsulating the listbox inside a hwndListBoxOwner is needed
> regardless, because it is required to implement the resizing grip like
> on Windows, which has to be a sibling of the listbox. It cannot be made a
> child of the listbox because then it would scroll with it, and it has to
> clip against the listbox when it's a triangle (no scrollbar is visible).
> 
> I have outstanding patches that implement the grip, and this is the only
> proper way I found to implement it (I tried other methods but they didn't
> work out), so the owner window is definitely required anyway.
> 
> By the way, the LB_RESETCONTENT that's needed to prevent a very rare crash
> in ResetEnumerator is due to using listbox_strs added in this patch which
> is needed for LBS_NODATA. For this patch, it's just used for drawing,
> but in the next patch it is required and simplifies many other areas,
> and it happens only in out-of-memory conditions.
> 
>  dlls/shell32/autocomplete.c | 139 ++++++++++++++++++++++++++++++------
>  1 file changed, 118 insertions(+), 21 deletions(-)

You should be able to split this patch.  First add the owner window
then switch to using owner-drawn listbox.

Huw.



More information about the wine-devel mailing list