CreateControl Failed problem [modified]
-
Hi, In my application, I am creating an MSChart control dynamically like this:- CMSChart *m_pChart = new CMSChart(); m_pChart->CreateControl(m_pChart->GetClsid(),EMPTY_STRING, WS_TABSTOP, CRect(0,0,0,0), pParent, nCtrlID); On development environment( in which Visual Studio 6.0 is installed), the MSChart control is creating successfully(CreateControl() returns true). But on testing environment( in which Visual Studio 6.0 is not installed), the CreateControl API returns FALSE. Please let me know what must be the problem. Thanks.
modified on Thursday, May 22, 2008 12:12 AM
-
Hi, In my application, I am creating an MSChart control dynamically like this:- CMSChart *m_pChart = new CMSChart(); m_pChart->CreateControl(m_pChart->GetClsid(),EMPTY_STRING, WS_TABSTOP, CRect(0,0,0,0), pParent, nCtrlID); On development environment( in which Visual Studio 6.0 is installed), the MSChart control is creating successfully(CreateControl() returns true). But on testing environment( in which Visual Studio 6.0 is not installed), the CreateControl API returns FALSE. Please let me know what must be the problem. Thanks.
modified on Thursday, May 22, 2008 12:12 AM
I moved this to the C++ forum for you, please never ask programming questions in the lounge again.
Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
-
Hi, In my application, I am creating an MSChart control dynamically like this:- CMSChart *m_pChart = new CMSChart(); m_pChart->CreateControl(m_pChart->GetClsid(),EMPTY_STRING, WS_TABSTOP, CRect(0,0,0,0), pParent, nCtrlID); On development environment( in which Visual Studio 6.0 is installed), the MSChart control is creating successfully(CreateControl() returns true). But on testing environment( in which Visual Studio 6.0 is not installed), the CreateControl API returns FALSE. Please let me know what must be the problem. Thanks.
modified on Thursday, May 22, 2008 12:12 AM
You probably need to install VCRedist.exe on your testing environment. You can ship it with your installer as well.
Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP
-
Hi, In my application, I am creating an MSChart control dynamically like this:- CMSChart *m_pChart = new CMSChart(); m_pChart->CreateControl(m_pChart->GetClsid(),EMPTY_STRING, WS_TABSTOP, CRect(0,0,0,0), pParent, nCtrlID); On development environment( in which Visual Studio 6.0 is installed), the MSChart control is creating successfully(CreateControl() returns true). But on testing environment( in which Visual Studio 6.0 is not installed), the CreateControl API returns FALSE. Please let me know what must be the problem. Thanks.
modified on Thursday, May 22, 2008 12:12 AM
You will also need to copy and register the chart activeX control on the target platform (I guess it is distributed as an ocx right ?)
Cédric Moonen Software developer
Charting control [v1.4] -
You probably need to install VCRedist.exe on your testing environment. You can ship it with your installer as well.
Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP
Rajesh R Subramanian wrote:
You probably need to install VCRedist.exe on your testing environment.
For VC6 ? :~ It seems also that the problem is somewhere else because the CreateControl function fails, which implicitely means that he is able to start the application successfully.
Cédric Moonen Software developer
Charting control [v1.4] -
Rajesh R Subramanian wrote:
You probably need to install VCRedist.exe on your testing environment.
For VC6 ? :~ It seems also that the problem is somewhere else because the CreateControl function fails, which implicitely means that he is able to start the application successfully.
Cédric Moonen Software developer
Charting control [v1.4]OK 5 - I overlooked this one. :) [add] Probably because vcredist is the first thing I suggest, when someone says my Visual C++ program works on my machine, but not on the client's. [/add]
Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP
modified on Thursday, May 22, 2008 2:38 AM