Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

flashing the task bar

Status
Not open for further replies.

BuilderSpec

Programmer
Dec 24, 2003
383
GB
Hi all

I am running Windows 2000 and C++ Builder...

I notice that when an app gets a message that hasn't got focus then the taskbar icon flashes blue to notify me..
digging around I found the answer sort of in FlashWindowEx,
this is the code I use :

FLASHWINFO pf;

pf.cbSize = sizeof ( FLASHWINFO );
pf.hwnd = Handle;
pf.dwFlags = FLASHW_TIMERNOFG|FLASHW_ALL;
FlashWindowEx(&pf);

Now FLASHW_ALL ( so it tells me ) will cause the title and caption to flash in the main form AND the task bar. However when I run it , only the title flashes, the task bar icon never changes.

Any one got any ideas ? is my code wrong ?


Regards


 
Sort of figured it out... this code works to set "other" windows task bar stuff to different colors but not my own.
How do make Form1 flash from Form1 ?
 
If you are using Form->Handle you cannot flash taskbar icon. If you want do it you must use Application->Handle in parameter pf.hwnd. I think that for flashing both easiest way is to call out FlashWindowEx two times. One with Form1->Handle and second with Application->Handle.
Good luck!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top