I have VB6 ActiveX (e.g. MyActiveX
) that is used from MFC:
m_pControl = new CWnd;
m_pControl->CreateControl("MyActiveX.MainControl",
"",
WS_VISIBLE,
rc,
this,
5000,
NULL,
FALSE,
NULL);
When I remove some unused function or move variable (not used outside VB ActiveX), VB6 warns about breaking compatibility. I chose to break compatibility but now the VB6 ActiveX is not shown properly from MFC application.
As I understand, breaking compatibility will create new UUID for the interface and type library. That is fine as long as I can do something to make it work again, and since I am using a string ProgID MyActiveX.MainControl
, I think my MFC app shouldn't get affected.
Edit:
As I understand from Resetting project compatibility in vb6, breaking compatibility is okay as long as I rebuilt projects that refer to it. But from MFC, I only refer to the VB project using a string MyActiveX.MainControl
so I don't see why I should rebuild my MFC app; and even after rebuilding my C++ MFC app, the VB ActiveX is still not properly shown.
Only two functions in VB6 ActiveX that are actually used from C++ MFC side. That's why I removed/moved some other functions and variables that are only used from within VB6 ActiveX. So I'm not sure why it stopped being displayed properly