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,
if (!hwndLV) return NULL;WS_VISIBLE | WS_CHILD | WS_TABSTOP | LVS_REPORT, 0, 0, rcClient.right, rcClient.bottom, hwndParent, ULongToHandle(id), hInst, 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?