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

Method OnChangeTab

DebugView++/MainFrame.cpp:746–764  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

744}
745
746LRESULT CMainFrame::OnChangeTab(NMHDR* pnmh)
747{
748 SetMsgHandled(false);
749
750 auto& nmhdr = *reinterpret_cast<NMCTC2ITEMS*>(pnmh);
751
752 if (nmhdr.iItem2 >= 0 && nmhdr.iItem2 < GetViewCount())
753 SetModifiedMark(nmhdr.iItem2, false);
754
755 if (!m_linkViews || nmhdr.iItem1 == nmhdr.iItem2 ||
756 nmhdr.iItem1 < 0 || nmhdr.iItem1 >= GetViewCount() ||
757 nmhdr.iItem2 < 0 || nmhdr.iItem2 >= GetViewCount())
758 return 0;
759
760 int line = GetView(nmhdr.iItem1).GetFocusLine();
761 GetView(nmhdr.iItem2).SetFocusLine(line);
762
763 return 0;
764}
765
766void CMainFrame::SetModifiedMark(int tabindex, bool modified)
767{

Callers

nothing calls this directly

Calls 2

GetFocusLineMethod · 0.80
SetFocusLineMethod · 0.80

Tested by

no test coverage detected