|
Well, I do not think this is a WM_TIMER misuse issue. Timer is not posted as high priority message and is retrieved as the last after all others and only during a system idle, that is why is not guaranteed that it will be delivered in intervals it was registered with.
The issue here is the fact that timer can be used to handle some long processing and that is what can cause problems.
JohnCz
MS C++ MVP
|
|
|
|
|
Is it posible to change the priority message in the process?
What's function can support this issue ?
|
|
|
|
|
No, it is not possible, that is the way OS works.
Why is it so important to you?
AS I havew already indicated, if you have to do some long processing you would be much better off, moving processing to a dedicated thread, freeing main thread to do GUI updates and process all other messages without freezing.
JohnCz
MS C++ MVP
|
|
|
|
|
So the message queue got filled with unworked WM_TIMER messages. What is that positive? If someone needs to handle some stuff he is waiting and nothing is happening.
That is not a good style to write a program
To be honest I would call it a "mistake by design"
Press F1 for help or google it.
Greetings from Germany
|
|
|
|
|
any body could help with prolog programming?
|
|
|
|
|
Unfortunately this is a C/C++/MFC forum, however, please, let me google that for you...
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]
|
|
|
|
|
What puzzles me most is that people manage to find this site but seem to be unaware of the existence of search engines...
|
|
|
|
|
I was googling something the other day and came across a hit with the exact same question. When I looked closer the first 'answer' was "Try CodeProject and they will give you the answer". If that is always the top hit then little wonder people stop searching at that point.
|
|
|
|
|
Good point but hardly relevant in this case. Still, you are probably right that in many cases, CP showing up on top of many searches might explain this.
|
|
|
|
|
Michael Schubert wrote: Good point but hardly relevant in this case.
Point taken, but if they used the site which had this entry then they would be redirected here and expect an instant solution.
|
|
|
|
|
Right!
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]
|
|
|
|
|
Me remember my courses in prolog that one of the most usual answers are
no
or
yes
This signature was proudly tested on animals.
|
|
|
|
|
Ok, I know there is a windows function that allows one to get the Process ID of the app that owns a HWND window handle by passing in the HWND but for the life of me I can not remember what it is. Any ideas?
You may be right
I may be crazy
-- Billy Joel --
Within you lies the power for good - Use it!
modified on Thursday, November 26, 2009 3:16 PM
|
|
|
|
|
|
That is the one, thanks!
You may be right
I may be crazy
-- Billy Joel --
Within you lies the power for good - Use it!
|
|
|
|
|
Is it possible to List Windows registered users? In VC++6 please
36. When you surround an army, leave an outlet free.
...
Do not press a desperate foe too hard.
SUN-TZU - Art of War
|
|
|
|
|
The Win32_UserAccount Class[^] contains the information you are probably looking for, but I am not sure if VC6 will support it; you may need to upgrade to the latest SDK.
|
|
|
|
|
Can you give me some implementation example?
36. When you surround an army, leave an outlet free.
...
Do not press a desperate foe too hard.
SUN-TZU - Art of War
|
|
|
|
|
Sorry, no I cannot; I found the MSDN link to the area you need to investigate, but I have no personal experience of this. If you read through the documentation you will find lots of sample code.
|
|
|
|
|
Thanks
36. When you surround an army, leave an outlet free.
...
Do not press a desperate foe too hard.
SUN-TZU - Art of War
|
|
|
|
|
Hi,
Think I have got my hair in a mess,
say I have a function that accepts a base class ptr,
and I want to call a function on a class type that derives from the base class type. Is it possible to just
do a dynamic / static cast on it?
something like
<br />
void func(base* ptr)<br />
{<br />
derived * derivedptr = dynamic_cast<derived*>(ptr);<br />
<br />
derivedptr->derivedfunction();<br />
}<br />
Thanks for any information.
modified on Thursday, November 26, 2009 8:30 AM
|
|
|
|
|
The best way to do something like that is to declare the function as virtual in the base class and let the child class override this method. That's the basic principle of polymorphism.
|
|
|
|
|
Like Cedric Moonen said, you should use virtual functions.
But if you want to do what you're doing, you have to check the return of dynamic_cast for NULL.
|
|
|
|
|
hi
i want to play two sound file same time and want to listen the sound of these file
on separtly on left and right speaker,means sound of one file should play on left
speaker and second file should play on right speaker
|
|
|
|
|