| 433 | } |
| 434 | |
| 435 | void CMainFrame::OnContextMenu(HWND hWnd, CPoint pt) |
| 436 | { |
| 437 | if (hWnd != m_TabCtrl) |
| 438 | { |
| 439 | SetMsgHandled(false); |
| 440 | return; |
| 441 | } |
| 442 | |
| 443 | CTCHITTESTINFO hit; |
| 444 | hit.pt = pt; |
| 445 | m_TabCtrl.ScreenToClient(&hit.pt); |
| 446 | int item = m_TabCtrl.HitTest(&hit); |
| 447 | |
| 448 | CMenu menuContext; |
| 449 | menuContext.LoadMenu(IDR_TAB_CONTEXTMENU); |
| 450 | CMenuHandle menuPopup(menuContext.GetSubMenu(0)); |
| 451 | |
| 452 | if (item < 0) |
| 453 | { |
| 454 | menuPopup.EnableMenuItem(ID_VIEW_FILTER, MF_BYCOMMAND | MF_GRAYED); |
| 455 | menuPopup.EnableMenuItem(ID_VIEW_CLEAR, MF_BYCOMMAND | MF_GRAYED); |
| 456 | menuPopup.EnableMenuItem(ID_VIEW_CLOSE, MF_BYCOMMAND | MF_GRAYED); |
| 457 | } |
| 458 | |
| 459 | menuPopup.TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON, pt.x, pt.y, *this); |
| 460 | } |
| 461 | |
| 462 | void CMainFrame::HandleDroppedFile(const std::wstring& file) |
| 463 | { |
nothing calls this directly
no outgoing calls
no test coverage detected