|
-
Jul 6th, 2001, 12:29 PM
#1
Thread Starter
Junior Member
i cant think of a good subject
Hi
Is there a function in C++ that does the equivilent of the VB command DoEvents?
(¯`·.¸¸.·´¯`·.:W!LL:.·´¯`·.¸¸.·´¯)
-
Jul 6th, 2001, 12:46 PM
#2
Frenzied Member
I've asked this before too and they told me to use Sleep(0); but it never worked....they said you have to use timers......yucky
-
Jul 6th, 2001, 01:18 PM
#3
Frenzied Member
From MSDN:
A value of zero causes the thread to relinquish the remainder of its time slice to any other thread of equal priority that is ready to run. If there are no other threads of equal priority ready to run, the function returns immediately, and the thread continues execution.
So yes it is like DoEvents in VB.
MSVS 6, .NET & .NET 2003 Pro
I HATE MSDN with .NET & .NET 2003!!!
Check out my sites:
http://www.filthyhands.com
http://www.techno-coding.com

-
Jul 6th, 2001, 02:12 PM
#4
Thread Starter
Junior Member
Sleep(0); doesnt work. What the problem is that my program has a while loop and the volume control on my keyboard doesnt work during the loop. The program is using DirectX and the program cooperation level is set to exclusive. How can I make the volume control and other things like that work while my program is in a loop?
they said you have to use timers
How would I do it with timers?
(¯`·.¸¸.·´¯`·.:W!LL:.·´¯`·.¸¸.·´¯)
-
Jul 6th, 2001, 02:28 PM
#5
Frenzied Member
Never mind, you are doing something totally different that I was. I was moving an image accross the screen with a while loop, but there is nothing like DoEvents so they told me to use Timers instead of my whlie loop. But I've never used DX so it doesn't look like I'm of much help here. Good Luck though
-
Jul 6th, 2001, 03:36 PM
#6
Frenzied Member
I think that when you have cooperation level set to exclusive you cannot using anything in Windows that does not have a Direct X interface. If you want to control sound I believe that Direct Sound should have the needed interfaces.
MSVS 6, .NET & .NET 2003 Pro
I HATE MSDN with .NET & .NET 2003!!!
Check out my sites:
http://www.filthyhands.com
http://www.techno-coding.com

-
Jul 6th, 2001, 03:49 PM
#7
Thread Starter
Junior Member
My program has to be exclusive because it is full screen. Most other games that are full screen, still allow other windows things like the volume control to work. I think that to do that I need something like DoEvents or maybe it is done differently. I dont want my program to set the volume, I want the user to be able to change the volume.
(¯`·.¸¸.·´¯`·.:W!LL:.·´¯`·.¸¸.·´¯)
-
Jul 8th, 2001, 11:32 AM
#8
Why doesn't someone compile "DoEvents" inside a class into a DLL file using VB and then access the function that contains it. Then you can call it from C++!
Heh heh heh, maybe not.
----------------------------
On the VB bus leaning out of the window to admire the C++ soft-top in the next lane!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|