Files
coco df489d5640 a
2026-07-03 16:05:30 +08:00

81 lines
2.7 KiB
C++

// opexec2drsptestframe.cpp : implementation file
//
#include "stdafx.h"
#include "geomative.h"
#include "opexec2drsptestframe.h"
#include "opexec2drsptestgrlistview.h"
#include "opexec2drsptesttdlistview.h"
#include "opexec2drsptesttdview.h"
#include "opexec2drsptestgrview.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// COpExec2DRSPTestFrame
IMPLEMENT_DYNCREATE(COpExec2DRSPTestFrame, CFrameWnd)
COpExec2DRSPTestFrame::COpExec2DRSPTestFrame()
{
}
COpExec2DRSPTestFrame::~COpExec2DRSPTestFrame()
{
}
BEGIN_MESSAGE_MAP(COpExec2DRSPTestFrame, CFrameWnd)
//{{AFX_MSG_MAP(COpExec2DRSPTestFrame)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// COpExec2DRSPTestFrame message handlers
BOOL COpExec2DRSPTestFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)
{
// TODO: Add your specialized code here and/or call the base class
CRect rect;
if (VAL_ZERO == m_firstSplitter.GetSafeHwnd())
{
GetClientRect(rect);
m_firstSplitter.CreateStatic(this, 2, 1);
/*
VERIFY(m_firstSplitter.CreateView(0, 0, RUNTIME_CLASS(COpExec2DRSPTestGrView), CSize(rect.right-rect.left, (rect.bottom-rect.top)/6), pContext));
m_pOpExec2DRSPTestGrView = static_cast<COpExec2DRSPTestGrView*>(m_firstSplitter.GetPane(0, 0));
ASSERT(m_pOpExec2DRSPTestGrView != NULL);
m_pOpExec2DRSPTestGrView->OnInitialUpdate();
*/
VERIFY(m_firstSplitter.CreateView(0, 0, RUNTIME_CLASS(COpExec2DRSPTestTdView), CSize(rect.right-rect.left, (rect.bottom-rect.top)*3/5), pContext));
m_pOpExec2DRSPTestTdView = static_cast<COpExec2DRSPTestTdView*>(m_firstSplitter.GetPane(0, 0));
ASSERT(m_pOpExec2DRSPTestTdView != NULL);
m_pOpExec2DRSPTestTdView->OnInitialUpdate();
m_secondSplitter.CreateStatic(&m_firstSplitter, 1, 2, WS_CHILD | WS_VISIBLE, m_firstSplitter.IdFromRowCol(1, 0));
VERIFY(m_secondSplitter.CreateView(0, 0, RUNTIME_CLASS(COpExec2DRSPTestGrListView), CSize((rect.right-rect.left)*2/5, (rect.bottom-rect.top)*7/30), pContext));
m_pOpExec2DRSPTestGrListView = static_cast<COpExec2DRSPTestGrListView*>(m_secondSplitter.GetPane(0, 0));
ASSERT(m_pOpExec2DRSPTestGrListView != NULL);
VERIFY(m_secondSplitter.CreateView(0, 1, RUNTIME_CLASS(COpExec2DRSPTestTdListView), CSize((rect.right-rect.left)*3/5, (rect.bottom-rect.top)*7/30), pContext));
m_pOpExec2DRSPTestTdListView = static_cast<COpExec2DRSPTestTdListView*>(m_secondSplitter.GetPane(0, 1));
ASSERT(m_pOpExec2DRSPTestTdListView != NULL);
m_secondSplitter.RecalcLayout();
m_firstSplitter.RecalcLayout();
m_pOpExec2DRSPTestTdView->SetFocus();
}
return CFrameWnd::OnCreateClient(lpcs, pContext);
}