MCPcopy Create free account
hub / github.com/derceg/explorerplusplus / OnListViewItemRClick

Method OnListViewItemRClick

Explorer++/Explorer++/ListViewHandler.cpp:655–685  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

653}
654
655void Explorerplusplus::OnListViewItemRClick(POINT *pCursorPos)
656{
657 int nSelected = ListView_GetSelectedCount(m_hActiveListView);
658
659 if(nSelected > 0)
660 {
661 std::vector<unique_pidl_child> pidlPtrs;
662 std::vector<PCITEMID_CHILD> pidlItems;
663 int iItem = -1;
664
665 while((iItem = ListView_GetNextItem(m_hActiveListView,iItem,LVNI_SELECTED)) != -1)
666 {
667 auto pidlPtr = m_pActiveShellBrowser->GetItemChildIdl(iItem);
668
669 pidlItems.push_back(pidlPtr.get());
670 pidlPtrs.push_back(std::move(pidlPtr));
671 }
672
673 auto pidlDirectory = m_pActiveShellBrowser->GetDirectoryIdl();
674
675 FileContextMenuManager fcmm(m_hActiveListView, pidlDirectory.get(), pidlItems);
676
677 FileContextMenuInfo_t fcmi;
678 fcmi.uFrom = FROM_LISTVIEW;
679
680 StatusBar statusBar(m_hStatusBar);
681
682 fcmm.ShowMenu(this,MIN_SHELL_MENU_ID,MAX_SHELL_MENU_ID,pCursorPos,&statusBar,
683 reinterpret_cast<DWORD_PTR>(&fcmi),TRUE,IsKeyDown(VK_SHIFT));
684 }
685}
686
687HRESULT Explorerplusplus::OnListViewBeginDrag(LPARAM lParam,DragType dragType)
688{

Callers

nothing calls this directly

Calls 5

IsKeyDownFunction · 0.85
GetItemChildIdlMethod · 0.80
GetDirectoryIdlMethod · 0.80
getMethod · 0.45
ShowMenuMethod · 0.45

Tested by

no test coverage detected