Article View: comp.windows.ms.programmer
Article #2326Re: Flashing Icons
From: Peter Ruczynski
Date: Fri, 26 Apr 1991 10:14
Date: Fri, 26 Apr 1991 10:14
53 lines
2509 bytes
2509 bytes
In article <1352@bjcong.bj.co.uk> rkt@bjcong.bj.co.uk (RAKESH TANDON) writes:
>Hi,
> I want to be able to make my ICON flash to attract the users attention,
>something like the way the RECORDER program flashs its icon. Does anyone
>have any ideas.
>
>I have posted this question twice already and have not recieved any replies,
>I'm sure someone out there knows the answer.
Ok,
this is all theory and I haven't tried programming this but
this is what I think the recorder app is doing when it is flashing
its icon.
Firstly lets look at what spy tells us:
0000 WM_TIMER 00DF 0A9DOOC2 erase sequence
5078 WM_ICONERASEBKGND 0846 00000000
0000 WM_TIMER 00DF 0A9DOOC2 paint sequence
5078 WM_PAINTICON 0001 00000000
5078 WM_ICONERASEBKGND 0836 00000000
50BC WM_NCPAINT 0001 00000000
Where:
5078 is the parent (main) window
50BC is the list box within the main window
From this we can deduce that recorder sets up a simple timer (ie no
timer callback function) and on receipt of alternate WM_TIMER sends messages
to itself which then erase and paint the icon.
I would guess that recorder isn't doing anything fancy with these messages,
just passing them to DefWindowProc. However, to erase the icon I think you
need to InvalidateRect the icon window (Main window of the app). Painting
the icon you just pass the message on similarly with the second
WM_ICONERASEBKGND, which I guess fills in the background around the icon.
I think the NCPAINT message can be ignored. It seems to be going to the
list box, why I can't think!
Hope this is useful, anyone have any other ideas??
Pete.
>Rakesh Kumar Tandon : email - rkt@bj.co.uk
--
-w--------- Pyramid Technology U.K. Peter Ruczynski
---www------- Pyramid House #include <std/disclaimer.h>
-----wwwww----- Farnborough pjr@pyra.co.uk
-------wwwwwww--- Hants GU14 7PL England. Wot no funny comment :-)
Technical Details
Message-ID:
<672660893.AA10694@flaccid>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!cs.utexas.edu!uunet!mcsun!ukc!pyrltd!pyra.co.uk!pjrReferences:
<1352@bjcong.bj.co.uk>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!cs.utexas.edu!uunet!mcsun!ukc!pyrltd!pyra.co.uk!pjr From: pjr@pyra.co.uk (Peter Ruczynski) Newsgroups: comp.windows.ms.programmer Subject: Re: Flashing Icons Keywords: System Caret Message-ID: <672660893.AA10694@flaccid> Date: 26 Apr 91 10:14:53 GMT References: <1352@bjcong.bj.co.uk> Sender: news@pyra.co.uk (News system) Reply-To: pjr@pyra.co.uk (Peter Ruczynski) Organization: Pyramid Technology Ltd, Farnborough, ENGLAND Lines: 53