📄 webview.cpp
字号:
// WebView.cpp : implementation of the CWebView class
//
#include "stdafx.h"
#include "MultiView.h"
#include "WebDoc.h"
#include "WebView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CWebView
IMPLEMENT_DYNCREATE(CWebView, CHtmlView)
BEGIN_MESSAGE_MAP(CWebView, CHtmlView)
//{{AFX_MSG_MAP(CWebView)
// 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, CHtmlView::OnFilePrint)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CWebView construction/destruction
CWebView::CWebView()
{
// TODO: add construction code here
}
CWebView::~CWebView()
{
}
BOOL CWebView::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
return CHtmlView::PreCreateWindow(cs);
}
/////////////////////////////////////////////////////////////////////////////
// CWebView drawing
void CWebView::OnDraw(CDC* pDC)
{
CWebDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
// TODO: add draw code for native data here
}
void CWebView::OnInitialUpdate()
{
CHtmlView::OnInitialUpdate();
// TODO: This code navigates to a popular spot on the web.
// change the code to go where you'd like.
// Navigate2(_T("http://www.microsoft.com/visualc/"),NULL,NULL);
Navigate2(_T("http://hariseldon/"),NULL,NULL);
}
/////////////////////////////////////////////////////////////////////////////
// CWebView printing
/////////////////////////////////////////////////////////////////////////////
// CWebView diagnostics
#ifdef _DEBUG
void CWebView::AssertValid() const
{
CHtmlView::AssertValid();
}
void CWebView::Dump(CDumpContext& dc) const
{
CHtmlView::Dump(dc);
}
CWebDoc* CWebView::GetDocument() // non-debug version is inline
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CWebDoc)));
return (CWebDoc*)m_pDocument;
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CWebView message handlers
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -