|
Hello again,
first - I'm sorry, because I didn't provide any information about the development environment:
Microsoft Visual Studio 6.0 SP6
Microsoft Visual Basic 6.0 SP6
And ... no ... I can not upgrade - currently!
Second - I created a new most simple MFC application only loading the VB ActiveX control and raising an exception on exiting.
It has a CWnd* member on which CreateControl is called and which is deleted while deleting the dialog object.
So it shows the same behavior than the big MFC application I normally work on.
Has someone a hit or suggestion?
Best regards,
Martin
|
|
|
|
|
Hello,
after trying a bit I changed my VB ActiveX Control to execute the "UserControl_Terminate" things in the "UserControl_Hide" event handler.
Only the call "App.LogEvent ..." stayed in the "UserControl_Terminate" event handler.
And now everything seems to work fine.
Even a VB ActiveX Control with CommonControls (not even touched in the "UserControl_Terminate" event handler) works now.
So - I don't know why, but now everything works.
I found a solution, but no understanding for the problem.
Best regards,
Martin
|
|
|
|
|
I have used some system call in my MFC application to remove some ".txt" file. By my system call i have removed some extra file. I have used some "del" command. That is why some black window come in front of my application. Can i use some VC++ code at place of system call to remove some ".txt" file
|
|
|
|
|
There's DeleteFile()[^] that you can use.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Got my 5 for the wonderful sign
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Sign? The signature? Ri..ght?
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
yah sir, u r right...plz plz u don't getz angry coz I'm new, plz plz...
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
If that's the case, all of my posts carry the signature and so you can feel free to 5 vote them.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Looks like THHB in action again..
Regards,
Sandip.
|
|
|
|
|
Yes, BTW you should acknowledge the signature's author giving him, for instance, a new laptop.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hi all,
I am placing a Bitmap on a DialogBox, when i change the display settings than the dialog box resize according to display settings, and image not.
so i want to resize image too when the dialog box resize.
Please help me for this.
thanks in advance.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
Like this [^]?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
I am using CArray in my application's calculation routine in many places.
When running the calculation its getting slow. How to overcome this?
|
|
|
|
|
how are you using it ?
and how do you mesure the performance impact ?
|
|
|
|
|
.....
CArray<double,double> y;
y.Add(dArea);
.....
modified on Tuesday, October 21, 2008 8:24 AM
|
|
|
|
|
I think I see your problem: The Add method of CArray will grow the array by 1. To grow, the WHOLE array is copied to a larger buffer in memory.
So if you add n elements, you're actually doing n squared operations. This is sometimes called the Schlemiel Algorithm http://en.wikipedia.org/wiki/Schlemiel_the_painter's_Algorithm[^]
If you pre-allocate the whole array, it may speed up your processing significantly.
|
|
|
|
|
....
CArray<double,> MyArray;
MyArray.SetSize(20, 10); //Initial size 20 and grow by 10
MyArray.SetAt(0, 10.0);
MyArray.SetAt(1, 20.0);
MyArray.SetAt(2, 30.0);
MyArray.SetAt(3, 40.0);
.....
.....
This will speed up the process?
|
|
|
|
|
A little. Ideally you would allocate the maximum size you'll need, and avoid doing any growing.
Of course the slowness could be due to another cause, but this could be the reason.
|
|
|
|
|
I will try it by allocating maximum size.
Thanks.
|
|
|
|
|
Are you re-allocating (or resizing ) the array ?
This signature was proudly tested on animals.
|
|
|
|
|
|
RSAK wrote: I am using CArray in my application's calculation routine in many places.
When running the calculation its getting slow. How to overcome this?
You have to speed up your calculation algorithm.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
I am sure that calculation will not take much time.
|
|
|
|
|
OK. I'm sure the CArray , properly used, is a efficient container.
Now, if both of us are right, your application has an intrinsic, insurmountable speed limit.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
After any allocation and filling of the array, you could use the member function GetData () to get at the actual doubles - then you can treat them as a double * , or classic C array.
If *that* is still slow, then the problem is not CArray.
As I'm fairly sure that the [] operator of CArray is an inline, you're probably already as fast as you'll get.
Iain.
|
|
|
|