ActiveX WebBrowser control creation during runtime 
Author Message
 ActiveX WebBrowser control creation during runtime

Hi there,

I need to create a WebBrowser control during runtime and display it in an
custom control, can sombody help me ow to do this.

I tried to create the control by CreateEx, but I haven't got the
lpszClassName, so I cannot create it. I already got a container class calles
CWebBrowser2 created by VC. And I cannot use the control inside a dialog, I
need it in my custom control which is SECControlBar from Objective Toolkit.

Thanks



Sat, 21 Dec 2002 03:00:00 GMT  
 ActiveX WebBrowser control creation during runtime
Hi, Thorsten!

FYI, the CWebBrowser2 class that is generated by default contains overrides
of the CWnd::Create methods one that still has the lpszClassName parameter,
but is not used. And one that does without it entirely. I have not tried
doing *exactly* what you describe, but try passing NULL as the lpszClassName
param to the CWebBrowser2::Create or using the other version. There may or
may not be a problem with not passing the license key for the WebBrowser
control, but I don't know for sure. Anyway, see MSDN Article ID: Q151804,
"PRB: Dynamic Creation of Redistributable Control Fails", if this should
rear it's ugly head.

Jeff...

Quote:

>Hi there,

>I need to create a WebBrowser control during runtime and display it in an
>custom control, can sombody help me ow to do this.

>I tried to create the control by CreateEx, but I haven't got the
>lpszClassName, so I cannot create it. I already got a container class
calles
>CWebBrowser2 created by VC. And I cannot use the control inside a dialog, I
>need it in my custom control which is SECControlBar from Objective Toolkit.

>Thanks



Sat, 21 Dec 2002 03:00:00 GMT  
 ActiveX WebBrowser control creation during runtime
Hi,
Use creation something like...:

    m_whatever.Create(NULL, WS_VISIBLE | WS_CHILD, CRect(0, 0, 100, 100),
                        this, ID_BROWSER)

where ID_BROWSER is defined in your resource symbols.

Regards,

--
Adrian O' Neill
Remove * in email address to reply


Quote:
> Hi there,

> I need to create a WebBrowser control during runtime and display it in an
> custom control, can sombody help me ow to do this.

> I tried to create the control by CreateEx, but I haven't got the
> lpszClassName, so I cannot create it. I already got a container class
calles
> CWebBrowser2 created by VC. And I cannot use the control inside a dialog,
I
> need it in my custom control which is SECControlBar from Objective
Toolkit.

> Thanks



Sat, 21 Dec 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Control webbrowser ActiveX control in composit ActiveX control

2. How to adjust activex dimensions during runtime?

3. Adding WebBrowser control at runtime

4. Controls to move and dock during runtime.

5. Runtime creation of controls

6. How to assign an event handler to a control during runtime

7. Resize a Control during Runtime

8. Runtime control creation and event handling?

9. Newbie:Size of Control created during runtime

10. Dynamic Control Creation At Runtime?

11. DLCTL_NO_RUNACTIVEXCTLS but webbrowser run my activex control..!!!

12. Hosting a WebBrowser Control inside an activeX ?

 

 
Powered by phpBB® Forum Software