資源簡介
功能較全 mfc vc 網絡編程 收藏夾

代碼片段和文件信息
//?MainFrm.cpp?:?implementation?of?the?CMainframe?class
//
#include?“stdafx.h“
#include?“myWeb.h“
#include?“myWebView.h“
#include?“MainFrm.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_WM_CREATE()
//}}AFX_MSG_MAP
ON_COMMAND(IDOK?OnNew)
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)
{
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);
return?0;
}
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?CMainframe::AssertValid()?const
{
CframeWnd::AssertValid();
}
void?CMainframe::Dump(CDumpContext&?dc)?const
{
CframeWnd::Dump(dc);
}
#endif?//_DEBUG
/////////////////////////////////////////////////////////////////////////////
//?CMainframe?message?handlers
void??CMainframe::OnNew()
{
CString??pp;
//獲得用戶在地址欄中輸入的URL
m_wndDlgBar.GetDlgItem(IDC_ADDR)->GetWindowText(pp);
//瀏覽指定的網頁
((CMyWebView*)GetActiveView())->Navigate(pp);
}
void?CMainframe::SetPage(LPCTSTR?lpszURL)
{
m_wndDlgBar.GetDlgIte
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2014-06-11?23:52??功能全面的Web瀏覽器\
?????目錄???????????0??2014-06-10?11:00??功能全面的Web瀏覽器\Debug\
?????文件???????25441??2014-06-02?20:36??功能全面的Web瀏覽器\Debug\MainFrm.obj
?????文件??????118948??2014-06-02?20:36??功能全面的Web瀏覽器\Debug\myWeb.exe
?????文件??????348384??2014-06-02?20:36??功能全面的Web瀏覽器\Debug\myWeb.ilk
?????文件???????23702??2014-06-02?20:36??功能全面的Web瀏覽器\Debug\myWeb.obj
?????文件?????5651468??2014-06-02?20:36??功能全面的Web瀏覽器\Debug\myWeb.pch
?????文件??????353280??2014-06-02?20:36??功能全面的Web瀏覽器\Debug\myWeb.pdb
?????文件????????8332??2014-06-02?20:36??功能全面的Web瀏覽器\Debug\myWeb.res
?????文件???????15496??2014-06-02?20:36??功能全面的Web瀏覽器\Debug\myWebDoc.obj
?????文件???????25804??2014-06-02?20:36??功能全面的Web瀏覽器\Debug\myWebView.obj
?????文件??????106706??2014-06-02?20:36??功能全面的Web瀏覽器\Debug\StdAfx.obj
?????文件??????205824??2014-06-11?23:51??功能全面的Web瀏覽器\Debug\vc60.idb
?????文件??????364544??2014-06-02?20:36??功能全面的Web瀏覽器\Debug\vc60.pdb
?????文件????????3060??2005-08-10?13:36??功能全面的Web瀏覽器\MainFrm.cpp
?????文件????????1688??2005-08-10?13:18??功能全面的Web瀏覽器\MainFrm.h
?????文件???????45276??2005-08-09?17:31??功能全面的Web瀏覽器\myWeb.aps
?????文件????????2639??2005-08-10?13:20??功能全面的Web瀏覽器\myWeb.clw
?????文件????????4189??2005-08-10?13:32??功能全面的Web瀏覽器\myWeb.cpp
?????文件????????4534??2005-08-09?14:54??功能全面的Web瀏覽器\myWeb.dsp
?????文件?????????533??2005-08-09?14:54??功能全面的Web瀏覽器\myWeb.dsw
?????文件????????1345??2005-08-09?14:54??功能全面的Web瀏覽器\myWeb.h
?????文件???????66560??2005-08-10?13:39??功能全面的Web瀏覽器\myWeb.ncb
?????文件???????50688??2014-06-11?23:52??功能全面的Web瀏覽器\myWeb.opt
?????文件????????1626??2005-08-10?13:39??功能全面的Web瀏覽器\myWeb.plg
?????文件???????12604??2005-08-09?17:31??功能全面的Web瀏覽器\myWeb.rc
?????文件????????1720??2005-08-10?13:32??功能全面的Web瀏覽器\myWebDoc.cpp
?????文件????????1464??2005-08-09?14:54??功能全面的Web瀏覽器\myWebDoc.h
?????文件????????3036??2005-08-10?13:32??功能全面的Web瀏覽器\myWebView.cpp
?????文件????????1870??2005-08-10?13:39??功能全面的Web瀏覽器\myWebView.h
?????文件????????4287??2005-08-09?14:54??功能全面的Web瀏覽器\ReadMe.txt
............此處省略8個文件信息
- 上一篇:醫院管理系統 C++
- 下一篇:cocos2dx寫的坦克小游戲
評論
共有 條評論