Author: cwittich
Date: Sat Apr 4 18:51:28 2015
New Revision: 67052
URL:
http://svn.reactos.org/svn/reactos?rev=67052&view=rev
Log:
[SHELL32]
implement invert selection
Modified:
trunk/reactos/dll/win32/shell32/CDefView.cpp
trunk/reactos/include/reactos/rosctrls.h
Modified: trunk/reactos/dll/win32/shell32/CDefView.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/CDefView…
==============================================================================
--- trunk/reactos/dll/win32/shell32/CDefView.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/CDefView.cpp [iso-8859-1] Sat Apr 4 18:51:28 2015
@@ -1554,9 +1554,10 @@
*/
LRESULT CDefView::OnCommand(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
{
- DWORD dwCmdID;
- DWORD dwCmd;
- HWND hwndCmd;
+ DWORD dwCmdID;
+ DWORD dwCmd;
+ HWND hwndCmd;
+ int nCount;
dwCmdID = GET_WM_COMMAND_ID(wParam, lParam);
dwCmd = GET_WM_COMMAND_CMD(wParam, lParam);
@@ -1603,6 +1604,12 @@
case FCIDM_SHVIEW_SELECTALL:
m_ListView.SetItemState(-1, LVIS_SELECTED, LVIS_SELECTED);
+ break;
+
+ case FCIDM_SHVIEW_INVERTSELECTION:
+ nCount = m_ListView.GetItemCount();
+ for (int i=0; i < nCount; i++)
+ m_ListView.SetItemState(i, m_ListView.GetItemState(i, LVIS_SELECTED) ? 0
: LVIS_SELECTED, LVIS_SELECTED);
break;
case FCIDM_SHVIEW_REFRESH:
Modified: trunk/reactos/include/reactos/rosctrls.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/rosctrls.h…
==============================================================================
--- trunk/reactos/include/reactos/rosctrls.h [iso-8859-1] (original)
+++ trunk/reactos/include/reactos/rosctrls.h [iso-8859-1] Sat Apr 4 18:51:28 2015
@@ -165,6 +165,11 @@
spacing.cy = HIWORD(ret);
}
+ UINT GetItemState(int i, UINT mask)
+ {
+ return SendMessage(LVM_GETITEMSTATE, i, (LPARAM)mask);
+ }
+
void SetItemState(int i, UINT state, UINT mask)
{
LV_ITEM item;