Use MFC in the static library
Runtime: multithreading (/MT)
Active solution configuration: Release
These Settings, programs written in before did not use TeeChart controls, in other computers running normally,
This is because of the reason of using the control? How to solve!!!!!! Thank you for your attention!
CodePudding user response:
Then the TeeChart packaged together, before starting the program registerCodePudding user response:
TeeChart to control DLL to register on the target machineA, can hand use command line to run: regsvr32
Two, can be registered in the code, API function to register
The design idea of this method is that the first loading activeX controls in memory, and then verify its effectiveness, finally directly in the memory address registered to perform its function (DllRegisterServer DllUnregisterServer),
Its programming method is:
1, using the Windows API function Loadlibrary into the activeX control;
2, use GetProcAddress call function for activeX control register function DllRegisterServer (logout function for DllUnregisterServer) pointer;
3, use CallwindowProc function performs recorded in memory of the activeX control register functions (DllRegisterServer, DllUnregisterServer),
Example:
Typedef int (callback * myfunction) (void);
Myfunction myfunction=null;
Hinstance handle=null;
Handle=LoadLibrary (" trdragdroptreectrl. Ocx ");
If (handle!=null)
{
Myfunction=GetProcAddress call (handle, "DllRegisterServer");
If (myfunction!=null)
{
myfunction();
}
}
CodePudding user response:
Need to put that TEECHART component on the target computer (can be in your software directory), also need to be registered at the same time, to use theYou can put this component as a resource in your program, and then judge system without registered the component, the first registered again run your program
CodePudding user response:
Hi, I am also encounter this problem, could you tell me how do you solveCodePudding user response:
Mark!!!!!!!!!!CodePudding user response:
In a 64 - bit Windows:64 exe and DLL in the directory c: \ Windows \ sys tem32 directory.
32 bit exe and DLL in the directory c: \ Windows \ sys wow64 directory.
So pay attention to:
In win64 system registered under 32-bit ocx DLL to 32 ocx or copy the DLL to the c: \ Windows \ syswow64 \ directory,
And registered to c: \ Windows \ syswow64 \ regsvr32 XXXXXXX ocx or DLL