Solved

detect flashwindow via hooks?

Posted on 2002-05-09
8
499 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 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
SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

 

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

Enroll in June's Course of the Month

June's Course of the Month is now available! Every 10 seconds, a consumer gets hit with ransomware. Refresh your knowledge of ransomware best practices by enrolling in this month's complimentary course for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

This article shows how to make a Windows 7 gadget that extends its U/I with a flyout panel -- a window that pops out next to the gadget.  The example gadget shows several additional techniques:  How to automatically resize a gadget or flyout panel t…
After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
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…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…

728 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