Quantcast
Channel: MicroStation Programming - Forum - Recent Threads
Viewing all articles
Browse latest Browse all 1677

[V8i C++] CReating a PopunMenu using IPopupMenuManager

$
0
0

I've got a class that implements IPopupMenuProvider, and now I want to add it as a provider:

 

CMyPopupMenu *myMenuProvider = new CMyPopupMenu();IPopupMenuManager::GetManager().AddViewPopUpMenuProvider( (IPopupMenuProvider*)myMenuProvider );

It compiles, but doesn't link:

unresolved external symbol "__declspec(dllimport) public: void __thiscall Bentley::Ustn::IPopupMenuManager::AddViewPopUpMenuProvider(struct Bentley::Ustn::IPopupMenuProvider *)" (__imp_?AddViewPopUpMenuProvider@IPopupMenuManager@Ustn@Bentley@@QAEXPAUIPopupMenuProvider@23@@Z)

Not sure what's causing the issue - "C" verses "C++" naming conventions?

If I do this:

IPopupMenuManager::GetManager().AddViewPopUpMenuProvider( myMenuProvider );

Then I get a compiler error..

error C2243: 'type cast' : conversion from 'CMyPopupMenu *' to 'Bentley::Ustn::IPopupMenuProvider *' exists, but is inaccessible.

 

Bruce


Viewing all articles
Browse latest Browse all 1677

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>