?
Solved

detect flashwindow via hooks?

Posted on 2002-05-09
8
Medium Priority
?
510 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 600 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
Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

 

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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

With most software applications trying to cater to multiple user needs nowadays, the focus is to make them as configurable as possible. For e.g., when creating Silverlight applications which will connect to WCF services, the service end point usuall…
What my article will show is if you ever had to do processing to a listbox without being able to just select all the items in it. My software Visual Studio 2008 crystal report v11 My issue was I wanted to add crystal report to a form and show…
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 tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

764 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