In VB6 we had a control that you dragged/dropped onto a form and you could set the time interval, any code inside the timer would be fired etc.
What is the equivalent way to do this in C++?
In VB6 we had a control that you dragged/dropped onto a form and you could set the time interval, any code inside the timer would be fired etc.
What is the equivalent way to do this in C++?
Yes, but not in a drag-and-drop way. You'll need to write the code for it. Check out this link alarm
What can this strange device be?
When I touch it, it gives forth a sound
It's got wires that vibrate and give music
What can this thing be that I found?
Sorry, I know it done in code I was just using the VB6 example to show exact what I wanted.
"...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.." Bill Bryson
What can this strange device be?
When I touch it, it gives forth a sound
It's got wires that vibrate and give music
What can this thing be that I found?
Sorry, but your argument is full of holes. Though the exact information is hard to come by (thank you, Microsoft, for making it so hard to decipher what's written on your pages), it goes something like this:
Microsoft implemented POSIX 1.0 for older operating systems (pre XP).
POSIX was removed as of XP and was made available as a standalone download.
The standalone download was then deprecated (extended support running out this year).
It was also made available in some forms in server and business operating systems as SUA. Again, this is business, so Enterprise versions and up.
SUA was deprecated in Windows 8.
SUA was completely removed in 8.1.
Source: https://superuser.com/questions/4953...mplement-posix (and wikipedia)
So no, unless you somehow use some emulation library, POSIX is not supported by Windows.
Me no speak microsoft .... but you could try the cross-plarform development environment Qt which is a much beloved and generally used environment for Linux. In a windows environmnet you then have to install MINGW in order to get a more or less GNU-compatible compiler. Still, MINGW does not fully support POSIX.
Another GNU-compatible compiler is from Cygwin, as far as I know it does support Posix.
Anyway, there are always differences between Linux and Windows for example if you program sockets (see also https://qt-project.org/search/tag/cygwin).
Qt supplies the Qtimer-object which should work within the windows environment.
Cygwin does indeed support Posix, but I wouldn't recommend using it. Cygwin tends to be slow (in my experience) and is intended to compile source for Unix-only programs on Windows. I don't feel that it's particularly useful for general Windows programming.
If you want something like the timer in VB6, I would go with Qt. You can create GUI and console-based applications with Qt, and those applications can generally be rebuilt for any platform that supports Qt, with very few changes in the source.
Thanks to Elysia for clarifying Posix support in Windows. I wasn't aware that they had removed it.
What can this strange device be?
When I touch it, it gives forth a sound
It's got wires that vibrate and give music
What can this thing be that I found?
Are you not meant to use QueryPerformanceFrequency/QueryPerformanceCounter. I found this that works but is there any other way?
What can this strange device be?
When I touch it, it gives forth a sound
It's got wires that vibrate and give music
What can this thing be that I found?
So nobody bothered answering his question -- just arguing about a completely unrelated issue. Helpful.
Look into the functions defined in the ctime header, specifically time().
Definition: Politics -- Latin, from
poly meaning many and
tics meaning blood sucking parasites
-- Tom Smothers