Re: GetDropTarget not being called on IDocHostUIHandler
From: Charles Law (blank_at_nowhere.com)
Date: 02/19/04
- Next message: Alexander Krush: "Disable right mouse button"
- Previous message: Charles Law: "GetDropTarget not being called on IDocHostUIHandler"
- In reply to: Charles Law: "GetDropTarget not being called on IDocHostUIHandler"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 19 Feb 2004 14:39:04 -0000
Hey Guys
I've cracked it. This one has been holding me up for weeks.
If anyone wants the solution post back here and I will happily pass it on.
Must get on; a lot of time to make up.
Charles
"Charles Law" <blank@nowhere.com> wrote in message
news:OvmonVu9DHA.1804@TK2MSFTNGP12.phx.gbl...
> I am finding that GetDropTarget() is not being called when I drop data
onto
> a WebBrowser control hosted in VB.NET.
>
> I have implemented IDocHostUIHandler, and methods such as GetHostInfo()
and
> ShowContextMenu() get called as expected. However, I never get a call to
> GetDropTarget().
>
> Is there anything I have to do in order to allow it to be called, for
> example, does it depend on a particular return value from another
function?
>
> Under what circumstances should I expect GetDropTarget() to be called?
>
> Background: The reason I want to intercept this call is to do stuff with
the
> IDropTarget pointer, and the reason for this is that I want to see the
> IDataObject interface.
>
> The reason I want to get at the IDataObject interface is that I want to
> support a custom data format being dropped onto the WebBrowser control. I
> have tried to do this in the ondrop() event, but if I try to retrieve my
> custom format I get an error ("Catastrophic failure") on line 2 below:
>
> <snippet>
> evt2 = DirectCast(pEvtObj, mshtml.IHTMLEventObj2)
>
> If evt2.dataTransfer.getData("MyFormat") Is DBNull.Value Then
> Return True
> End If
>
> ' Retrieve the custom format object
> obj = CType(evt2.dataTransfer.getData("MyFormat"), object)
> </snippet>
>
> The HRESULT for the exception that is thrown is 8000FFFF.
>
> Can anyone help with this, or suggest another way (in any language)?
>
> Is there a way to get the IDataObject interface in the ondrop() event?
>
> TIA
>
> Charles
>
>
- Next message: Alexander Krush: "Disable right mouse button"
- Previous message: Charles Law: "GetDropTarget not being called on IDocHostUIHandler"
- In reply to: Charles Law: "GetDropTarget not being called on IDocHostUIHandler"
- Messages sorted by: [ date ] [ thread ]