[PATCH] comctl32/listview: Add Get/SetSelectedColumn() support

Nikolay Sivov nsivov at codeweavers.com
Tue Sep 8 13:49:01 CDT 2020


On Mon, 7 Sep 2020, Nikolay Sivov wrote:

> 
> 
> On 9/6/20 11:19 PM, Eric Wheeler wrote:
> > On Sat, 5 Sep 2020, Nikolay Sivov wrote:
> >> On 9/4/20 11:10 PM, Eric Wheeler wrote:
> >>> On Fri, 28 Aug 2020, Eric Wheeler wrote:
> >>>> On Fri, 28 Aug 2020, Nikolay Sivov wrote:
> >>>>> On 8/28/20 3:36 AM, Eric Wheeler wrote:
> >>>>>> In some programs using listview with columns, the first column of the
> >>>>>> listbox will select but is not editable and the remaining columns do not
> >>>>>> respond to clicking. When clicking one of the checkboxes in the column
> >>>>>> nothing happens and you get these two errors in the console:
> >>>>>>
> >>>>>>   0118:err:listview:LISTVIEW_WindowProc unknown msg 108c wp=00000004 lp=00000000
> >>>>>>   0118:err:listview:LISTVIEW_WindowProc unknown msg 10ae wp=00000000 lp=00000000
> >>>>>>
> >>>>>> We find that include/commctrl.h defines these as follows:
> >>>>>>   #define LVM_SETSELECTEDCOLUMN   (LVM_FIRST + 140) /* 108c is 0x1000 + 140 */
> >>>>>>   #define LVM_GETSELECTEDCOLUMN   (LVM_FIRST + 174) /* 10ae is 0x1000 + 174 */
> >>>>>>
> >>>>>> Changes:
> >>>>>>   * These defines were removed from the TODO seciton
> >>>>>>   * An INT was added to the LISTVIEW_INFO structure to track the selected column
> >>>>>>   * LISTVIEW_WindowProc() case statements were added to handle the mapping.
> >>>>>>
> >>>>>> Fixes: https://forum.winehq.org/viewtopic.php?f=8&t=34287
> >>>>>> Signed-off-by: Eric Wheeler <wine at linux.ewheeler.net>
> >>>>> Hi, Eric.
> >>>>>
> >>>>> Is this patch enough to fix the issue with AWR? I suspect it's
> >>>>> incomplete in a sense that there should be some visual feedback to mark
> >>>>> select column with different color. Does that happen on Windows with AWR?
> >>>> AWR works great after applying the patch.  I'm not sure if there is a 
> >>>> difference in Windows, I don't have a Windows system to test with.
> >>> Hi Nikolay,
> >>>
> >>> I've confirmed that there is no visual UI change in AWR for Windows when a 
> >>> listbox column is clicked.  The selected column message doesn't appear to 
> >>> have any UI behavior.
> >> It does have UI feedback, when I test this with Control Spy v6 on
> >> Windows 10. It's using different background color for selected column.
> > Perhaps it is used for something different in AWR.  At least in AWR the 
> > columns don't change color. Attached you can see the same dialog in 
> > Windows and WINE, both are sorted using the "ID" column.
> >
> > Without the patch Wine can sort columns, but only cells in the first 
> > column can be changed or clicked (presuambly because GetSelectedColumn 
> > always returns 0).
> >
> > Can the patch be accepted as it is because it fixes the problem for some 
> > applications but doesn't change the color?
> Yes, I sent v2 under your name, with some minor changes.


Awesome, thank you for making the changes and writing the tests and 
pushing it in!

--
Eric Wheeler



> >   I'm not familiar enough with 
> > Wine and Windows' code to implement the color change, so someone would 
> > need to help with that.
> >
> > --
> > Eric Wheeler
> >
> >
> >
> >>> --
> >>> Eric Wheeler
> >>>
> >>>
> >>>
> >>>> --
> >>>> Eric Wheeler
> >>>>
> >>>>
> >>>>
> >>>>
> >>
> 
> 



More information about the wine-devel mailing list