// OutputPane.cpp // // (c)1998-2025 Codejock Software, All Rights Reserved. // // THIS SOURCE FILE IS THE PROPERTY OF CODEJOCK SOFTWARE AND IS NOT TO BE // RE-DISTRIBUTED BY ANY MEANS WHATSOEVER WITHOUT THE EXPRESSED WRITTEN // CONSENT OF CODEJOCK SOFTWARE. // // THIS SOURCE CODE CAN ONLY BE USED UNDER THE TERMS AND CONDITIONS OUTLINED // IN THE XTREME TOOLKIT PRO LICENSE AGREEMENT. CODEJOCK SOFTWARE GRANTS TO // YOU (ONE SOFTWARE DEVELOPER) THE LIMITED RIGHT TO USE THIS SOFTWARE ON A // SINGLE COMPUTER. // // CONTACT INFORMATION: // support@codejock.com // http://www.codejock.com // ///////////////////////////////////////////////////////////////////////////// #include "stdafx.h" #include "GUI_VisualStudio.h" #include "OutputPane.h" #ifdef _DEBUG # define new DEBUG_NEW #endif IMPLEMENT_DYNAMIC(COutputPane, CXTPEdit); BEGIN_MESSAGE_MAP(COutputPane, CXTPEdit) ON_WM_CREATE() ON_WM_SIZE() ON_WM_NCPAINT() END_MESSAGE_MAP() COutputPane::COutputPane() { m_pPane = NULL; } COutputPane::~COutputPane() { } int COutputPane::OnCreate(LPCREATESTRUCT lpCreateStruct) { if (CXTPEdit::OnCreate(lpCreateStruct) == -1) { TRACE(_T("ERROR: Unable to create output pane.\n")); return -1; } SetFont(XTPPaintManager()->GetRegularFont()); SetMargins(XTP_DPI_X(10), XTP_DPI_X(10)); // SetMargins(XTP_DPI_X(10), XTP_DPI_Y(5)); // TODO: Add your output text here SetWindowText( _T("1>Done building project\r\n") _T("========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========")); return 0; } void COutputPane::OnSize(UINT nType, int cx, int cy) { CWnd::OnSize(nType, cx, cy); XTPPaintTheme nTheme = theApp.GetAppTheme(); CString strThemeSettings = theApp.GetAppThemeSettings(); BOOL bAdjust = ((nTheme == xtpControlThemeVisualStudio2010) || (nTheme == xtpControlThemeVisualStudio2012Dark) || (nTheme == xtpControlThemeVisualStudio2012Light) || (nTheme == xtpControlThemeVisualStudio2015) || (nTheme == xtpControlThemeVisualStudio2017) || (nTheme == xtpControlThemeVisualStudio2019) || (nTheme == xtpControlThemeVisualStudio2022)); ModifyStyleEx(bAdjust ? WS_EX_STATICEDGE : 0, bAdjust ? 0 : WS_EX_STATICEDGE); } void COutputPane::OnNcPaint() { TBase::OnNcPaint(); CWindowDC dc(this); CXTPWindowRect rWindow(this); rWindow.OffsetRect(-rWindow.TopLeft()); theApp.GetPaneColorSet()->DrawBorders(&dc, rWindow, m_pPane); } IMPLEMENT_DYNAMIC(CScrollablePaneViewOutput, COutputPane); BEGIN_MESSAGE_MAP(CScrollablePaneViewOutput, COutputPane) ON_MESSAGE(WM_XTP_SETCONTROLTHEME, OnSetControlTheme) END_MESSAGE_MAP() LRESULT CScrollablePaneViewOutput::OnSetControlTheme(WPARAM wParam, LPARAM lParam) { UNREFERENCED_PARAMETER(lParam); XTPControlTheme nTheme = (XTPControlTheme)wParam; switch (nTheme) { case xtpControlThemeDefault: SetScrollBarTheme(xtpScrollBarThemeVisualStudio6); break; // case XTPControlTheme::xtpControlThemeVisualStudio2002: // SetScrollBarTheme(xtpScrollBarThemeVisualStudio2002); // break; // case XTPControlTheme::xtpControlThemeVisualStudio2003: // SetScrollBarTheme(xtpScrollBarThemeVisualStudio2003); // break; case xtpControlThemeVisualStudio2005: SetScrollBarTheme(xtpScrollBarThemeVisualStudio2005); break; case xtpControlThemeVisualStudio2008: SetScrollBarTheme(xtpScrollBarThemeVisualStudio2008); break; case xtpControlThemeVisualStudio2010: SetScrollBarTheme(xtpScrollBarThemeVisualStudio2010); break; case xtpControlThemeVisualStudio2012Dark: SetScrollBarTheme(xtpScrollBarThemeVisualStudio2012Dark); break; case xtpControlThemeVisualStudio2012Light: SetScrollBarTheme(xtpScrollBarThemeVisualStudio2012Light); break; case xtpControlThemeVisualStudio2015: SetScrollBarTheme(xtpScrollBarThemeVisualStudio2015); break; case xtpControlThemeVisualStudio2017: SetScrollBarTheme(xtpScrollBarThemeVisualStudio2017); break; case xtpControlThemeVisualStudio2019: SetScrollBarTheme(xtpScrollBarThemeVisualStudio2019); break; case xtpControlThemeVisualStudio2022: SetScrollBarTheme(xtpScrollBarThemeVisualStudio2022); break; default: ASSERT(FALSE); break; } return 0; }