資源描述:
《網(wǎng)絡(luò)安全實(shí)訓(xùn)報(bào)告》由會(huì)員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在教育資源-天天文庫。
1、網(wǎng)絡(luò)安全實(shí)訓(xùn)報(bào)告導(dǎo)讀:就愛閱讀網(wǎng)友為您分享以下“網(wǎng)絡(luò)安全實(shí)訓(xùn)報(bào)告”的資訊,希望對(duì)您有所幫助,感謝您對(duì)92to.com的支持!《網(wǎng)絡(luò)安全實(shí)訓(xùn)》報(bào)告中的代碼,通過此事件中的代碼可以將打開新窗口的內(nèi)容添加到本地軟件的WebBrowser控件中,實(shí)現(xiàn)網(wǎng)頁的自主顯示。代碼實(shí)現(xiàn)如下://使得本瀏覽器可以獨(dú)立自主地顯示網(wǎng)頁。而無須依賴外部瀏覽器privatevoidpageWebBrowser_NewWindow(objectsender,CancelEventArgse){stringnewUrl=pageWebBrowser.
2、StatusText;toolStripStatusView.Text=正在打開網(wǎng)頁pageWebBrowser.Navigate(newUrl);e.Cancel=true;//使外部無法捕獲此事件}效果圖如下所示:圖3.5超鏈接圖603.6程序主要代碼代碼如下:#include#include#include#include#include#ifdef_DEBUG#definenewDEBUG_NEW#undefTHIS_FILEstaticcharTHIS_FILE[]=__FILE__;#endif
3、IMPLEMENT_DYNCREATE(CMainFrame,CFrameWnd)BEGIN_MESSAGE_MAP(CMainFrame,CFrameWnd)45《網(wǎng)絡(luò)安全實(shí)訓(xùn)》報(bào)告//{{AFX_MSG_MAP(CMainFrame)//NOTE-theClassWizardwilladdandremovemappingmacroshere.//DONOTEDITwhatyouseeintheseblocksofgeneratedcode!ON_WM_CREATE()ON_COMMAND(IDOK,OnNewPage
4、)END_MESSAGE_MAP()staticUINTindicators[]={ID_SEPARATOR,//statuslineindicatorID_INDICATOR_CAPS,ID_INDICATOR_NUM,ID_INDICATOR_SCRL,};60//CMainFrameconstruction/destructionCMainFrame::CMainFrame(){//TODO:addmemberinitializationcodehere}CMainFrame::~CMainFrame(){}int
5、CMainFrame::OnCreate(LPCREATESTRUCTlpCreateStruct){if(CFrameWnd::OnCreate(lpCreateStruct)==-1)return-1;if(!m_wndToolBar.CreateEx(this)
6、
7、!m_wndToolBar.LoadToolBar(IDR_MAINFRAME)){TRACE0(return-1;//failtocreate}if(!m_wndDlgBar.Create(this,IDR_MAINFRAME,CBRS_ALIGN_
8、TOP,AFX_IDW_DIALOGBAR)){TRACE0(return-1;//failtocreate}if(!m_wndReBar.Create(this)
9、
10、!m_wndReBar.AddBar(&m_wndToolBar)
11、
12、!m_wndReBar.AddBar(&m_wndDlgBar)){TRACE0(return-1;//failtocreate}46《網(wǎng)絡(luò)安全實(shí)訓(xùn)》報(bào)告if(!m_wndStatusBar.Create(this)
13、
14、60!m_wndStatusBar.SetIndicators(
15、indicators,sizeof(indicators)/sizeof(UINT))){TRACE0(return-1;//failtocreate}//TODO:Removethisifyoudon’twanttooltipsm_wndToolBar.SetBarStyle(m_wndToolBar.GetBarStyle()
16、CBRS_TOOLTIPS
17、CBRS_FLYBY);return0;}BOOLCMainFrame::PreCreateWindow(CREATESTRUCT&cs){if(!CFrameW
18、nd::PreCreateWindow(cs))returnFALSE;//TODO:ModifytheWindowclassorstylesherebymodifying//theCREATESTRUCTcsreturnTRUE;}//CMainFramediagnostics#ifdef_DEBUGvoidCMa