[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Moving my window causes no messages?

Posted on 1998-02-16
6
Medium Priority
?
224 Views
Last Modified: 2013-12-03
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?
0
Comment
Question by:RLM
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
6 Comments
 
LVL 7

Accepted Solution

by:
galkin earned 400 total points
ID: 1411339
Try to move window yourself. Handle WM_NCLBUTTONDOWN and when mouse pointer is over caption bar. Then capture window messages with SetCapture. Now all WM_MOUSEMOVE messages will be sent to your window. You can move window with SetWindowPos and moreover perform additional actions. When user releases mouse call ReleaseCapture
0
 
LVL 22

Expert Comment

by:nietod
ID: 1411340
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!
0
 

Author Comment

by:RLM
ID: 1411341
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.
0
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 
LVL 7

Expert Comment

by:galkin
ID: 1411342
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
0
 
LVL 22

Expert Comment

by:nietod
ID: 1411343
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.
0
 

Author Comment

by:RLM
ID: 1411344
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.
0

Featured Post

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows how to make a Windows 7 gadget that extends its U/I with a flyout panel -- a window that pops out next to the gadget.  The example gadget shows several additional techniques:  How to automatically resize a gadget or flyout panel t…
After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question