Link to home
Start Free TrialLog in
Avatar of RLM
RLM

asked on

Moving my window causes no messages?

When user moves my program's window or even child windows, all my WM_TIMER and MM_WIM_DATA and MM_WOM_DONE messages stop coming! Why is this? It's causing problems for me since if I'm playing/recording audio I miss my necessary notifications if user takes too long to move a window. How do I get around this?
ASKER CERTIFIED SOLUTION
Avatar of galkin
galkin

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of nietod
nietod

Galkin presented the correct solution, but didn't explain what what the problem actually was!  In case you are curious, what is happening is that when a window is moved (or a menu is down or a message box is up, as well) windows executes a private message loop.  So the messages are still occuring, code written in the operating system is getting the messages and is ignoring ones that it can't handle.  

Galkin's solution will fix this, although he just outlined it, there will be a lot of details to handle.  However, you will have the same problem when a menu is down and that is much harder to handle!
Avatar of RLM

ASKER

There must be an easier solution!? MS would've known this problem would arise, no? Isn't there anyway for me to get my messages dispatched to me? Alot of MS apps have to deal with this same problem and I'm sure they're not manually moving their windows and manually handling menus.
No this is the common problem. For instance I have window where I display animation and this animation stops playing while I am moving window. I don't know if this feature is by design or it is a bug
You can get timer messages (I believe) if you create a timer for a specific window.  However most other messages will not get through.  There is no other way around it that I've ever seen.  You are not alone.  This problem probably appears here monthly.
Avatar of RLM

ASKER

hehe, sorry for not believing you 1st time. guess i'll just ignore it and maybe user will avoid moving my window after he starts to here the audio clipping.

Thanks for both helping me.