+ event.m_pointDrag.x = nmLV->ptAction.x;
+ event.m_pointDrag.y = nmLV->ptAction.y;
+ break;
+
+ // NB: we have to handle both *A and *W versions here because some
+ // versions of comctl32.dll send ANSI message to an Unicode app
+ case LVN_BEGINLABELEDITA:
+ {
+ eventType = wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT;
+ wxLV_ITEM item(((LV_DISPINFOA *)lParam)->item);
+ wxConvertFromMSWListItem(GetHwnd(), event.m_item, item);
+ event.m_itemIndex = event.m_item.m_itemId;
+ }
+ break;
+ case LVN_BEGINLABELEDITW:
+ {
+ eventType = wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT;
+ wxLV_ITEM item(((LV_DISPINFOW *)lParam)->item);
+ wxConvertFromMSWListItem(GetHwnd(), event.m_item, item);
+ event.m_itemIndex = event.m_item.m_itemId;
+ }
+ break;
+
+ case LVN_ENDLABELEDITA:
+ {
+ eventType = wxEVT_COMMAND_LIST_END_LABEL_EDIT;
+ wxLV_ITEM item(((LV_DISPINFOA *)lParam)->item);
+ wxConvertFromMSWListItem(NULL, event.m_item, item);
+ if ( ((LV_ITEM)item).pszText == NULL ||
+ ((LV_ITEM)item).iItem == -1 )
+ return FALSE;
+
+ event.m_itemIndex = event.m_item.m_itemId;
+ }
+ break;
+ case LVN_ENDLABELEDITW:
+ {
+ eventType = wxEVT_COMMAND_LIST_END_LABEL_EDIT;
+ wxLV_ITEM item(((LV_DISPINFOW *)lParam)->item);
+ wxConvertFromMSWListItem(NULL, event.m_item, item);
+ if ( ((LV_ITEM)item).pszText == NULL ||
+ ((LV_ITEM)item).iItem == -1 )
+ return FALSE;
+
+ event.m_itemIndex = event.m_item.m_itemId;
+ }
+ break;
+
+ case LVN_COLUMNCLICK:
+ eventType = wxEVT_COMMAND_LIST_COL_CLICK;
+ event.m_itemIndex = -1;
+ event.m_col = nmLV->iSubItem;
+ break;
+
+ case LVN_DELETEALLITEMS:
+ eventType = wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS;
+ event.m_itemIndex = -1;
+
+ FreeAllAttrs();
+
+ break;
+
+ case LVN_DELETEITEM:
+ eventType = wxEVT_COMMAND_LIST_DELETE_ITEM;