Solved

detect flashwindow via hooks?

Posted on 2002-05-09
8
488 Views
Last Modified: 2013-12-03
I want to detect if and which window is flashing. Flashing as in using FlashWindow(TRUE). Using system wide hooks or what ever.
I'm using VC++ (6)
0
Comment
Question by:KnoppenSpook
  • 4
  • 3
8 Comments
 

Author Comment

by:KnoppenSpook
ID: 6999885
If it's worth more point you'll get them
0
 
LVL 4

Accepted Solution

by:
mblat earned 200 total points
ID: 7000092
So what exactly do you need to know?  How to install system wide hook?
There is an artile on MSDN about it, called Win 32 Hooks.
Function call you need to look for SetWindowsHookEx.

All you need to do is:
1. Install windows hook.
2. Detect WM_NCACTIVATE message. ( That's what FlashWindow does - it sends WM_NCACTIVATE )
3. Then see if they go to the same window with the same interval.  That's the window that is flashing.  

Of cause it will take several falshes to detect it. And by the way - interval doesn;t have to be the same come to think about it.  It probably will, but doesn't have to.


Hope it helps a little.  
0
 
LVL 4

Expert Comment

by:mblat
ID: 7000097
So what exactly do you need to know?  How to install system wide hook?
There is an artile on MSDN about it, called Win 32 Hooks.
Function call you need to look for SetWindowsHookEx.

All you need to do is:
1. Install windows hook.
2. Detect WM_NCACTIVATE message. ( That's what FlashWindow does - it sends WM_NCACTIVATE )
3. Then see if they go to the same window with the same interval.  That's the window that is flashing.  

Of cause it will take several falshes to detect it. And by the way - interval doesn;t have to be the same come to think about it.  It probably will, but doesn't have to.


Hope it helps a little.  
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:KnoppenSpook
ID: 7000694
Well, I just have to know how to detect the flashing. I know how to work with hooks (sort of). Is WM_NCACTIVATE only created by FlashWindow()? Or also from other actions.

Thanks for your reply!

0
 

Author Comment

by:KnoppenSpook
ID: 7000758
thanks for your reply.
I'll work with this and let you knwo the results.
0
 

Author Comment

by:KnoppenSpook
ID: 7001357
hmm experts-exchange is very weird, you can't see your reply and then you see it twice :-)
0
 
LVL 4

Expert Comment

by:mblat
ID: 7002016
Some other events in your system can generate WM_NCACTIVATE.  
User selecting window via mouse click or ALT-TAB is some of them....
I guess you will have to recognize it somehow....


Good luck...
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

If you have ever found yourself doing a repetitive action with the mouse and keyboard, and if you have even a little programming experience, there is a good chance that you can use a text editor to whip together a sort of macro to automate the proce…
A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now