|
yup, i tried using accelarators and their not working at all
|
|
|
|
|
what problem it is giving, ideally, when you go to new accelerator , it give you option of selecting desired menu id,
And if you have written a menu handler function for that, then it will get called
|
|
|
|
|
Hi could you please remind me how I can get time in msec? time() returns time in sec but I need more precision.
Thanks
|
|
|
|
|
GetLocalTime [^] retrieves the local time.
Software Zen: delete this;
|
|
|
|
|
Absolute system time or a timer to calculate time differences?
Don't try it, just do it!
|
|
|
|
|
Hi
GetTickCount() retrieves the number of milliseconds the system has been running.
If you need MicroSecunds You can use
QueryPerformanceCounter() and QueryPerformanceFrequency()
Iman Ghasrfakhri
|
|
|
|
|
Thank you all for you answers!
|
|
|
|
|
I want to do performance test with Rational Robot.
My application under test uses CORBA for comunication between server and client.
I dont know if I should instal any DLL to be able to record CORBA calls.
Can you help me please?
|
|
|
|
|
I've got a problem. I'll get input to my program and I have to determine which type of data that is. Input will occur in a text file and will look similar to this:
<br />
Add: 41.4 51.8 48.4 22.1<br />
Delete: 84.1 57.4 15.1<br />
etc....<br />
The problem is I have to determine the type of the data that needs to be added to the tree.
The tree is a template class.
I want to know code that could do the same as the following is supposed to do:
<br />
typedef T;<br />
T = int of T = double;<br />
AbstractTree<T> *tree = new BTree<T>;<br />
I then want to use type T in the rest of my program. etc.
AbstractClass<t> *tree = new BTree<t>;
I need this for a project that needs to be in on Monday 20:00(GMT)
Your help will be greatly appreciated.
Thanks alot
|
|
|
|
|
Hi
Why at the end of the OnPaint() there is a comment saying:
// Do not call CView::OnPaint() for painting messages
?
what should i do for refreshing the window, i try to call the function Invalidate() but when I call it the screen blinks.
Please advice.
Regards
Assay.
|
|
|
|
|
In order to avoid blinkings try to invalidate only the area you are updating instead of the whole paint area.
Themis
|
|
|
|
|
|
It's easy if you know what you have updated in each call. Instead of calling Invalidate() call InvalidateRect(). It takes as argument the area that you want to invalidate. It will update only that area this way if only a small portion of your view has changed you won't redraw everything.
Themis
|
|
|
|
|
Many thanks !
Do you know about more methods for redrawing the window except for calling the Onpaint()?
|
|
|
|
|
My head hurts!!!
It is almost a week that I'm thinking how to traduce the following mechanism in C code.
This is pseudocode, the indexes at the right move like a circular buffer
N = 3;
Pass 1:
pFFT[2] * IR_FFT[0];
pFFT[1] * IR_FFT[2];
pFFT[0] * IR_FFT[1];
Pass 2:
pFFT[2] * IR_FFT[1];
pFFT[1] * IR_FFT[0];
pFFT[0] * IR_FFT[2];
Pass 3:
pFFT[2] * IR_FFT[2];
pFFT[1] * IR_FFT[1];
pFFT[0] * IR_FFT[0];
Pass 4:
pFFT[2] * IR_FFT[0];
pFFT[1] * IR_FFT[2];
pFFT[0] * IR_FFT[1];
Every N passes the Mult sequence is equal.
I'm not able to traduce the right indexes work!
Could you help me?
best regards
|
|
|
|
|
this was easy: but i doubt if this is best, I just did it on my writing pad. I am putting it here, Let me know if it works( you can mail me.)
Code in C++, and works for only three pass(your pass 1 and pass 4 are same)
for(int i=0;i<=3;i++)
{
for(int j=0;j<=2;j++)
{
int x=j-i;
if(x==-1)
x=2;
if(x==-2)
x=1;
a[j]= pFFT[j] * IR_FFT[x];
}
}
Ye Dil Mangge MORE!!
|
|
|
|
|
for(int pass = 0; pass < 4; pass++)
{
pFFT[2] * IR_FFT[(pass + 0) % 3];
pFFT[1] * IR_FFT[(pass + 2) % 3];
pFFT[0] * IR_FFT[(pass + 1) % 3];
}
http://www.catch22.net
|
|
|
|
|
Hi
I create a simple form and at the OnPaint() function I draw:
* Rectangle - using: Rectangle(...
* line that represent x,y axis - using LineTo(... and MoveTo(...
* and line that represent function (such as sin, cos etc.)
When I run the program everything is alright but when i resize the window and drag it fast over the screen the program collapse (like it ran out of memory or somthing).
what should i do or not do ?
Thanks in advance
Lior.
|
|
|
|
|
Anonymous wrote:
what should i do
Like always enclosing some relevant code snippet?
--
The Blog: Bits and Pieces
|
|
|
|
|
coding style issues, which better, how used ??
1. if (true == v1)
{
v2 = 0;
}
else
{
v2 = 1;
}
2. v2 ((true == v1) ? 0 : 1);
|
|
|
|
|
Don't compare a boolean value with true or false . There's no logic in that (sic!). It'll cause more confusion than clarity. For instance:
if(((enabled == true) == true) == true...) Where dou you stop? It's obviously clearer with
if(enabled)
But, as the question is formulated, me thinks that
v2 = v1 ? 0 : 1; is best.
--
The Blog: Bits and Pieces
|
|
|
|
|
I just want to add, it can also be a very buggy thing to do. Even a C++ 'bool' can have more values than just true and false.
But aside from that, if you are working with Windows API, comparing to TRUE is the wrong thing to do since the API are defined as being 0 and != 0 which means that they might return 5219 for TRUE.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
Hello,
It's just a matter of preference. You can also write:
v2 = !v1;
Since you can use the opposite value of v1, you can omit v2. This can go on endlessly. Choose what comforts you most.
Behind every great black man...
... is the police. - Conspiracy brother
Blog[^]
|
|
|
|
|
Bob Stanneveld wrote:
It's just a matter of preference. You can also write:
v2 = !v1;
Yes, when v2 is also a bool , but I sensed that the question covered the generic case.
--
The Blog: Bits and Pieces
|
|
|
|
|
Johann Gerell wrote:
Yes, when v2 is also a bool
If v2 is an int , true will be changed to 1 and false to 0. Unless v2 is an user defined type, this can work...
Behind every great black man...
... is the police. - Conspiracy brother
Blog[^]
|
|
|
|