VC++ Custom Browser Pane creation

VC++ Custom Browser Pane creation

Anonymous
Not applicable
324 Views
2 Replies
Message 1 of 3

VC++ Custom Browser Pane creation

Anonymous
Not applicable
In VC++, trying to create a custom browser pane with browser nodes.

CreateBrowserNodeDefinition is passed the address of an
ClientBrowserNodeDefinitionObject object:

HRESULT BrowserPanes::CreateBrowserNodeDefinition ( ... struct ClientBrowserNodeDefinitionObject * * _presult )

AddTreeBrowserPane is passed the address of a BrowserNodeDefinition object:

HRESULT BrowserPanes::AddTreeBrowserPane ( ... struct BrowserNodeDefinition * TopNodeDefinition, struct BrowserPaneObject * * _presult )

If I try to pass the ClientBrowserNodeDefinitionObject pointer obtained in the first function to the second function where it wants the BrowserNodeDefinition pointer, it won't compile because these are differenct objects. However the VB example in the help file for creating a custom browser pane just uses the BrowserNodeDefinition obj and works fine.

I don't think I can cast one to the other.

Has anyone done a custom browser pane in VC++ and if
so how did you do it? Any help appreciated.
0 Likes
325 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
VB is nice enough to do the conversion for you. In VC++, you will need to 'QueryInterface' for the BrowserNodeDefinition object before passing it into the AddTreeBrowserPane method. Something like... CComQIPtr pBrowserNodeDef (pClientBrowserNodeDef); Sanjay- "sandran" wrote in message news:10461264.1099960588598.JavaMail.jive@jiveforum1.autodesk.com... > In VC++, trying to create a custom browser pane with browser nodes. > > CreateBrowserNodeDefinition is passed the address of an > ClientBrowserNodeDefinitionObject object: > > HRESULT BrowserPanes::CreateBrowserNodeDefinition ( ... struct ClientBrowserNodeDefinitionObject * * _presult ) > > AddTreeBrowserPane is passed the address of a BrowserNodeDefinition object: > > HRESULT BrowserPanes::AddTreeBrowserPane ( ... struct BrowserNodeDefinition * TopNodeDefinition, struct BrowserPaneObject * * _presult ) > > If I try to pass the ClientBrowserNodeDefinitionObject pointer obtained in the first function to the second function where it wants the BrowserNodeDefinition pointer, it won't compile because these are differenct objects. However the VB example in the help file for creating a custom browser pane just uses the BrowserNodeDefinition obj and works fine. > > I don't think I can cast one to the other. > > Has anyone done a custom browser pane in VC++ and if > so how did you do it? Any help appreciated.
0 Likes
Message 3 of 3

Anonymous
Not applicable
Thank you so much!
0 Likes