Re: problem implementing iolecommandtarget to override javascript erro



"Bob" <Bob@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:1B651119-E3C3-4343-BD80-DFB41C0CC2F3@xxxxxxxxxxxxx
> I am using MFC (CWebBrowser2) and I have a browser instance in my
> view. In the view class, I have the IOleCommandTarget interface and
> define the Exec and QueryStatus methods, however, the
> IOleCommandTarget is derived from IUknown apparently and I get
> 'cannot instantiate abstract class' errors because of virtual methods
> in that class. I am obviously doing something very wrong, but cannot
> find enough information on this. Should I be implementing like
> IDocHostUIHandler and passing it into the ControlContainer ?

You should implement IOleCommandTarget the same way as, or alongside
with, IDocHostUIHandler as shown in Driller sample.
--
With best wishes,
Igor Tandetnik

With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925


.



Relevant Pages

  • Re: IOleCommandTarget - webbrowser [solved]
    ... derive your class from both IDocHostUIHandler and IOleCommandTarget ... Igor Tandetnik schrieb: ... The article claims you can feed your IOleCommandTarget implementation to MSHTML via ICustomDoc::SetUIHandler. ...
    (microsoft.public.vc.atl)
  • Re: IOleCommandTarget implementation not called
    ... WebBrowser doesn't query for IOleCommandTarget off of event sink. ... part of "use SetUIHandler() to point to your own implementation of ... IDocHostUIHandler" do you find unclear? ...
    (microsoft.public.vc.atl)
  • Re: IOleCommandTarget - webbrowser [solved]
    ... IDocHostUIHandler and, write QueryStatus and Exec for IOleCommandTarget. ... Igor Tandetnik schrieb: ...
    (microsoft.public.vc.atl)