[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

detect flashwindow via hooks?

Posted on 2002-05-09
8
Medium Priority
?
519 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
Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

 

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

Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

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…
This article surveys and compares options for encoding and decoding base64 data.  It includes source code in C++ as well as examples of how to use standard Windows API functions for these tasks. We'll look at the algorithms — how encoding and decodi…
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…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

656 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