|
Dumb question, but MSDN sucks. GetWindowThreadProcessID() returns the thread ID of the thread that created the window. How do I get the thread handle of that thread when I have the ID? I need the handle so I can use WaitForSingleObject() to wait for the thread to terminate.
You may be right
I may be crazy
-- Billy Joel --
Within you lies the power for good - Use it!
modified on Friday, November 27, 2009 11:01 PM
|
|
|
|
|
I thought it was OpenThread() to do this ...
'g'
|
|
|
|
|
Of course it is. Sometimes I have trouble seeing the most obvious things
You may be right
I may be crazy
-- Billy Joel --
Within you lies the power for good - Use it!
|
|
|
|
|
my teacher give an exercise:
-Outline a picture by using Bspline curve.
-Ex: Outline character 'S' , use mouse define points, these points will define Bspline curve, this curve is boundary of 'S'.
-then save the curve.
it is hard exercise for me .... !!
please help!
language is visual C++ 2005, openGL,openCV
thank you verry much.
|
|
|
|
|
a04.lqd wrote: my teacher give an exercise:
And that was to help you learn to do things for yourself, not to get someone else to do it for you. Read your course notes.
|
|
|
|
|
my teacher only introduce what is Bspline and give this exercise to me...
each student in my class is the same.
they have another exercise, different from my exercise , ex: use surface to draw a face, draw a car by benzier curve...
it is realy hard....
all informations i must find out
help me... thank you very much.
|
|
|
|
|
a04.lqd wrote: all informations i must find out
Yep, life is hard
|
|
|
|
|
Please read the posting guidelines. There's even no clear question in your message. You don't believe that somebody here will just provide you with the code, do you ?
Ask a precise question. Explain what you have tried and where you are stuck exactly.
|
|
|
|
|
a04.lqd wrote: how to draw BSpline by using mouse ???
Just press the left button and move the mouse following a BSpline shape (remember to choose the pen tool).
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]
|
|
|
|
|
CPallini wrote: Just press the left button and move the mouse
Now why didn't I think of that?
|
|
|
|
|
GDI has a function called PolyBezier that can be used to draw b-splines.
|
|
|
|
|
Does anyone understand the bit-wise representations of #INF and #NAN for the type double? Or could you point me to some real information on the internet?
Also, what is the difference between Quiet NAN and Signaling NAN?
I have been trying to find it with google all morning and I have found a lot of claiming to know but no actual knowledge.
I know that for type float the bits are:
0x7FFFFFFF; // #NAN
0x7F800000; // #INF
I believe that for type double the bits would:
0x7FFFFFFFFFFFFFFF; // #NAN
0x7FF0000000000000; // #INF
However, this is just changing the exponent from 8 to 10 bits and assuming that if would be the same. I would feel much better if I could find some supporting documentation.
|
|
|
|
|
Isn't this [^] useful?
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]
|
|
|
|
|
Yes, and thanks. But I'm still kind of looking for a nice table like they have for the 32 floats. Don't want to make the table myself because I'm not the expert. Just want to be able to refer to the expert.
|
|
|
|
|
If you scroll up the page the nice table is there on the screen.
[edit]sorry I note those are not doubles, but I'm sure a bit of simple extrapolation will do it[/edit]
|
|
|
|
|
Thanks.
I was hoping to find such a table for double. Really, just a supporting documentation. I believe the values in my original question were correct.
|
|
|
|
|
If you're looking for NAN it may be either
0xFFFM
or
0x7FFM
i.e. sign bit may be either 0 or 1 and 52 bit-wide mantissa M != 0 is implementation-dependent (may carry additional info).
Of course this is going on my arrogant assumptions...
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]
|
|
|
|
|
The values in my original question are correct. (I believe) Just looking for supporting documentation.
Thanks again for the time and thought you have put into this.
|
|
|
|
|
Well, while your values represent correctly NAN values, they (according to that Wikipedia page) don't cover all the possibilities.
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]
|
|
|
|
|
Sorry, I guess I didn't present that very well.
NAN is an exponent of 0x7FF with a non-zero mantissa.
INF is an exponent of 0x7FF with a zero mantissa.
Here are the actual fuctions I am using...
bool IsInf (double d)
{
const INT64 iInf = 0x7FF0000000000000;
if ((*(INT64*)&d & 0x7FFFFFFFFFFFFFFF) == iInf)
return true;
return false;
}
bool IsNan (double d)
{
INT64 exp = *(INT64*)&d & 0x7FF0000000000000;
INT64 mantissa = *(INT64*)&d & 0x000FFFFFFFFFFFFF;
if (exp == 0x7FF0000000000000 && mantissa != 0)
return true;
return false;
}
modified on Friday, November 27, 2009 3:04 PM
|
|
|
|
|
Hi All,
I have created COM component(dll) and created one client to use it, Please finnd the code of client:-
HRESULT hr = CoInitialize(0);
SCRIPTOBJLib::IScriptObjPtr sobj;
sobj->SetLanguage((unsigned short *)"VBScript");
CoUninitialize();
Please give me some solutions coz i tried every possible way.
Thanks A Ton
Ash_VCPP
walking over water is just knowing where the stones are.....
|
|
|
|
|
Ash_VCPP wrote: SCRIPTOBJLib::IScriptObjPtr sobj;
//sobj->QueryInterface(IId_,void* &vp);
You have not initialized sobj to an instance of anything.
|
|
|
|
|
Yes but i tried many ways as you can see it in commented code to initialize it, but getting error HRESULT value= -2147221164.
can you please suggest me how can i initialize com object with example regards of my code.
Thanks A Ton
Ash_VCPP
walking over water is just knowing where the stones are.....
|
|
|
|
|
Ash_VCPP wrote: can you please suggest me how can i initialize com object with example regards of my code.
You have the following declaration in your code
SCRIPTOBJLib::IScriptObjPtr sobj;
So you need to initialize sobj to an instance of SCRIPTOBJLib::IScriptObjPtr . The documentation should explain how to do this. If you do not understand instances of classes I suggest you refer back to he C++ documentation for guidance.
|
|
|
|
|
But i think initializing COM object is different from normal class, and if not then can you please show me few lines of code to initialize COM object, Because i am wondering with google since last two dyas.
Thanks A Ton
Ash_VCPP
walking over water is just knowing where the stones are.....
|
|
|
|