// appdevview.cpp : implementation file // #include "stdafx.h" #include "geomative.h" #include "appdevview.h" #include "appdevdetaillistview.h" #include "appdatatdlistview.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CAppDevView IMPLEMENT_DYNCREATE(CAppDevView, CView) CAppDevView::CAppDevView() { m_pDevDetailListView = NULL; m_pDevContentListView = NULL; } CAppDevView::~CAppDevView() { } BEGIN_MESSAGE_MAP(CAppDevView, CView) //{{AFX_MSG_MAP(CAppDevView) ON_WM_SIZE() //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CAppDevView drawing void CAppDevView::OnDraw(CDC* pDC) { CDocument* pDoc = GetDocument(); // TODO: add draw code here } ///////////////////////////////////////////////////////////////////////////// // CAppDevView diagnostics #ifdef _DEBUG void CAppDevView::AssertValid() const { CView::AssertValid(); } void CAppDevView::Dump(CDumpContext& dc) const { CView::Dump(dc); } #endif //_DEBUG ///////////////////////////////////////////////////////////////////////////// // CAppDevView message handlers BOOL CAppDevView::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(CAppDevDetailListView), CSize(SPL_VIEW_APP_DETAIL_WIDTH, rect.bottom-rect.top), pContext)); m_pDevDetailListView = static_cast(m_firstSplitter.GetPane((int)SPL_VIEW_ROW_0, (int)SPL_VIEW_COL_0)); ASSERT(m_pDevDetailListView != NULL); m_pDevDetailListView->OnInitialUpdate(); VERIFY(m_firstSplitter.CreateView(SPL_VIEW_ROW_0, SPL_VIEW_COL_1, RUNTIME_CLASS(CAppDataTdListView), CSize(0, rect.bottom-rect.top), pContext)); m_pDevContentListView = static_cast(m_firstSplitter.GetPane(SPL_VIEW_ROW_0, SPL_VIEW_COL_1)); ASSERT(m_pDevContentListView != NULL); m_pDevContentListView->OnInitialUpdate(); m_firstSplitter.RecalcLayout(); } return TRUE; } void CAppDevView::OnSize(UINT nType, int cx, int cy) { CView::OnSize(nType, cx, cy); // TODO: Add your message handler code here if (VAL_ZERO != m_firstSplitter.GetSafeHwnd()) { m_firstSplitter.MoveWindow(VAL_ZERO, VAL_ZERO, cx, cy); m_firstSplitter.RecalcLayout(); } }