a
This commit is contained in:
@@ -0,0 +1,111 @@
|
||||
// appexecsptview.cpp : implementation file
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "geomative.h"
|
||||
|
||||
#include "appsptview.h"
|
||||
#include "appsptdetaillistview.h"
|
||||
#include "appsptconlistview.h"
|
||||
#include "appsptchannellistview.h"
|
||||
|
||||
#include "blankview.h"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#undef THIS_FILE
|
||||
static char THIS_FILE[] = __FILE__;
|
||||
#endif
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CAppSptView
|
||||
|
||||
IMPLEMENT_DYNCREATE(CAppSptView, CView)
|
||||
|
||||
CAppSptView::CAppSptView()
|
||||
{
|
||||
}
|
||||
|
||||
CAppSptView::~CAppSptView()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
BEGIN_MESSAGE_MAP(CAppSptView, CView)
|
||||
//{{AFX_MSG_MAP(CAppSptView)
|
||||
ON_WM_SIZE()
|
||||
//}}AFX_MSG_MAP
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CAppSptView drawing
|
||||
|
||||
void CAppSptView::OnDraw(CDC* pDC)
|
||||
{
|
||||
CDocument* pDoc = GetDocument();
|
||||
// TODO: add draw code here
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CAppSptView diagnostics
|
||||
|
||||
#ifdef _DEBUG
|
||||
void CAppSptView::AssertValid() const
|
||||
{
|
||||
CView::AssertValid();
|
||||
}
|
||||
|
||||
void CAppSptView::Dump(CDumpContext& dc) const
|
||||
{
|
||||
CView::Dump(dc);
|
||||
}
|
||||
#endif //_DEBUG
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CAppSptView message handlers
|
||||
|
||||
BOOL CAppSptView::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(CAppSptDetailListView),
|
||||
CSize(SPL_VIEW_APP_DETAIL_WIDTH, rect.bottom-rect.top), pContext));
|
||||
m_pDetailListView = static_cast<CView*>(m_firstSplitter.GetPane((int)SPL_VIEW_ROW_0, (int)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(CAppSptChannelListView), CSize(0, (rect.bottom-rect.top)/4), 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(CAppSptConListView), CSize(0, (rect.bottom-rect.top)/4*3), pContext));
|
||||
m_pScriptListView = static_cast<CView*>(m_secondSplitter.GetPane(SPL_VIEW_ROW_1, SPL_VIEW_COL_0));
|
||||
ASSERT(m_pScriptListView != NULL);
|
||||
m_pScriptListView->OnInitialUpdate();
|
||||
|
||||
m_secondSplitter.RecalcLayout();
|
||||
m_firstSplitter.RecalcLayout();
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void CAppSptView::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();
|
||||
m_secondSplitter.SetRowInfo((int)SPL_VIEW_ROW_0 , (int)cy/4, (int)VAL_ZERO);
|
||||
m_secondSplitter.RecalcLayout();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user