ex030206view.cpp
来自「深入浅出Visual C++入门进阶与应用实例 随书光盘 作者 何志丹」· C++ 代码 · 共 111 行
CPP
111 行
// Ex030206View.cpp : implementation of the CEx030206View class
//
#include "stdafx.h"
#include "Ex030206.h"
#include "Ex030206Doc.h"
#include "Ex030206View.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CEx030206View
IMPLEMENT_DYNCREATE(CEx030206View, CHtmlView)
BEGIN_MESSAGE_MAP(CEx030206View, CHtmlView)
//{{AFX_MSG_MAP(CEx030206View)
ON_COMMAND(ID_CSDN, OnCsdn)
ON_COMMAND(ID_VCKBASE, OnVckbase)
ON_COMMAND(ID_VCSHARE, OnVcshare)
//}}AFX_MSG_MAP
// Standard printing commands
ON_COMMAND(ID_FILE_PRINT, CHtmlView::OnFilePrint)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CEx030206View construction/destruction
CEx030206View::CEx030206View()
{
// TODO: add construction code here
}
CEx030206View::~CEx030206View()
{
}
BOOL CEx030206View::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
return CHtmlView::PreCreateWindow(cs);
}
/////////////////////////////////////////////////////////////////////////////
// CEx030206View drawing
void CEx030206View::OnDraw(CDC* pDC)
{
CEx030206Doc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
// TODO: add draw code for native data here
}
void CEx030206View::OnInitialUpdate()
{
CHtmlView::OnInitialUpdate();
Navigate2(_T("http://www.vcshare.net"),NULL,NULL);
}
/////////////////////////////////////////////////////////////////////////////
// CEx030206View printing
/////////////////////////////////////////////////////////////////////////////
// CEx030206View diagnostics
#ifdef _DEBUG
void CEx030206View::AssertValid() const
{
CHtmlView::AssertValid();
}
void CEx030206View::Dump(CDumpContext& dc) const
{
CHtmlView::Dump(dc);
}
CEx030206Doc* CEx030206View::GetDocument() // non-debug version is inline
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CEx030206Doc)));
return (CEx030206Doc*)m_pDocument;
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CEx030206View message handlers
void CEx030206View::OnCsdn()
{
Navigate2(_T("http://www.Csdn.net"),NULL,NULL);
}
void CEx030206View::OnVckbase()
{
Navigate2(_T("http://www.Vckbase.net"),NULL,NULL);
}
void CEx030206View::OnVcshare()
{
Navigate2(_T("http://www.Vcshare.net"),NULL,NULL);
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?