|
I want to use the .Net class "Math" functions in my vc++ SDI application like "Round" etc.
What header file and library I need to include for this?
Thanks,
Suman
--
"Programming is an art that fights back!"
modified on Wednesday, April 16, 2008 9:10 AM
|
|
|
|
|
If it's a normal C++ function, I think the answer is just plain "tough".
If you're using C++/CLI, then the other forum would be more appropriate.
There's nothing stopping you writing match code in C++ though - and lots of examples in the internet...
Iain.
Iain Clarke appears because CPallini still cares.
|
|
|
|
|
Hi All,
When there is a global HANDLE to an Event(unnamed) in a exe and another HANDLE in DLL to an Event(named) with the same name, will ResetEvent/SetEvent called in exe trigger the event wait in DLL?
Hope you understand the Q. Here is more explanation.
EXE --> declare HANDLE g_evt= CreateEvent()
DLL --> declare HANDLE g_evt = Createevent(name)
Exe(main thread) { <br />
SetEvent(g_evt); <br />
call to dll function x()...<br />
}<br />
<br />
<br />
<br />
DLL(main thread) x()<br />
{ <br />
ResetEvent(g_evt)<br />
waitforsingleobjectex(INFINITE, g_evt,TRUE);<br />
dosomething();<br />
}<br />
<br />
<br />
<br />
newthread()<br />
{<br />
log<br />
setevent(g_evt);<br />
}
when setevent is called in the exe, I see that the there is no wait
and dosomething() is called rightaway. Actually it should be waiting for the newthread() to execute and set the event. Since the call is commented it should be waiting for ever.
Setevent in exe is called for some other thread that is part of the exe. But it is signalling the dll wait object. Please kindly let me know if my reasoning is correct?
Thanks & Regards,
Dhana
|
|
|
|
|
I fell over at your first sentence.
You have two handles, one named, and one not named.
If you have two named handles, with the same name, then they would be the same underlying object. But you don't, so your two event handles will point to different things.
If you really want to talk to the same object, you will have to use the same name for both. And no-name != some name.
Iain.
Iain Clarke appears because CPallini still cares.
|
|
|
|
|
I am very very sorry.
Both the HANDLES have same names. One is defined in exe and one in a dll which the exe uses.
handle in the dll is pointing to a named event and other handle in exe is pointing to a unnamed event.
Hope now you can relate to my previous message.
Thank you.
Thanks & Regards,
Dhana
|
|
|
|
|
jana_dhana wrote: Both the HANDLES have same names
HANDLE 'names' are usually called identifiers .
However, as long as DLL symbol is not exported, they refers to different variables.
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
|
|
|
|
|
Thank you for the answer.
Thanks & Regards,
Dhana
|
|
|
|
|
Hi,
I am using a ActiveX Control to draw a 3D Graph. But the provider of the control has not provided any APIs for printing. I am looking for 3D Graph Printing. How to do it in VC6.0.
Pl help me in this regards. Any samples or methods will be appreciated.
|
|
|
|
|
which activex are u using?
"The Ultimate Limit Is Only Your Imagination."
|
|
|
|
|
Hi,
I am using NTGraphs NTGraph3DCC.dll ActiveX control which is freely available.
But the same ActiveX in 2D version has an API for 2D Printing. There is no 3D Printing Function provided.
Now, How to do it.
|
|
|
|
|
hi friends...
now i have doing one internal project in MFC
How to calculate system(PC) ON and OFF times in MFC?
Please if u have any ideas ..replay me
Regards
Nisha.S
|
|
|
|
|
nisha00000 wrote: ...system(PC) ON and OFF times...
Unless you are talking about GetTickCount() , you'll need to explain what you mean by this.
"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
|
|
|
|
|
When I needed to do this I used the Event Logging Functions API to read the system eventlog.
I created an eventlog class to wrap the Event Logging Functions.
You will need to look for the following events in the system eventlog from which you can determine the startup and shutdown times.
Start 6005
Shutdown 6006
|
|
|
|
|
Hi all,
I wanna make my prog's forms use the window theme, how could i do that under MFC 6.0??
thank you
"The Ultimate Limit Is Only Your Imagination."
|
|
|
|
|
is it imposs or what ?
"The Ultimate Limit Is Only Your Imagination."
|
|
|
|
|
You've only waited 26 minutes... That'd be good service if you were PAYING for the answer...
I presume you're talking about vista prettiness? If so, you need to include a manifest with your software - which is just a resource with certain parameters.
Try googling for MFC, 6, vista and manifest.
Iain.
Iain Clarke appears because CPallini still cares.
|
|
|
|
|
first of all, Thnks for the answer.
And about the theme, i'm not looking for the vista its self but when i change the theme of the window i wanna that my progs forms layout chage too like the theme (Sorry if my english is not too clear )
I'll try to google
"The Ultimate Limit Is Only Your Imagination."
|
|
|
|
|
Blood_HaZaRd wrote: ...when i change the theme of the window i wanna that my progs forms layout chage too...
Are you wanting to be notified of such a change? If so, check out the WM_SETTINGCHANGE message.
"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
|
|
|
|
|
Ok it works.
May be i'm too noisy, but let's say thay i love the theme of my wind and i wanna make my prog always looks like that theme, what should i do, which files shoulf i save in the exec folder??
what are the procedures to do it?
"The Ultimate Limit Is Only Your Imagination."
|
|
|
|
|
Manifest can help.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
how can i convert string like
char s[]="1234";
to integer like 1234
in c language.
plz help me
yogesh
|
|
|
|
|
See the atoi function in MSDN.
EDIT: BTW, this is the 59567 time (approximately) that this question has been asked. It doesn't hurt to do a bit of searching before asking the question.
|
|
|
|
|
didn't Christian write an article about how to google things ?!
|
|
|
|
|
Yes.
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
|
|
|
|
|
Cedric Moonen wrote: this is the 59567 time (approximately)
You had several integer overflows, it seems.
I must have been many more than MAX_INT times...
Let's think the unthinkable, let's do the undoable, let's prepare to grapple with the ineffable itself, and see if we may not eff it after all. Douglas Adams, "Dirk Gently's Holistic Detective Agency"
|
|
|
|