要想在自己的程序里显示网页,现在一般的方法是 使用ActiveX控件来 WebBrower,现在我不想使用这个方法,直接在自己的窗口里建立显示网页的窗口,同时去个IHTMLDocument接口,如何做呢,OutLook就是这样的.
解决方案 »
- 【求助】已知坐标如何画十字?
- C++指针对象错误
- 用多线程、双缓冲显示相机图像时 程序出错
- 从CDialog派生的类处理WM_PAINT和WM_NCPAINT的问题
- 怎样去掉treeCtrl的TVS_CHECKBOXES属性?我用ModifyStyle(TVS_CHECKBOXES, 0)不行,前面的checkbox框还是可以看见????多谢!
- 又要麻烦大家了,哪位有空帮我调试一个程序。谢谢!
- 有人有时间当面教我做一个软件吗,又在北京的MFC高手吗,价格面议QQ.15807602
- 窗体分割怎么割不开还抱错,晕了两天了?????
- 初学者问题
- 怎么判断两个Region是否互相交错?
- 用WIN32写DLL是否能减小DLL体积(相对于MFC向导生成的DLL)?
- 动态创建一个RichEdit控件,怎样让对话框一运行,RichEdit控件就得到输入焦点!急
CHtmlView::Navigate2
I liked your implementation of CHtml-Ctrl in a dialog. It is exactly what I wanted my app to do. But there's one thing I want to know. Is there a way I can disable the popup menu that results when the user right-clicks on the HTML page? I don't want the user to right-click and view the source of the HTML file I display in my app. I tried overriding WM_CONTEXTMENU in my CHtmlCtrl-derived window, but it doesn't work.http://msdn.microsoft.com/msdnmag/issues/01/09/c/
// CDataHTMLView html view#ifndef __AFXEXT_H__
#include <afxext.h>
#endif
#include <afxhtml.h>class CDataHTMLView : public CHtmlView
{
protected:
DECLARE_DYNCREATE(CDataHTMLView)// html Data
public:
CDataHTMLView(); // protected constructor used by dynamic creation
//{{AFX_DATA(CDataHTMLView)
// NOTE: the ClassWizard will add data members here
//}}AFX_DATA// Attributes
public:// Operations
public:// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CDataHTMLView)
public:
virtual void OnInitialUpdate();
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL// Implementation
public:
virtual ~CDataHTMLView();
protected:#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif // Generated message map functions
//{{AFX_MSG(CDataHTMLView)
// NOTE - the ClassWizard will add and remove member functions here.
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};///////////////////////////////////////////////////////////////////////////////{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.#endif // !defined(AFX_DATAHTMLVIEW_H__49999E9C_4F85_4B55_A014_EC8EE58AD170__INCLUDED_)
{
//显示网页本地c:\\mousenet\\node_in_dtd.xml,当然也可以显示远程的
Navigate2(_T("c:\\mousenet\\node_in_dtd.xml"),NULL,NULL);
}
大家可以用Spy看看。