[PATCH 2/2] regedit: Only allow value renaming via the Edit or Popup menus

Nikolay Sivov nsivov at codeweavers.com
Wed Dec 28 06:47:31 CST 2016


On 28.12.2016 14:47, Hugh McMaster wrote:
> @@ -485,7 +494,7 @@ HWND CreateListView(HWND hwndParent, UINT id)
>      /* Get the dimensions of the parent window's client area, and create the list view control.  */
>      GetClientRect(hwndParent, &rcClient);
>      hwndLV = CreateWindowExW(WS_EX_CLIENTEDGE, WC_LISTVIEWW, ListView,
> -                            WS_VISIBLE | WS_CHILD | WS_TABSTOP | LVS_REPORT | LVS_EDITLABELS,
> +                            WS_VISIBLE | WS_CHILD | WS_TABSTOP | LVS_REPORT,
>                              0, 0, rcClient.right, rcClient.bottom,
>                              hwndParent, ULongToHandle(id), hInst, NULL);
>      if (!hwndLV) return NULL;
Clean way to do that is to block edit operation using LVN_BEGINLABELEDIT
notification. So basically you should always return TRUE from it, except
for the case when edit is triggered with UI command, in this case you
can temporarily enable edit, and block it back when done. But I'm
curious, why do you want to do that in a first place, what's wrong with
the ability to click-rename items?



More information about the wine-devel mailing list