|
ThatsAlok wrote: but it is secret
Well if I knew about it I'd say Congratulations to you as well! And I'd say I noticed you have
been an MVP for a while.
But since it's a secret, I know nothing
Cheers!
Mark
Mark Salsbery
Microsoft MVP - Visual C++
"Great job team! Head back to base for debriefing and cocktails."
|
|
|
|
|
Mark Salsbery wrote: And I'd say I noticed you have
been an MVP for a while.
i am mvp for past two year.. but still doing soul searching for same [ ].. he he he it nice to see you here
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief
|
|
|
|
|
I have used similar code in my remote communications classes. My DTOR will close the comm connection, but if the reason the DTOR is being called is because the connection was already broken/disconnected, I needed to ensure that no exception interrupted the normal DTOR chain.
It may not be quite what the C++ designers had in mind but it works. At least with MS VC++. Besides, if they didn't want it to work, it woud have explicitly stated so in the ARM.
|
|
|
|
|
|
I have a program codeing under VC2005.
Now,I add a code block which works well in VC6.
But when I add the block to my VC2005 project,there are some linking errors occured.
I know it because the codes using template .but why it would work under VC6?
GOOD LUCK.
|
|
|
|
|
What errors? What template?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
"Great job team! Head back to base for debriefing and cocktails."
|
|
|
|
|
Now,I has found the problems.The codes used third part library with some templates it.I complied the third part library using VC2005,the error has gone.
Thanks all the same.
Best wishes
|
|
|
|
|
Change the original message's title to include this: "[SOLVED]"
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
But I am so sorry that I don't know how to change it.
Anybody would tell me how?
Thanks
|
|
|
|
|
How do I calculate the date given the starting date and the number of days?
For example, if I enter 15/07/2007 , and 3 weeks as the number of days. It should return me 05/08/2007.
Thanks
|
|
|
|
|
take a look at CTime and CTimeSpan
|
|
|
|
|
in continuation with above you can also use COleDateTime and COleDateTimeSpan
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief
|
|
|
|
|
|
kevinxli wrote: I want to use SSE
What parts of your code do you want to do this to? Have you looked at compiler flags to use SSE instructions?
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
Paul Conrad wrote: What parts of your code do you want to do this to?
ConvertRGB2HSV(...) is too slow.I want to rewrite this function using SSE (C++ code with inline Assembly ,like as: _asm{ movaps xmm1,xmm2 ... })
|
|
|
|
|
Have you tried with the /arch:SSE flag set with full optimization? Sometimes it is easier to try and let the compiler do this kind of dirty work. If it doesn't increase the performance, then look into some inline assembly. I would only do the inline assembly where the code bottlenecks the worst.
---modified
You could try to unroll the two for loops for better cache utilization, as another thought
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
Paul Conrad wrote: Have you tried with the /arch:SSE flag set with full optimization?
My compiler is VC6(SP5),not support this flag if like as "_asm{ movaps xmm1,xmm2 ...}" ,will Okey!(I'm sorry for my poor English)
|
|
|
|
|
Have you been able to do inline assembly with SSE instructions under VC6 before?
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
Paul Conrad wrote: Have you been able to do inline assembly with SSE instructions under VC6 before?
Of course!
|
|
|
|
|
Okay, cool. I'd start chipping away small bits with inline assembly and see where it goes.
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
Which SSE do you want to use?
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
Honestly, I am not sure if trying to do this in SSE will help. With many of your if statements, you would have to unpack from the xmm1, ... registers and this may wind up costing more processor time.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
|
|
|
|
|
Hi.
I am not sure about this. I have a Cedit derived class in a DLL. In this I want to add a member of a keypad class I made. But I would like that EVERY CEdit derived class will only use ONE copy of this keypad. Can this be done just by declaring the keypad as a static member. Then when something it is entered into the keypad, it will be sent to the perspective Cedit class.
Can someone help me shed some light on this?
Thanks ahead of time.
Stan the man
|
|
|
|
|
A static member would work well.
You could keep a static reference count as well which tracks how many edit controls are in
existence (initialize to 0). When an edit control is created increment the reference count. If
the count is now 1, create the keypad. When an edit control is destroyed, decrement the count,
and if it's 0, destroy the keypad.
The edit controls can set another static variable when they gain focus, so the keypad knows which
one to direct input to.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
This episode brought to you by the number 3
|
|
|
|
|
Is it possible for me to decalre the keypad class in the edit class with a static? I would like to have the edit class somehow manage the keypad.
Ex:
class Keypad
{
}
class Edit
{
static Keypad;
}
...
Is there someway to do that? Or do I have to manage the keypad in my mainfrm class or something?
This way, when I declare an edit class, the keypad is "built in" but only has one copy (for memory sake) even with many edit controls. The keypad will direct the inputs to the correct parent.
Thanks.
|
|
|
|