Skip to main content
gamedev.net
🔒 Locked

Window's messages queue...

Started by Pavel Krupets 2 replies 300+ views
Original Post
Pavel Krupets
Pavel Krupets
Hello! I have next problem: Inside WM_MOUSEMOVE handler I''m executing my own stuff but it take quite a lot of time. WM_MOUSEMOVE is a message that use queue and it can be overcrowded with these messages. If it''s true how I can get rid of it? Thank you.
felonius
felonius
?? What is it you want to get rid of? The message queue?

The MW_MOUSEMOVE message is sent every time the mouse is moved (not surprising) and if your application slows down because a lot of things happen in your handler then you must remove things from the handler. If you make the computer do a lot of stuff all the time it *must* become slow.

If I have missed the point please repost you question.
Jacob Marner, M.Sc.Console Programmer, Deadline Games
Dak Lozar
Dak Lozar
Just a thought, you could create a thread to perform you mouse handling functionality...

Dave "Dak Lozar" Loeser
Dave Dak Lozar Loeser
"Software Engineering is a race between the programmers, trying to make bigger and better fool-proof software, and the universe trying to make bigger fools. So far the Universe in winning."--anonymous
Pavel Krupets
Pavel Krupets
I think solution with thread is the best one.
Thank you.

2felonius:
In my application I perform hittest inside WM_MOUSEMOVE and if there are a lot of objects in client area (visible area) hittest become quite slow. (I do hittest only for visible objects).

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.