Win32 SetTimer and KillTimer functions -- a problem

Giganews Newsgroups
Subject: Win32 SetTimer and KillTimer functions -- a problem
Posted by:  R.Wieser (addre…@not.available)
Date: Thu, 6 Mar 2008

Hello All,

  I'm trying to get an SysTray icon to blink, and though of an easy way : A
flip-flop construction.

1) -- Start the blinking:
Set a repeat counter
Change the icon to its blink appearance
Start a Timer with a call-back to 3) (hWnd and idTimer are both Zero, delay
is 500)

2) -- flip:
Change the icon to its blink appearance
Start a Timer with a call-back to 3)

3) -- flop:
Change the icon to its normal appearance
decrement counter.
If its not Zero than Start a Timer with a call-back to 2)

The problem :  Part 1) works allright, but after that the "normal" and the
"blink" icon-images seem to fight to be displayed, as if the Timer-delay is
set to a minimum (if any).

In the above I'm *assuming* that an alarm, after it send its wm_timer
message and/or executed its call-back, gets destroyed, but I could be wrong
(it continues to run).

Any idea what is going on ?

Regards,
  Rudy Wieser

Replies