Re: WM_TIMER prevents window from being displayed ???

Tech-Archive recommends: Fix windows errors by optimizing your registry



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 !

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
Joseph M. Newcomer [MVP]
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
.



Relevant Pages

  • WM_TIMER prevents window from being displayed ???
    ... I wrote an MFC app using VC++ .NET 2003. ... our app uses multiple docking panes which are created dynamically be ... If the timer is already running and we create another docking pane, ... like 10-50 ms. it works fine with higher periods like 300ms. ...
    (microsoft.public.vc.mfc)
  • Re: Do-Nothing WinForm App Using 4 Threads?
    ... Windows CE). ... | refactoring a multi-threaded GUI app at work and want to be sure it's ... I expected a timer to be on its own ... And the event handling from remote objects ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Do-Nothing WinForm App Using 4 Threads?
    ... refactoring a multi-threaded GUI app at work and want to be sure it's ... I created a plain old Windows Form application with a ... I then added a Windows Timer control to the form and updated a label ... Non "Windows Forms Timers" are handled by the Threadpool, more exactly their handlers run on an IO completion thread pulled from the pool. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Dual-core systems - AMD - Windows Vista
    ... recall that NTP on Windows uses some interpolation technique to overcome ... timer granularity, and that the interpolation used a CPU counter. ... Windows Vista. ... Windows Vista differ from Windows XP so as to affect NTP, ...
    (comp.protocols.time.ntp)
  • Re: Need info on Windows Timers
    ... > 1) How exactly Windows executes the timer callback. ... > From the articles I read, ... > timer interrupt. ...
    (microsoft.public.win32.programmer.kernel)