Re: WM_TIMER prevents window from being displayed ???
- From: Joseph M. Newcomer <newcomer@xxxxxxxxxxxx>
- Date: Fri, 04 Jul 2008 12:36:38 -0400
Windows is not a real-time system. Keep repeating this until you understand it. This
means that trying to do things at very fine timer resolutions is intrinsically doomed
nearly all the time.
As already pointed out, you are swamping the thread queue with timer messages, which means
that the WM_PAINT never gets a chance.
You can sometimes get away with using the multimedia timers, just bear in mind that the
timer callback is always executed in a separate thread of control and consequently cannot
touch your windows. If you PostMessage at the same rate you are using now, you will see
the same phenomenon. You might want to see my essay on the use of I/O Completion Ports to
prevent message queue saturation and various umpleasant side effects (delayed user
interaction, failure to repaint).
joe
On Fri, 4 Jul 2008 08:26:14 -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 which are created dynamically be
selected menu-entries.
additonaly we have a function which starts a timer to update data
within the visible docking panes, this is also started via a menu-
entry.
If the timer is already running and we create another docking pane,
this pane doesnt become visible
until we stop the timer. this happens if the timer is using a period
like 10-50 ms. it works fine with higher periods like 300ms.
what can be the reason of this ? I tried to use InvalidateRect(0,
TRUE) and UpdateWindow() after creating the new pane but this didnt
help.
how can I achieve to make my new pane visible ?
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: WM_TIMER prevents window from being displayed ???
- From: hpesata
- Re: WM_TIMER prevents window from being displayed ???
- References:
- WM_TIMER prevents window from being displayed ???
- From: hpesata
- WM_TIMER prevents window from being displayed ???
- Prev by Date: Re: 32-bit programs on Windows x64
- Next by Date: Re: Dialog controls - unit of measurement
- Previous by thread: Re: WM_TIMER prevents window from being displayed ???
- Next by thread: Re: WM_TIMER prevents window from being displayed ???
- Index(es):
Relevant Pages
|