Solved

detect flashwindow via hooks?

Posted on 2002-05-09
8
493 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
Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

 

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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

zlib is a free compression library (a DLL) on which the popular gzip utility is built.  In this article, we'll see how to use the zlib functions to compress and decompress data in memory; that is, without needing to use a temporary file.  We'll be c…
For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared 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…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

821 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