// br6View.cpp : implementation of the CBr6View class // #include "stdafx.h" #include "br6.h" #include "br6Doc.h" #include "br6View.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif #include "BuildingInfoDlg.h" ///////////////////////////////////////////////////////////////////////////// // CBr6View IMPLEMENT_DYNCREATE(CBr6View, CView) BEGIN_MESSAGE_MAP(CBr6View, CView) //{{AFX_MSG_MAP(CBr6View) ON_COMMAND(ID_BUILDING_ENTEREDITBUILDINGINFO, OnBuildingEntereditbuildinginfo) //}}AFX_MSG_MAP // Standard printing commands ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint) ON_COMMAND(ID_FILE_PRINT_DIRECT, CView::OnFilePrint) ON_COMMAND(ID_FILE_PRINT_PREVIEW, CView::OnFilePrintPreview) END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CBr6View construction/destruction CBr6View::CBr6View() { // TODO: add construction code here } CBr6View::~CBr6View() { } BOOL CBr6View::PreCreateWindow(CREATESTRUCT& cs) { // TODO: Modify the Window class or styles here by modifying // the CREATESTRUCT cs return CView::PreCreateWindow(cs); } ///////////////////////////////////////////////////////////////////////////// // CBr6View drawing void CBr6View::OnDraw(CDC* pDC) { CBr6Doc* pDoc = GetDocument(); ASSERT_VALID(pDoc); // TODO: add draw code for native data here } ///////////////////////////////////////////////////////////////////////////// // CBr6View printing BOOL CBr6View::OnPreparePrinting(CPrintInfo* pInfo) { // default preparation return DoPreparePrinting(pInfo); } void CBr6View::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/) { // TODO: add extra initialization before printing } void CBr6View::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/) { // TODO: add cleanup after printing } ///////////////////////////////////////////////////////////////////////////// // CBr6View diagnostics #ifdef _DEBUG void CBr6View::AssertValid() const { CView::AssertValid(); } void CBr6View::Dump(CDumpContext& dc) const { CView::Dump(dc); } CBr6Doc* CBr6View::GetDocument() // non-debug version is inline { ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CBr6Doc))); return (CBr6Doc*)m_pDocument; } #endif //_DEBUG ///////////////////////////////////////////////////////////////////////////// // CBr6View message handlers void CBr6View::OnBuildingEntereditbuildinginfo() { CBuildingInfoDlg oneBldg; CBr6Doc* pDoc; pDoc=GetDocument(); oneBldg.m_BuildingName=pDoc->DocBuildingName; oneBldg.m_SquareFeet=pDoc->DocSquareFeet; oneBldg.DoModal(); pDoc->DocBuildingName=oneBldg.m_BuildingName; pDoc->DocSquareFeet =oneBldg.m_SquareFeet; }