1

I develop audio plugins, which are run inside their hosts and work realtime. Each plugin has its own window with controls, which often contains some kind of analysis pane, a pretty big rectangle that gets repeatedly painted (e.g. 20-50x per second). This is all working well.

The trouble comes when the user adjusts a parameter - the plugin uses WM_MOUSEMOVE to track mouse movements and on each change calls ::InvalidateRect to make the relevant portion of the window be redrawn. If you move quickly enough, the window really gets quickly repainted, however there seems no time for the host and other windows to be redrawn and these usually perform some kind of analysis feedback too, so it is really not ideal.

No my questions: 1) Assuming the host and other window are using ::InvalidateRect too, why mine is prioritized? 2) How to make ::InvalidateRect not prioritized, meaning the window needs to be invalidated, but it may be later, the rest of the system must get time for their redrawing too.

Thanks in advance!

Vojtěch Melda Meluzín
  • 1,117
  • 3
  • 11
  • 22
  • Sounds to me like you'd be better off doing the mouse move paint updates synchronously. – David Heffernan Apr 10 '13 at 09:32
  • 1
    Are you calling `UpdateWindow` as well? This forces the paint to happen immediately, which sounds like what's happening. If you just invalidate a window without calling `UpdateWindow` then the paint shouldn't take precedence over other messages. – Jonathan Potter Apr 10 '13 at 10:31
  • Thanks guys. It is not really synchronous, it is in timer set to say 30ms. I don't call UpdateWindow or anything like that. – Vojtěch Melda Meluzín Dec 04 '13 at 17:28

0 Answers0