⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ie3view.cpp

📁 功能简单的浏览器,源代码 有收藏功能,界面比较简单
💻 CPP
字号:
// IE3View.cpp : implementation of the CIE3View class
//

#include "stdafx.h"
#include "IE3.h"

#include "IE3Doc.h"
#include "IE3View.h"
#include "mainfrm.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CIE3View

IMPLEMENT_DYNCREATE(CIE3View, CHtmlView)

BEGIN_MESSAGE_MAP(CIE3View, CHtmlView)
	//{{AFX_MSG_MAP(CIE3View)
	ON_BN_CLICKED(IDC_BUTTONSITE, OnButtonsite)
	ON_CBN_EDITCHANGE(IDC_COMBOSITE, OnEditchangeCombosite)
	ON_CBN_SELCHANGE(IDC_COMBOSITE, OnSelchangeCombosite)
	//}}AFX_MSG_MAP
	// Standard printing commands
	ON_COMMAND(ID_FILE_PRINT, CHtmlView::OnFilePrint)
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CIE3View construction/destruction

CIE3View::CIE3View()
{
	// TODO: add construction code here

}

CIE3View::~CIE3View()
{
}

BOOL CIE3View::PreCreateWindow(CREATESTRUCT& cs)
{
	// TODO: Modify the Window class or styles here by modifying
	//  the CREATESTRUCT cs

	return CHtmlView::PreCreateWindow(cs);
}

/////////////////////////////////////////////////////////////////////////////
// CIE3View drawing

void CIE3View::OnDraw(CDC* pDC)
{
	CIE3Doc* pDoc = GetDocument();
	ASSERT_VALID(pDoc);
	// TODO: add draw code for native data here
}

void CIE3View::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(site,NULL,NULL);
}

/////////////////////////////////////////////////////////////////////////////
// CIE3View printing


/////////////////////////////////////////////////////////////////////////////
// CIE3View diagnostics

#ifdef _DEBUG
void CIE3View::AssertValid() const
{
	CHtmlView::AssertValid();
}

void CIE3View::Dump(CDumpContext& dc) const
{
	CHtmlView::Dump(dc);
}

CIE3Doc* CIE3View::GetDocument() // non-debug version is inline
{
	ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CIE3Doc)));
	return (CIE3Doc*)m_pDocument;
}
#endif //_DEBUG

/////////////////////////////////////////////////////////////////////////////
// CIE3View message handlers

void CIE3View::OnButtonsite() 
{
	// TODO: Add your control notification handler code here
	CClientDC dc(this);
	dc.TextOut(2,8,CString("Linking to <")+site+">...");
	Navigate2(site,NULL,NULL);
	Invalidate(FALSE);
}

void CIE3View::OnEditchangeCombosite() 
{
	// TODO: Add your control notification handler code here
	CMainFrame *pw=(CMainFrame *)AfxGetMainWnd();
	CDialogBar *pb=pw->GetDialogBar();
	pb->GetDlgItemText(IDC_COMBOSITE,site);
}

void CIE3View::OnSelchangeCombosite() 
{
	// TODO: Add your control notification handler code here
	CMainFrame *pw=(CMainFrame *)AfxGetMainWnd();
	CDialogBar *pb=pw->GetDialogBar();
	pb->GetDlgItemText(IDC_COMBOSITE,site);
	OnButtonsite();
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -