资源简介
自己用mfc的htmlview做的浏览器,带收藏夹功能,可继续动态添加网站

代码片段和文件信息
// MainFrm.cpp : implementation of the CMainframe class
//
#include “stdafx.h“
#include “web.h“
#include “MainFrm.h“
#include “webview.h“
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CMainframe
IMPLEMENT_DYNCREATE(CMainframe CframeWnd)
BEGIN_MESSAGE_MAP(CMainframe CframeWnd)
//{{AFX_MSG_MAP(CMainframe)
// NOTE - the ClassWizard will add and remove mapping macros here.
// DO NOT EDIT what you see in these blocks of generated code !
ON_COMMAND_RANGE(0xe00 0xfff OnFavorite)
ON_WM_CREATE()
//}}AFX_MSG_MAP
ON_COMMAND(IDOKOnNew)
END_MESSAGE_MAP()
static UINT indicators[] =
{
ID_SEPARATOR // status line indicator
ID_INDICATOR_CAPS
ID_INDICATOR_NUM
ID_INDICATOR_SCRL
};
/////////////////////////////////////////////////////////////////////////////
// CMainframe construction/destruction
CMainframe::CMainframe()
{
// TODO: add member initialization code here
}
CMainframe::~CMainframe()
{
}
int CMainframe::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
CImageList img;
CString str;
if (CframeWnd::OnCreate(lpCreateStruct) == -1)
return -1;
if (!m_wndToolBar.CreateEx(this) ||
!m_wndToolBar.LoadToolBar(IDR_MAINframe))
{
TRACE0(“Failed to create toolbar\n“);
return -1; // fail to create
}
if (!m_wndDlgBar.Create(this IDR_MAINframe
CBRS_ALIGN_TOP AFX_IDW_DIALOGBAR))
{
TRACE0(“Failed to create dialogbar\n“);
return -1; // fail to create
}
if (!m_wndReBar.Create(this) ||
!m_wndReBar.AddBar(&m_wndToolBar) ||
!m_wndReBar.AddBar(&m_wndDlgBar))
{
TRACE0(“Failed to create rebar\n“);
return -1; // fail to create
}
if (!m_wndStatusBar.Create(this) ||
!m_wndStatusBar.SetIndicators(indicators
sizeof(indicators)/sizeof(UINT)))
{
TRACE0(“Failed to create status bar\n“);
return -1; // fail to create
}
// TODO: Remove this if you don‘t want tool tips
m_wndToolBar.SetBarstyle(m_wndToolBar.GetBarstyle() |
CBRS_TOOLTIPS | CBRS_FLYBY);
UpdateMenu();
return 0;
}
void CMainframe::UpdateMenu()
{
//生成“我的收藏夹”子菜单
char path[MAX_PATH];
CMenu* pMenu;
// 开始消去存在的菜单
pMenu=GetMenu()->GetSubMenu(4);
TRACE(“%d“pMenu->GetMenuItemCount());
// TRACE(“%d“pMenu->GetMenuItemCount());
while(pMenu->DeleteMenu(0 MF_BYPOSITION));
SHGetSpecialFolderPath(NULL path CSIDL_FAVORITES FALSE);
//添加我的收藏菜单项
BuildFavoritesMenu(path 0 pMenu);
}
BOOL CMainframe::PreCreateWindow(CREATESTRUCT& cs)
{
if( !CframeWnd::PreCreateWindow(cs) )
return FALSE;
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
return TRUE;
}
/////////////////////////////////////////////////////////////////////////////
// CMainframe diagnostics
#ifdef _DEBUG
void CMa
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 6649 2011-06-29 16:33 web\MainFrm.cpp
文件 1885 2011-06-29 16:33 web\MainFrm.h
文件 4239 2011-06-29 01:18 web\ReadMe.txt
文件 1198 2011-06-29 01:51 web\res\Toolbar.bmp
文件 1078 2011-06-29 01:18 web\res\web.ico
文件 395 2011-06-29 01:18 web\res\web.rc2
文件 1078 2011-06-29 01:18 web\res\webDoc.ico
文件 1057 2011-06-29 15:16 web\resource.h
文件 205 2011-06-29 01:18 web\StdAfx.cpp
文件 1103 2011-06-29 01:18 web\StdAfx.h
文件 1263 2011-06-29 16:38 web\URL.cpp
文件 1177 2011-06-29 16:38 web\URL.h
文件 44468 2011-06-29 16:40 web\web.aps
文件 2637 2011-06-29 16:55 web\web.clw
文件 4155 2011-06-29 01:18 web\web.cpp
文件 4506 2011-06-29 02:31 web\web.dsp
文件 531 2011-06-29 01:18 web\web.dsw
文件 2224177 2011-06-29 16:55 web\web.exe
文件 1323 2011-06-29 01:18 web\web.h
文件 58368 2011-06-29 16:55 web\web.ncb
文件 51712 2011-06-29 16:55 web\web.opt
文件 1803 2011-06-29 16:55 web\web.plg
文件 12512 2011-06-29 16:40 web\web.rc
文件 1682 2011-06-29 01:18 web\webDoc.cpp
文件 1442 2011-06-29 01:18 web\webDoc.h
文件 3624 2011-06-29 16:33 web\webView.cpp
文件 1965 2011-06-29 16:10 web\webView.h
目录 0 2011-06-29 01:51 web\res
目录 0 2011-06-29 16:55 web
----------- --------- ---------- ----- ----
............此处省略2个文件信息
相关资源
- 基于mfc的多线程文件传输
- C语言课程设计
- MFC数字钟(基于VC6.0)
- c语言电子商务系统
- VC++MFC小游戏实例教程(实例)+MFC类库
- ChartCtrl控件库(可在VS2019中使用)
- 商品库存管理系统 C++ MFC
- 程序案例 利用LabVIEW实现串口通讯
- USB CAN Tool 源代码(LabVIEW 2011环境)
- mfc 调用redis
- MFC视频播放器源码(支持avi/wma/mp3等格
- mfc绘图大全(画直线、矩形、椭圆)
- MFC控件重绘
- 宠物管理系统课程设计(源码+数据库
- hook,捕获所有案件,查找所有窗口,
- (学习)VS2010之MFC入门到精通教程
- MFC文档_视图_框架_模板结构体系深入
- 简单员工管理系统(适合初学MFC)
- c语言课程设计:客房登记系统源码
- 8位竞赛抢答器的课程设计报告.docx
- MFC五子棋游戏
- MFC UDP编程
- MFC的异步网络通讯应用程序
- C++MFC模块讲解,黑发程序员课程整理
- 一个简单而强大的基于MFC的web server源
- 基于MFC的VC++仿QQ浏览器源码(雏形)
- MFCaccess.rar
- VC++MFC课程设计的学生成绩管理系统
- MFC 日历控件 万年历 Calendar自绘
- CrystalDiskInfo-HDD/SSD硬盘信息,SMART信息
评论
共有 条评论