📄 exploreview.cpp
字号:
// ExploreView.cpp : implementation file
//
#include "stdafx.h"
#include "DiamondReader.h"
#include "ExploreView.h"
#include "StaticSplitterWnd.h"
#include "ExploreToolView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CExploreView
IMPLEMENT_DYNCREATE(CExploreView, CHtmlView)
CExploreView::CExploreView()
{
//{{AFX_DATA_INIT(CExploreView)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
CExploreView::~CExploreView()
{
}
void CExploreView::DoDataExchange(CDataExchange* pDX)
{
CHtmlView::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CExploreView)
// NOTE: the ClassWizard will add DDX and DDV calls here
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CExploreView, CHtmlView)
//{{AFX_MSG_MAP(CExploreView)
ON_WM_CREATE()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CExploreView diagnostics
#ifdef _DEBUG
void CExploreView::AssertValid() const
{
CHtmlView::AssertValid();
}
void CExploreView::Dump(CDumpContext& dc) const
{
CHtmlView::Dump(dc);
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CExploreView message handlers
int CExploreView::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CHtmlView::OnCreate(lpCreateStruct) == -1)
return -1;
// TODO: Add your specialized creation code here
return 0;
}
void CExploreView::OnInitialUpdate()
{
//TODO: This code navigates to a popular spot on the web.
//Change the code to go where you'd like.
char *dir = new char[255];
int length = 255;
//获取欢迎界面的地址,并显示
::GetModuleFileName(AfxGetInstanceHandle(),dir,length);
for (int i=length-1;i;i--)
{
if (dir[i-1]=='\\')
{
dir[i] = '\0';
length = i;
break;
}
}
strcat(dir,"//welcome.htm");
Navigate(dir);
delete[] dir;
}
void CExploreView::OnNavigateComplete2(LPCTSTR strURL)
{
// TODO: Add your specialized code here and/or call the base class
CStaticSplitterWnd *parent = (CStaticSplitterWnd*)this->GetParent();
CExploreToolView *view = (CExploreToolView*)parent->GetPane(0,0);
view->setURL((char*)strURL);
CHtmlView::OnNavigateComplete2(strURL);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -