This commit is contained in:
coco
2026-07-03 16:05:30 +08:00
commit df489d5640
1101 changed files with 779140 additions and 0 deletions
+119
View File
@@ -0,0 +1,119 @@
// appdevolview.cpp : implementation file
//
#include "stdafx.h"
#include "geomative.h"
#include "appdevolview.h"
#include "appdevoldetaillistview.h"
#include "appdevolgrlistview.h"
#include "appdevolacview.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CAppDevOLView
IMPLEMENT_DYNCREATE(CAppDevOLView, CView)
CAppDevOLView::CAppDevOLView()
{
m_pDevOLDetailListView = NULL;
m_pDevOLGRListView = NULL;
m_pDevOLACListView = NULL;
}
CAppDevOLView::~CAppDevOLView()
{
}
BEGIN_MESSAGE_MAP(CAppDevOLView, CView)
//{{AFX_MSG_MAP(CAppDevOLView)
ON_WM_SIZE()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CAppDevOLView drawing
void CAppDevOLView::OnDraw(CDC* pDC)
{
CDocument* pDoc = GetDocument();
// TODO: add draw code here
}
/////////////////////////////////////////////////////////////////////////////
// CAppDevOLView diagnostics
#ifdef _DEBUG
void CAppDevOLView::AssertValid() const
{
CView::AssertValid();
}
void CAppDevOLView::Dump(CDumpContext& dc) const
{
CView::Dump(dc);
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CAppDevOLView message handlers
BOOL CAppDevOLView::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(CAppDevOLDetailListView),
CSize(SPL_VIEW_APP_DETAIL_WIDTH, rect.bottom-rect.top), pContext));
m_pDevOLDetailListView = static_cast<CView*>(m_firstSplitter.GetPane((int)SPL_VIEW_ROW_0, (int)SPL_VIEW_COL_0));
ASSERT(m_pDevOLDetailListView != NULL);
m_pDevOLDetailListView->OnInitialUpdate();
/*
VERIFY(m_firstSplitter.CreateView((int)SPL_VIEW_ROW_0, (int)SPL_VIEW_COL_1, RUNTIME_CLASS(CAppDevOLCableHeadListView), CSize(0, rect.bottom-rect.top), pContext));
m_pDevOLCableHeadListView = static_cast<CView*>(m_firstSplitter.GetPane(SPL_VIEW_ROW_0, SPL_VIEW_COL_1));
ASSERT(m_pDevOLCableHeadListView != NULL);
m_pDevOLCableHeadListView->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(CAppDevOLGRListView), CSize(0, (rect.bottom-rect.top)/3*2), pContext));
m_pDevOLGRListView = static_cast<CView*>(m_secondSplitter.GetPane(SPL_VIEW_ROW_0, SPL_VIEW_COL_0));
ASSERT(m_pDevOLGRListView != NULL);
m_pDevOLGRListView->OnInitialUpdate();
VERIFY(m_secondSplitter.CreateView(SPL_VIEW_ROW_1, SPL_VIEW_COL_0, RUNTIME_CLASS(CAppDevOLACView), CSize(0, (rect.bottom-rect.top)/3), pContext));
m_pDevOLACListView = static_cast<CView*>(m_secondSplitter.GetPane(SPL_VIEW_ROW_1, SPL_VIEW_COL_0));
ASSERT(m_pDevOLACListView != NULL);
m_pDevOLACListView->OnInitialUpdate();
m_secondSplitter.RecalcLayout();
m_firstSplitter.RecalcLayout();
}
return TRUE;
}
void CAppDevOLView::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();
m_secondSplitter.SetRowInfo((int)SPL_VIEW_ROW_0 , (int)cy/3*2, (int)VAL_ZERO);
m_secondSplitter.RecalcLayout();
}
}