104 lines
2.8 KiB
C++
104 lines
2.8 KiB
C++
// appdatatzview.cpp : implementation file
|
|
//
|
|
|
|
#include "stdafx.h"
|
|
#include "geomative.h"
|
|
#include "appdatatzview.h"
|
|
#include "Constant.h"
|
|
#include "appdatatzdetaillistview.h"
|
|
#include "appdatatdlistview.h"
|
|
|
|
#ifdef _DEBUG
|
|
#define new DEBUG_NEW
|
|
#undef THIS_FILE
|
|
static char THIS_FILE[] = __FILE__;
|
|
#endif
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// CAppDataTzView
|
|
|
|
IMPLEMENT_DYNCREATE(CAppDataTzView, CView)
|
|
|
|
CAppDataTzView::CAppDataTzView()
|
|
{
|
|
m_pContentListView = NULL;
|
|
m_pDetailListView = NULL;
|
|
}
|
|
|
|
CAppDataTzView::~CAppDataTzView()
|
|
{
|
|
}
|
|
|
|
|
|
BEGIN_MESSAGE_MAP(CAppDataTzView, CView)
|
|
//{{AFX_MSG_MAP(CAppDataTzView)
|
|
ON_WM_SIZE()
|
|
//}}AFX_MSG_MAP
|
|
END_MESSAGE_MAP()
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// CAppDataTzView drawing
|
|
|
|
void CAppDataTzView::OnDraw(CDC* pDC)
|
|
{
|
|
CDocument* pDoc = GetDocument();
|
|
// TODO: add draw code here
|
|
}
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// CAppDataTzView diagnostics
|
|
|
|
#ifdef _DEBUG
|
|
void CAppDataTzView::AssertValid() const
|
|
{
|
|
CView::AssertValid();
|
|
}
|
|
|
|
void CAppDataTzView::Dump(CDumpContext& dc) const
|
|
{
|
|
CView::Dump(dc);
|
|
}
|
|
#endif //_DEBUG
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// CAppDataTzView message handlers
|
|
|
|
BOOL CAppDataTzView::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 ((HWND)VAL_ZERO == m_firstSplitter.GetSafeHwnd())
|
|
{
|
|
m_firstSplitter.CreateStatic(this, 1, 2);
|
|
|
|
VERIFY(m_firstSplitter.CreateView(SPL_VIEW_ROW_0, SPL_VIEW_COL_0, RUNTIME_CLASS(CAppDataTzDetailListView),
|
|
CSize(SPL_VIEW_APP_DETAIL_WIDTH, rect.bottom-rect.top), pContext));
|
|
m_pDetailListView = static_cast<CView*>(m_firstSplitter.GetPane(SPL_VIEW_ROW_0, SPL_VIEW_COL_0));
|
|
ASSERT(m_pDetailListView != NULL);
|
|
m_pDetailListView->OnInitialUpdate();
|
|
|
|
VERIFY(m_firstSplitter.CreateView(SPL_VIEW_ROW_0, SPL_VIEW_COL_1, RUNTIME_CLASS(CAppDataTdListView), CSize(0, rect.bottom-rect.top), pContext));
|
|
m_pContentListView = static_cast<CView*>(m_firstSplitter.GetPane(SPL_VIEW_ROW_0, SPL_VIEW_COL_1));
|
|
ASSERT(m_pContentListView != NULL);
|
|
m_pContentListView->OnInitialUpdate();
|
|
|
|
m_firstSplitter.RecalcLayout();
|
|
}
|
|
|
|
m_pMngFrm = (CMDIChildWnd*)GetParentFrame();
|
|
|
|
return TRUE;
|
|
}
|
|
|
|
void CAppDataTzView::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();
|
|
}
|
|
}
|