<div>Hi, Nikolay Sivov</div><div><br></div><div>Thanks for your review. </div><div>I have tested so many times and I'm pretty sure that if user double click on the blank area of the list, </div><div>we will always receive a CBN_CLICK message. So I  have to use LB_ITEMFROMPOINT to know </div><div>whether a use really clicked on a list item, Otherwise it's wacky that user click on the blank area and </div><div>the edit window pops out.</div><div><includetail><div> </div><div style="font:Verdana normal 14px;color:#000;"><div style="FONT-SIZE: 12px;FONT-FAMILY: Arial Narrow;padding:2px 0 2px 0;">------------------ Original ------------------</div><div style="FONT-SIZE: 12px;background:#efefef;padding:8px;"><div id="menu_sender"><b>From: </b> "Nikolay Sivov"<bunglehead@gmail.com>;</div><div><b>Date: </b> Mon, Jun 29, 2015 04:09 AM</div><div><b>To: </b> "wine-devel"<wine-devel@winehq.org>; <wbr></div><div><b>Cc: </b> "Hao Peng"<penghao@linuxdeepin.com>; <wbr></div><div><b>Subject: </b> Re: [PATCH]winecfg: Double click in dlls list to edit overides. (try4)</div></div><div> </div>On 29.06.2015 12:35, Hao Peng wrote:<br>> Add a feature to winecfg. User can double click in dlls list to edit<br>> overides of selected item.<br>><br>> superseded all earlier patches.<br>><br>> ---<br>>   programs/winecfg/libraries.c | 14 ++++++++++++++<br>>   1 file changed, 14 insertions(+)<br>><br><br><br>> +                case CBN_DBLCLK:<br>> +                        if (LOWORD(wParam) == IDC_DLLS_LIST)<br>> +                        {<br>> +                            int index;<br>> +                            POINT p;<br>> +                            if (GetCursorPos(&p) && ScreenToClient((HWND)lParam, &p))<br>> +                            {<br>> +                                index = SendDlgItemMessageW(hDlg, IDC_DLLS_LIST,<br>> +                                        LB_ITEMFROMPOINT, 0, MAKELPARAM(p.x, p.y));<br>> +                                if (!HIWORD(index))<br>> +                                    on_edit_click(hDlg);<br>> +                            }<br>> +                        }<br>> +                    break;<br><br>Correct me if I'm wrong, but I don't think you get CBN_DBLCLK unless <br>clicked on an item. Quick test with ControlSpy on Windows confirms that. <br>And by the time you get CBN_DBLCLK something is always selected I think, <br>which makes all that cursor complexity redundant.<br></div><!--<![endif]--></includetail></div>