| 532 | } |
| 533 | |
| 534 | void Explorerplusplus::OnListViewRClick(POINT *pCursorPos) |
| 535 | { |
| 536 | /* It may be possible for the active tab/folder |
| 537 | to change while the menu is been shown (e.g. if |
| 538 | not handled correctly, the back/forward buttons |
| 539 | on a mouse will change the directory without |
| 540 | destroying the popup menu). |
| 541 | If this happens, the shell browser used will not |
| 542 | stay constant throughout this function, and will |
| 543 | cause various problems (e.g. changing from a |
| 544 | computer where new items can be created to one |
| 545 | where they cannot while the popup menu is still |
| 546 | active will cause the 'new' entry to stay on the |
| 547 | menu incorrectly). |
| 548 | Due to the possibility of unforseen problems, |
| 549 | this function should NOT access the current |
| 550 | shell browser once the menu has been destroyed. */ |
| 551 | |
| 552 | SetForegroundWindow(m_hContainer); |
| 553 | |
| 554 | if(IsKeyDown(VK_SHIFT) && |
| 555 | !IsKeyDown(VK_CONTROL) && |
| 556 | !IsKeyDown(VK_MENU)) |
| 557 | { |
| 558 | LVHITTESTINFO lvhti; |
| 559 | |
| 560 | lvhti.pt = *pCursorPos; |
| 561 | ScreenToClient(m_hActiveListView,&lvhti.pt); |
| 562 | ListView_HitTest(m_hActiveListView,&lvhti); |
| 563 | |
| 564 | if(!(lvhti.flags & LVHT_NOWHERE) && lvhti.iItem != -1) |
| 565 | { |
| 566 | if(ListView_GetItemState(m_hActiveListView,lvhti.iItem,LVIS_SELECTED) != |
| 567 | LVIS_SELECTED) |
| 568 | { |
| 569 | ListViewHelper::SelectAllItems(m_hActiveListView,FALSE); |
| 570 | ListViewHelper::SelectItem(m_hActiveListView,lvhti.iItem,TRUE); |
| 571 | } |
| 572 | } |
| 573 | } |
| 574 | |
| 575 | if(ListView_GetSelectedCount(m_hActiveListView) == 0) |
| 576 | { |
| 577 | OnListViewBackgroundRClick(pCursorPos); |
| 578 | } |
| 579 | else |
| 580 | { |
| 581 | OnListViewItemRClick(pCursorPos); |
| 582 | } |
| 583 | } |
| 584 | |
| 585 | void Explorerplusplus::OnListViewBackgroundRClick(POINT *pCursorPos) |
| 586 | { |
nothing calls this directly
no test coverage detected