webbrowser控件和CHtmlView打开页面有什么区别?

malone1 2011-07-15 03:53:25
现在有一个页面用CHtmlView打开没什么问题,但是用webbrowser打开的时候,页面上的按钮点击没有反应,很奇怪的问题。
...全文
289 10 打赏 收藏 转发到动态 举报
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
ilovexgx 2012-01-22
  • 打赏
  • 举报
回复
如需要阅读该回复
回复就回呗,有什么了不起
malone1 2011-07-15
  • 打赏
  • 举报
回复
这个页面用IE和世界之窗打开没问题,用firefox打开按钮不响应啊。
老邓 2011-07-15
  • 打赏
  • 举报
回复
只能说是你的方法有问题。
http://www.codeproject.com/KB/miscctrl/webapp.aspx
至善者善之敌 2011-07-15
  • 打赏
  • 举报
回复

struct __declspec(uuid("eab22ac1-30c1-11cf-a7eb-0000c05bae0b"))
IWebBrowser : IDispatch
{
//
// Property data
//

__declspec(property(get=GetApplication))
IDispatchPtr Application;
__declspec(property(get=GetParent))
IDispatchPtr Parent;
__declspec(property(get=GetContainer))
IDispatchPtr Container;
__declspec(property(get=GetDocument))
IDispatchPtr Document;
__declspec(property(get=GetTopLevelContainer))
VARIANT_BOOL TopLevelContainer;
__declspec(property(get=GetType))
_bstr_t Type;
__declspec(property(get=GetLeft,put=PutLeft))
long Left;
__declspec(property(get=GetTop,put=PutTop))
long Top;
__declspec(property(get=GetWidth,put=PutWidth))
long Width;
__declspec(property(get=GetHeight,put=PutHeight))
long Height;
__declspec(property(get=GetLocationName))
_bstr_t LocationName;
__declspec(property(get=GetLocationURL))
_bstr_t LocationURL;
__declspec(property(get=GetBusy))
VARIANT_BOOL Busy;

//
// Wrapper methods for error-handling
//

HRESULT GoBack ( );
HRESULT GoForward ( );
HRESULT GoHome ( );
HRESULT GoSearch ( );
HRESULT Navigate (
_bstr_t URL,
VARIANT * Flags = &vtMissing,
VARIANT * TargetFrameName = &vtMissing,
VARIANT * PostData = &vtMissing,
VARIANT * Headers = &vtMissing );
HRESULT Refresh ( );
HRESULT Refresh2 (
VARIANT * Level = &vtMissing );
HRESULT Stop ( );
IDispatchPtr GetApplication ( );
IDispatchPtr GetParent ( );
IDispatchPtr GetContainer ( );
IDispatchPtr GetDocument ( );
VARIANT_BOOL GetTopLevelContainer ( );
_bstr_t GetType ( );
long GetLeft ( );
void PutLeft (
long pl );
long GetTop ( );
void PutTop (
long pl );
long GetWidth ( );
void PutWidth (
long pl );
long GetHeight ( );
void PutHeight (
long pl );
_bstr_t GetLocationName ( );
_bstr_t GetLocationURL ( );
VARIANT_BOOL GetBusy ( );

//
// Raw methods provided by interface
//

virtual HRESULT __stdcall raw_GoBack ( ) = 0;
virtual HRESULT __stdcall raw_GoForward ( ) = 0;
virtual HRESULT __stdcall raw_GoHome ( ) = 0;
virtual HRESULT __stdcall raw_GoSearch ( ) = 0;
virtual HRESULT __stdcall raw_Navigate (
BSTR URL,
VARIANT * Flags = &vtMissing,
VARIANT * TargetFrameName = &vtMissing,
VARIANT * PostData = &vtMissing,
VARIANT * Headers = &vtMissing ) = 0;
virtual HRESULT __stdcall raw_Refresh ( ) = 0;
virtual HRESULT __stdcall raw_Refresh2 (
VARIANT * Level = &vtMissing ) = 0;
virtual HRESULT __stdcall raw_Stop ( ) = 0;
virtual HRESULT __stdcall get_Application (
IDispatch * * ppDisp ) = 0;
virtual HRESULT __stdcall get_Parent (
IDispatch * * ppDisp ) = 0;
virtual HRESULT __stdcall get_Container (
IDispatch * * ppDisp ) = 0;
virtual HRESULT __stdcall get_Document (
IDispatch * * ppDisp ) = 0;
virtual HRESULT __stdcall get_TopLevelContainer (
VARIANT_BOOL * pBool ) = 0;
virtual HRESULT __stdcall get_Type (
BSTR * Type ) = 0;
virtual HRESULT __stdcall get_Left (
long * pl ) = 0;
virtual HRESULT __stdcall put_Left (
long pl ) = 0;
virtual HRESULT __stdcall get_Top (
long * pl ) = 0;
virtual HRESULT __stdcall put_Top (
long pl ) = 0;
virtual HRESULT __stdcall get_Width (
long * pl ) = 0;
virtual HRESULT __stdcall put_Width (
long pl ) = 0;
virtual HRESULT __stdcall get_Height (
long * pl ) = 0;
virtual HRESULT __stdcall put_Height (
long pl ) = 0;
virtual HRESULT __stdcall get_LocationName (
BSTR * LocationName ) = 0;
virtual HRESULT __stdcall get_LocationURL (
BSTR * LocationURL ) = 0;
virtual HRESULT __stdcall get_Busy (
VARIANT_BOOL * pBool ) = 0;
};

malone1 2011-07-15
  • 打赏
  • 举报
回复
iwebbrowser?是什么东西,和webbrowser有区别
malone1 2011-07-15
  • 打赏
  • 举报
回复
iwebbrowser?是什么东西,和iwebbrowser有区别
malone1 2011-07-15
  • 打赏
  • 举报
回复
是IE啊,页面在IE和CHtmlView中打开是没有问题的按钮有反应。webbrowser不知道为什么有问题,点页面按钮就没反应了
ryfdizuo 2011-07-15
  • 打赏
  • 举报
回复
chtmlview=cfromview+iwebbrowser
jackyjkchen 2011-07-15
  • 打赏
  • 举报
回复
CHtmlView调的是IE,你的浏览器是IE否?

64,654

社区成员

发帖
与我相关
我的任务
社区描述
C++ 语言相关问题讨论,技术干货分享,前沿动态等
c++ 技术论坛(原bbs)
社区管理员
  • C++ 语言社区
  • encoderlee
  • paschen
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
  1. 请不要发布与C++技术无关的贴子
  2. 请不要发布与技术无关的招聘、广告的帖子
  3. 请尽可能的描述清楚你的问题,如果涉及到代码请尽可能的格式化一下

试试用AI创作助手写篇文章吧