home *** CD-ROM | disk | FTP | other *** search
- // OServerView.cpp : implementation of the COServerView class
- //
-
- #include "stdafx.h"
- #include "OServer.h"
-
- #include "OServerDoc.h"
- #include "OServerView.h"
-
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
-
- /////////////////////////////////////////////////////////////////////////////
- // COServerView
-
- IMPLEMENT_DYNCREATE(COServerView, CView)
-
- BEGIN_MESSAGE_MAP(COServerView, CView)
- //{{AFX_MSG_MAP(COServerView)
- // NOTE - the ClassWizard will add and remove mapping macros here.
- // DO NOT EDIT what you see in these blocks of generated code!
- ON_COMMAND(ID_CANCEL_EDIT_SRVR, OnCancelEditSrvr)
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
-
- /////////////////////////////////////////////////////////////////////////////
- // COServerView construction/destruction
-
- COServerView::COServerView()
- {
- // TODO: add construction code here
-
- }
-
- COServerView::~COServerView()
- {
- }
-
- BOOL COServerView::PreCreateWindow(CREATESTRUCT& cs)
- {
- // TODO: Modify the Window class or styles here by modifying
- // the CREATESTRUCT cs
-
- return CView::PreCreateWindow(cs);
- }
-
- /////////////////////////////////////////////////////////////////////////////
- // COServerView drawing
-
- void COServerView::OnDraw(CDC* pDC)
- {
- COServerDoc* pDoc = GetDocument();
- ASSERT_VALID(pDoc);
-
- CRect r;
- GetClientRect(&r);
-
-
- // By adding code here, you can control what type of information
- // is viewed in the server while it is being editted.
- pDC->DrawText("Using Visual C++ 4.0, Special Edition",
- &r, DT_CENTER | DT_WORDBREAK);
-
- }
-
- /////////////////////////////////////////////////////////////////////////////
- // OLE Server support
-
- // The following command handler provides the standard keyboard
- // user interface to cancel an in-place editing session. Here,
- // the server (not the container) causes the deactivation.
- void COServerView::OnCancelEditSrvr()
- {
- GetDocument()->OnDeactivateUI(FALSE);
- }
-
- /////////////////////////////////////////////////////////////////////////////
- // COServerView diagnostics
-
- #ifdef _DEBUG
- void COServerView::AssertValid() const
- {
- CView::AssertValid();
- }
-
- void COServerView::Dump(CDumpContext& dc) const
- {
- CView::Dump(dc);
- }
-
- COServerDoc* COServerView::GetDocument() // non-debug version is inline
- {
- ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(COServerDoc)));
- return (COServerDoc*)m_pDocument;
- }
- #endif //_DEBUG
-
- /////////////////////////////////////////////////////////////////////////////
- // COServerView message handlers
-