MCPcopy Create free account
hub / github.com/CobaltFusion/DebugViewPP / OnContextMenu

Method OnContextMenu

DebugView++/MainFrame.cpp:435–460  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

433}
434
435void 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
462void CMainFrame::HandleDroppedFile(const std::wstring& file)
463{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected