|
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 )
|
|
|
|
|
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.
|
|
|
|
|
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
|
|
|
|
|
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 ?)
|
|
|
|
|
hello everyone,
I encounter a technological problem about how to control the copied file origin.
Example, i have a file named aa.txt, it localed on disk C.Then i drag it to disk D,or i copy it to Disk D using Crtl+C, Ctrl+V. Now is there any method to let me know aa.txt from Disk C.
If anyone has a technological plan to help to resolve the technological problem,can contact in Email .xianfeng.dl@gmail.com
Regards & Thanks
|
|
|
|
|
You Can Use CopyFile() or MoveFile() win32 API for this purpose. See MSDN for Detail...
If it doesn`t work let me know..
|
|
|
|
|
i have used CopyFileEx(),but seems that it also cann't work. i also have no ideas to get the file origin.
|
|
|
|
|
You Can Use this in another way like--
For example, if you wanted to copy the folder 'c:\windows\Ashu' to 'c:\Ashu':
SHFILEOPSTRUCT fileop;
fileop.hwnd = NULL;
fileop.wFunc = FO_COPY;
fileop.pFrom = "C:\\windows\\Ashu\0"; // additional null needed
fileop.pTo = "c:\\Ashu\0"; // additional null needed
fileop.fFlags = FOF_ALLOWUNDO|FOF_NOCONFIRMATION|FOF_NOCONFIRMMKDIR;
if (!SHFileOperation(&fileop)); // error condition
Try This..................
|
|
|
|
|
Thanks , I will try it.
now i want to have a process to automatically catch this event.
i have tried to using hook api ,and SHChangeNotifyRegister to resovle this problem, but at last i also cann't get it
|
|
|
|
|
Is there any method to monitor this copy process,and know the file origin.
|
|
|
|
|
feng.dl wrote: If anyone has a technological plan to help to resolve the technological problem...
No, but I am now technologically confused.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi all,
what do I need to get this working? I get 'PPERF_DATA_BLOCK' undeclared and I have already included
#include <atlapp.h>
#include <atlframe.h>
#include <atlctrls.h>
#include <atldlgs.h>
#include <atlctrlw.h>
#include <atlwin.h>
#include <iostream>
#include <atlmisc.h>
#include <malloc.h>
#include <stdio.h>
#include <windows.h>
#include <stdlib.h>
#include <Winreg.h>
Sorry for the semi-repost if ever
|
|
|
|
|
And did you include Winperf.h?
|
|
|
|
|
Hamid,
Thanks a lot thats all i need for now.
Jj
|
|
|
|
|
You're welcome.
|
|
|
|
|
Thanks,
Also I solved the problem.
|
|
|
|
|
I have a list control CListCtrl with report view and the extend style of LVS_EX_CHECKBOXES.
Then I try to change the back ground color of the list control, to black color for example. It's done by overriding OnNMCustomdraw() method.
Everything works well except the background color of all checkboxes.
Now I don't know how to fix this problem.
Any suggestion should be appreciated.
|
|
|
|
|
|
Thank you for your reply, Hamid.
I'll have a look at it now
|
|
|
|
|
it's quite complicated, so I still not success,
but anyway, thanks for your help. I will look at this later
|
|
|
|
|
Did you see it I guess your problem is solved.
|
|
|
|
|
Not yet, Hamid,
If I success, I will notify it here. And if you find something, plz let me know,
|
|
|
|
|
I did it, not very well but it works.
Actually, I try to do similarly to XListCtrl
All I did here:
I have a class MyListCtr direved from CListCtrl. Then I override OnNMCustomdraw, try to draw the rectangualar with specificed color (black in my case).
The problem is how to catch event mouse click, determine checkbox state and change the drawing. I cannot understand the way XListCtrl do, it seems to register a defined event WM_XLISTCTRL_CHECKBOX_CLICKED, but I'm not sure. And TRACE, what is TRACE macro? hehe
So I did like this: use event NM_CLICK
void CMyDlg::OnNMClickListData(NMHDR *pNMHDR, LRESULT *pResult)
{
NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;
*pResult = 0;
if (pNMListView->uOldState == 0 && pNMListView->uNewState == 0)
return;
BOOL bPrevState = (BOOL)(((pNMListView->uOldState &
LVIS_STATEIMAGEMASK)>>12)-1);
if (bPrevState < 0)
bPrevState = 0;
BOOL bChecked=(BOOL)(((pNMListView->uNewState & LVIS_STATEIMAGEMASK)>>12)-1);
if (bChecked < 0)
bChecked = 0;
if (bPrevState == bChecked)
return;
}
I'd tried some ways but not success until this. Actually, I found it somewhere else.
|
|
|
|