// appcesptview.cpp : implementation file // #include "stdafx.h" #include "geomative.h" #include "appcesptview.h" #include "appsptview.h" #include "appsptdetaillistview.h" #include "appcesptconlistview.h" #include "appsptchannellistview.h" #include "blankview.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CAppCESptView IMPLEMENT_DYNCREATE(CAppCESptView, CView) CAppCESptView::CAppCESptView() { } CAppCESptView::~CAppCESptView() { } BEGIN_MESSAGE_MAP(CAppCESptView, CView) //{{AFX_MSG_MAP(CAppCESptView) ON_WM_SIZE() //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CAppCESptView drawing void CAppCESptView::OnDraw(CDC* pDC) { CDocument* pDoc = GetDocument(); // TODO: add draw code here } ///////////////////////////////////////////////////////////////////////////// // CAppCESptView diagnostics #ifdef _DEBUG void CAppCESptView::AssertValid() const { CView::AssertValid(); } void CAppCESptView::Dump(CDumpContext& dc) const { CView::Dump(dc); } #endif //_DEBUG ///////////////////////////////////////////////////////////////////////////// // CAppCESptView message handlers BOOL CAppCESptView::Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext) { CWnd::Create(lpszClassName, lpszWindowName, dwStyle, rect, pParentWnd, nID, pContext); // TODO: Add your specialized code here and/or call the base class if (VAL_ZERO == m_firstSplitter.GetSafeHwnd()) { m_firstSplitter.CreateStatic(this, 1, 2); VERIFY(m_firstSplitter.CreateView((int)SPL_VIEW_ROW_0, (int)SPL_VIEW_COL_0, RUNTIME_CLASS(CAppSptDetailListView), CSize(SPL_VIEW_APP_DETAIL_WIDTH, rect.bottom-rect.top), pContext)); m_pDetailListView = static_cast(m_firstSplitter.GetPane((int)SPL_VIEW_ROW_0, (int)SPL_VIEW_COL_0)); ASSERT(m_pDetailListView != NULL); m_pDetailListView->OnInitialUpdate(); m_secondSplitter.CreateStatic(&m_firstSplitter, 2, 1, WS_CHILD | WS_VISIBLE, m_firstSplitter.IdFromRowCol(SPL_VIEW_ROW_0, SPL_VIEW_COL_1)); VERIFY(m_secondSplitter.CreateView(SPL_VIEW_ROW_0, SPL_VIEW_COL_0, RUNTIME_CLASS(CAppSptChannelListView), CSize(0, (rect.bottom-rect.top)/4), pContext)); m_pContentListView = static_cast(m_secondSplitter.GetPane(SPL_VIEW_ROW_0, SPL_VIEW_COL_0)); ASSERT(m_pContentListView != NULL); m_pContentListView->OnInitialUpdate(); VERIFY(m_secondSplitter.CreateView(SPL_VIEW_ROW_1, SPL_VIEW_COL_0, RUNTIME_CLASS(CAppCESptConListView), CSize(0, (rect.bottom-rect.top)/4*3), pContext)); m_pScriptListView = static_cast(m_secondSplitter.GetPane(SPL_VIEW_ROW_1, SPL_VIEW_COL_0)); ASSERT(m_pScriptListView != NULL); m_pScriptListView->OnInitialUpdate(); m_secondSplitter.RecalcLayout(); m_firstSplitter.RecalcLayout(); } return TRUE; } void CAppCESptView::OnSize(UINT nType, int cx, int cy) { CView::OnSize(nType, cx, cy); // TODO: Add your message handler code here if ((HWND)VAL_ZERO != m_firstSplitter.GetSafeHwnd()) { m_firstSplitter.MoveWindow((int)VAL_ZERO, (int)VAL_ZERO, cx, cy); m_firstSplitter.RecalcLayout(); m_secondSplitter.SetRowInfo((int)SPL_VIEW_ROW_0 , (int)cy/4, (int)VAL_ZERO); m_secondSplitter.RecalcLayout(); } }