a
This commit is contained in:
@@ -0,0 +1,120 @@
|
||||
// AppDataIpspCETdView.cpp : implementation file
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "geomative.h"
|
||||
#include "AppDataIpspCETdView.h"
|
||||
|
||||
#include "appdatatddetaillistview.h"
|
||||
#include "AppDataIpspCETdConListView.h"
|
||||
#include "AppData_CE_IP_Td_Gr_ListView.h"
|
||||
#include "AppDataCESTdGrListView.h"
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#undef THIS_FILE
|
||||
static char THIS_FILE[] = __FILE__;
|
||||
#endif
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CAppDataIpspCETdView
|
||||
|
||||
IMPLEMENT_DYNCREATE(CAppDataIpspCETdView, CView)
|
||||
|
||||
CAppDataIpspCETdView::CAppDataIpspCETdView()
|
||||
{
|
||||
m_pGrListView = NULL;
|
||||
m_pContentListView = NULL;
|
||||
m_pDetailListView = NULL;
|
||||
m_pMngFrm = NULL;
|
||||
}
|
||||
|
||||
CAppDataIpspCETdView::~CAppDataIpspCETdView()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
BEGIN_MESSAGE_MAP(CAppDataIpspCETdView, CView)
|
||||
//{{AFX_MSG_MAP(CAppDataIpspCETdView)
|
||||
ON_WM_SIZE()
|
||||
//}}AFX_MSG_MAP
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CAppDataIpspCETdView drawing
|
||||
|
||||
void CAppDataIpspCETdView::OnDraw(CDC* pDC)
|
||||
{
|
||||
CDocument* pDoc = GetDocument();
|
||||
// TODO: add draw code here
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CAppDataIpspCETdView diagnostics
|
||||
|
||||
#ifdef _DEBUG
|
||||
void CAppDataIpspCETdView::AssertValid() const
|
||||
{
|
||||
CView::AssertValid();
|
||||
}
|
||||
|
||||
void CAppDataIpspCETdView::Dump(CDumpContext& dc) const
|
||||
{
|
||||
CView::Dump(dc);
|
||||
}
|
||||
#endif //_DEBUG
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CAppDataIpspCETdView message handlers
|
||||
|
||||
|
||||
void CAppDataIpspCETdView::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();
|
||||
m_secondSplitter.SetRowInfo(SPL_VIEW_ROW_0 , cy/2, VAL_ZERO);
|
||||
m_secondSplitter.RecalcLayout();
|
||||
}
|
||||
}
|
||||
|
||||
BOOL CAppDataIpspCETdView::Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext)
|
||||
{
|
||||
// TODO: Add your specialized code here and/or call the base class
|
||||
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(CAppDataTdDetailListView),
|
||||
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();
|
||||
|
||||
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(CAppDataIpspCETdConListView), CSize(0, (rect.bottom-rect.top)/2), pContext));
|
||||
m_pContentListView = static_cast<CView*>(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(CAppDataCESTdGrListView), CSize(0, (rect.bottom-rect.top)/2), pContext));
|
||||
m_pGrListView = static_cast<CView*>(m_secondSplitter.GetPane(SPL_VIEW_ROW_1, SPL_VIEW_COL_0));
|
||||
ASSERT(m_pGrListView != NULL);
|
||||
m_pGrListView->OnInitialUpdate();
|
||||
|
||||
m_secondSplitter.RecalcLayout();
|
||||
m_firstSplitter.RecalcLayout();
|
||||
}
|
||||
|
||||
m_pMngFrm = (CMDIChildWnd*)GetParentFrame();
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user