PC Review


Reply
Thread Tools Rate Thread

ATL to implement <OBJECT>

 
 
Arsen V.
Guest
Posts: n/a
 
      2nd Apr 2004
Hi,

If I want the same object to be a DeskBand and to be able to instantiate
this object using the <OBJECT> tag in HTML, what interfaces do I need to
implement?

I have something like this already, but it is giving me intermittent errors.
I just want to make sure I did not leave off anything important.

Thanks,
Arsen


 
Reply With Quote
 
 
 
 
Brian Muth
Guest
Posts: n/a
 
      2nd Apr 2004
I don't get it. If you want to use it as a Deskband, you only need to
support the IObjectWithSite, IPersistStream, and IDeskBand. On the other
hand, if you want to be instantiating with the <OBJECT> tag, then you need
to implement IOleControl, IOleObject, IViewObjectEx, etc, but then you can't
use it as a Deskband.

Brian



 
Reply With Quote
 
Igor Tandetnik
Guest
Posts: n/a
 
      2nd Apr 2004
"Arsen V." <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)
> If I want the same object to be a DeskBand and to be able to
> instantiate this object using the <OBJECT> tag in HTML, what
> interfaces do I need to implement?


Does it have to be visible when hosted on HTML page? If not, then
IUnknown is sufficient.

You may have difficulties with IObjectWithSite implementation. In both
cases, IE will query for it and call SetSite. When hosted as a toolband,
the pointer you are given is actually IWebBrowser2. But when hosted on
an HTML page, this pointer is IOleClientSite implemented by MSHTML. May
this be the source of your problem? Make sure you degrade gracefully
when the pointer passed to SetSite does not support the interfaces you
expect.
--
With best wishes,
Igor Tandetnik

"For every complex problem, there is a solution that is simple, neat,
and wrong." H.L. Mencken


 
Reply With Quote
 
Chau Johnthan
Guest
Posts: n/a
 
      4th Apr 2004
> If I want the same object to be a DeskBand and to be able to instantiate
> this object using the <OBJECT> tag in HTML, what interfaces do I need to
> implement?



what do you want to do in the html then? why don't you create another object
of other kind?


 
Reply With Quote
 
Arsen V.
Guest
Posts: n/a
 
      5th Apr 2004
Hi,

Igor, I will check the SetSite implementation to make sure it distinguishes
between the IWebBrowser2 and other pointers. Thanks!

I want to instantiate the object with the <OBJECT> tag in order to interact
with it through certain properties. Such as setting an ID, Checking Version
Number, and setting some other properties.

The <OBJECT> does not need to be visible.

Thanks,
Arsen


 
Reply With Quote
 
Chau Johnthan
Guest
Posts: n/a
 
      6th Apr 2004

> I want to instantiate the object with the <OBJECT> tag in order to

interact
> with it through certain properties. Such as setting an ID, Checking

Version
> Number, and setting some other properties.


as setting an ID, I think it is no use. to those who owned an id, it is
assigned
in designtime. to those elements without id, it's assigned dynamically by
mshtml.

as checking version no. you can do it just using that instance sit on
toolbar

setting properties? you cando it just after your control inplaceactive.

> The <OBJECT> does not need to be visible.


so what?



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
At least one object must implement IComparable fniles Microsoft VB .NET 8 27th Jul 2006 04:48 PM
Re: Object must implement IConvertible. Dmytro Lapshyn [MVP] Microsoft C# .NET 0 16th May 2005 09:21 AM
Object must implement IConvertible. =?Utf-8?B?VGltOjouLg==?= Microsoft ASP .NET 1 15th Dec 2004 02:06 PM
Object must implement IConvertible. HELP!!! =?Utf-8?B?VGltOjouLg==?= Microsoft Dot NET 1 14th Dec 2004 04:35 PM
Object must implement IConvertible. Bill Cart Microsoft C# .NET 2 12th Sep 2003 06:18 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:30 PM.