Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

Using NI controls in multiple DLLs (VC++)

I have a VC++ project consisting of several DLLs that I've been having trouble getting to run properly. The main EXE project has some dialogs that use CNiGraph controls and other similar graphing objects. I have tried to create a DLL project that also has dialogs that use CNiGraph's. However, when I call into the DLL from the EXE and try to instantiate the dialog with DoModal, it fails and returns -1. In the VC++ debug window I get a message (with the CNiGraph GUID) about the control not being registered. I have made all of the appropriate calls to AfxEnableControlContainer (in InitInstance) and AFX_MANAGE_STATE (in exported functions).

Can you have NI controls spread across modules like this?
0 Kudos
Message 1 of 2
(2,937 Views)
CNiGraph derives from COject... You need to be developing an MFC Extention DLL....
0 Kudos
Message 2 of 2
(2,937 Views)