www.gusucode.com > VC++制作一个可自动停靠的菜单工具条-源码程序 > VC++制作一个可自动停靠的菜单工具条-源码程序/code/BarViewView.cpp
// BarViewView.cpp : implementation of the CBarViewView class // Download by http://www.NewXing.com #include "stdafx.h" #include "BarView.h" #include "BarViewDoc.h" #include "BarViewView.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CBarViewView IMPLEMENT_DYNCREATE(CBarViewView, CView) BEGIN_MESSAGE_MAP(CBarViewView, CView) //{{AFX_MSG_MAP(CBarViewView) // NOTE - the ClassWizard will add and remove mapping macros here. // DO NOT EDIT what you see in these blocks of generated code! //}}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() ///////////////////////////////////////////////////////////////////////////// // CBarViewView construction/destruction CBarViewView::CBarViewView() { // TODO: add construction code here } CBarViewView::~CBarViewView() { } BOOL CBarViewView::PreCreateWindow(CREATESTRUCT& cs) { // TODO: Modify the Window class or styles here by modifying // the CREATESTRUCT cs return CView::PreCreateWindow(cs); } ///////////////////////////////////////////////////////////////////////////// // CBarViewView drawing void CBarViewView::OnDraw(CDC* pDC) { CBarViewDoc* pDoc = GetDocument(); ASSERT_VALID(pDoc); // TODO: add draw code for native data here } ///////////////////////////////////////////////////////////////////////////// // CBarViewView printing BOOL CBarViewView::OnPreparePrinting(CPrintInfo* pInfo) { // default preparation return DoPreparePrinting(pInfo); } void CBarViewView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/) { // TODO: add extra initialization before printing } void CBarViewView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/) { // TODO: add cleanup after printing } ///////////////////////////////////////////////////////////////////////////// // CBarViewView diagnostics #ifdef _DEBUG void CBarViewView::AssertValid() const { CView::AssertValid(); } void CBarViewView::Dump(CDumpContext& dc) const { CView::Dump(dc); } CBarViewDoc* CBarViewView::GetDocument() // non-debug version is inline { ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CBarViewDoc))); return (CBarViewDoc*)m_pDocument; } #endif //_DEBUG ///////////////////////////////////////////////////////////////////////////// // CBarViewView message handlers