115 lines
3.3 KiB
C++
115 lines
3.3 KiB
C++
// appdataproview.cpp : implementation file
|
|
//
|
|
|
|
#include "stdafx.h"
|
|
#include "geomative.h"
|
|
#include "appdataproview.h"
|
|
#include "appdataprodetaillistview.h"
|
|
#include "appdatatzlistview.h"
|
|
#include "Constant.h"
|
|
#include "appdatatdlistview.h"
|
|
|
|
#ifdef _DEBUG
|
|
#define new DEBUG_NEW
|
|
#undef THIS_FILE
|
|
static char THIS_FILE[] = __FILE__;
|
|
#endif
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// CAppDataProView
|
|
|
|
IMPLEMENT_DYNCREATE(CAppDataProView, CView)
|
|
|
|
CAppDataProView::CAppDataProView()
|
|
{
|
|
m_pContentListView = NULL;
|
|
m_pDetailListView = NULL;
|
|
m_pMngFrm = NULL;
|
|
|
|
}
|
|
|
|
CAppDataProView::~CAppDataProView()
|
|
{
|
|
}
|
|
|
|
|
|
BEGIN_MESSAGE_MAP(CAppDataProView, CView)
|
|
//{{AFX_MSG_MAP(CAppDataProView)
|
|
ON_WM_SIZE()
|
|
//}}AFX_MSG_MAP
|
|
END_MESSAGE_MAP()
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// CAppDataProView drawing
|
|
|
|
void CAppDataProView::OnDraw(CDC* pDC)
|
|
{
|
|
CDocument* pDoc = GetDocument();
|
|
// TODO: add draw code here
|
|
}
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// CAppDataProView diagnostics
|
|
|
|
#ifdef _DEBUG
|
|
void CAppDataProView::AssertValid() const
|
|
{
|
|
CView::AssertValid();
|
|
}
|
|
|
|
void CAppDataProView::Dump(CDumpContext& dc) const
|
|
{
|
|
CView::Dump(dc);
|
|
}
|
|
#endif //_DEBUG
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// CAppDataProView message handlers
|
|
|
|
BOOL CAppDataProView::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(SPL_VIEW_ROW_0, SPL_VIEW_COL_0, RUNTIME_CLASS(CAppDataProDetailListView),
|
|
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();
|
|
|
|
//由于现在没有测区,那么详细显示的视图中显示的就不再是测区的视图,而是任务的视图
|
|
/*
|
|
VERIFY(m_firstSplitter.CreateView(SPL_VIEW_ROW_0, SPL_VIEW_COL_1, RUNTIME_CLASS(CAppDataTzListView), 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 CAppDataProView::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((int)VAL_ZERO, (int)VAL_ZERO, cx, cy);
|
|
m_firstSplitter.RecalcLayout();
|
|
|
|
}
|
|
}
|