Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
HtmlCtrl.cpp
Package: YCWYXSLQ.rar [view]
Upload User: fhtm20
Upload Date: 2021-02-11
Package Size: 3405k
Code Size: 2k
Category:
Compress-Decompress algrithms
Development Platform:
Visual C++
- //////////////////////////////////////////////////////////////////////////////
- //功能:对话框内部显示HTML网页
- //作者:依星(airen3339@163.com)
- //日期:2005.12
- /////////////////////////////////////////////////////////////////////////////
- #include "StdAfx.h"
- #include "HtmlCtrl.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- IMPLEMENT_DYNAMIC(CHtmlCtrl, CHtmlView)
- BEGIN_MESSAGE_MAP(CHtmlCtrl, CHtmlView)
- ON_WM_DESTROY()
- ON_WM_MOUSEACTIVATE()
- END_MESSAGE_MAP()
- //////////////////////////////////////////////////////////////////////////
- // Create control in same position as an existing static control with
- // the same ID (could be any kind of control, really)
- //
- BOOL CHtmlCtrl::CreateFromStatic(UINT nID, CWnd* pParent)
- {
- CStatic wndStatic;
- if (!wndStatic.SubclassDlgItem(nID, pParent))
- return FALSE;
- // Get static control rect, convert to parent's client coords.
- CRect rc;
- wndStatic.GetWindowRect(&rc);
- pParent->ScreenToClient(&rc);
- wndStatic.DestroyWindow();
- // create HTML control (CHtmlView)
- return Create(NULL, // class name
- NULL, // title
- (WS_CHILD | WS_VISIBLE ), // style
- rc, // rectangle
- pParent, // parent
- nID, // control ID
- NULL); // frame/doc context not used
- }
- ////////////////
- // Override to avoid CView stuff that assumes a frame.
- //
- void CHtmlCtrl::OnDestroy()
- {
- // This is probably unecessary since ~CHtmlView does it, but
- // safer to mimic CHtmlView::OnDestroy.
- if (m_pBrowserApp) {
- m_pBrowserApp->Release();
- m_pBrowserApp = NULL;
- }
- CWnd::OnDestroy(); // bypass CView doc/frame stuff
- }
- ////////////////
- // Override to avoid CView stuff that assumes a frame.
- //
- int CHtmlCtrl::OnMouseActivate(CWnd* pDesktopWnd, UINT nHitTest, UINT msg)
- {
- // bypass CView doc/frame stuff
- return CWnd::OnMouseActivate(pDesktopWnd, nHitTest, msg);
- }