How to Blink/Flash the non active window
-
Hi,
I am working on a chat application. I am using the following code to Blink/Flash the window (which i find in some other post)
@FLASHWINFO finfo;
finfo.cbSize = sizeof( FLASHWINFO );
finfo.hwnd = this->winId();
finfo.uCount = 20;
finfo.dwTimeout = 400;
finfo.dwFlags = FLASHW_ALL; //Flash window and tray icon
FlashWindowEx( &finfo );@This works for most of the cases except one that if my window is not an Active window then it blinks on tray icon. Window doesn't blink.
Scenario is that i have 2 chat window opened and one is active and i have to blink the other one which is not active window.
Can someone please explain me if i am doing something wrong or is it qt Framework limitation. How can i solve this problem.
Thanks
Prankur -
It works fine in Win XP, for both active and inactive windows. Maybe it's a "feature" of your version of Windows.
There is also a function for that in Qt (QApplication::alert), but internally it also calls FlashWindowEx, only works for inactive windows, and only flashes the taskbar button.