Re: TrackPopupMenu blocks OnIdle() processing
- From: Joseph M. Newcomer <newcomer@xxxxxxxxxxxx>
- Date: Fri, 01 Aug 2008 09:19:21 -0400
It also stops
(a) when you drop down a menu
(b) while you are resizing the window
(c) while you are dragging the window
This is because these actions all have their own private message loop. I would not be
surprised to find that OnIdle is also blocked by a MessageBox.
You should not be doing time-critical updates in OnIdle. Actually, pretending the Windows
is capable of real-time is a dangerous fantasy.
Note that most solutions such as PostMessage from a separate thread are also subject to
the same problem, because during menuing and dragging, the GetMessage call tends to look
only for mouse events, and ignores other pending events. So I know of no solution that
will actually work in all scenarios.
joe
On Fri, 1 Aug 2008 00:46:20 -0700 (PDT), hpesata <hpesata@xxxxxx> wrote:
Hi !Joseph M. Newcomer [MVP]
I wrote an MFC app using VC++ .NET 2003.
our app uses multiple docking panes (holding report ctrls and the
likes) which are implemented in several MFC extension dlls. In a
derived CWinApp::OnIdle() function I update the panes because our tool
displays online measurement data from a connected hardware device.
I realized that the processing of OnIdle() stops when I display a
right mouse button context menu within one of my panes. The processing
justs start again when i select a menu entry within the menu.
from what I was reading about TrackPopupMenu it seems to have a
seperate message pump running which is
different from CWinApp::Run()w which triggers OnIdle().
this also happens when I drag one of the panes around.
what can I do to keep my app displaying data during context menu /
pane-drag operations ?
any help with this would be greatly apreciated,
thanx in advance!
regards,
Hans
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
.
- Follow-Ups:
- Re: TrackPopupMenu blocks OnIdle() processing
- From: hpesata
- Re: TrackPopupMenu blocks OnIdle() processing
- From: Malachy Moses
- Re: TrackPopupMenu blocks OnIdle() processing
- References:
- TrackPopupMenu blocks OnIdle() processing
- From: hpesata
- TrackPopupMenu blocks OnIdle() processing
- Prev by Date: Re: Changing order of property pages in ***
- Next by Date: Re: icon background is not transparent when aero is enabled in vis
- Previous by thread: Re: TrackPopupMenu blocks OnIdle() processing
- Next by thread: Re: TrackPopupMenu blocks OnIdle() processing
- Index(es):