Solved

Dispatch "WS_ACTIVATE" messages

Posted on 2013-06-20
10
518 Views
Last Modified: 2013-06-26
1. How  to make a program that can make a specific window to remain inactive when clicking on it, but still the click to register ?

2. And how can I make to detect when the window wants to create another window and get the handle of it before the window is created ?

Note - that Im not a very advanced programmer so Ill pay someone to do this but I want to know what does those tasks implies first.... Thankyou
- I also tried applying the WS_EX_NOACTIVATE style to the window, but has no effect even if returns positive ! What else could I do ?

EDIT : Ive found that is possible, BUT I really need also the oppinon of other experts please !

Via DLL injecting/hooking :
#1. After the hooking process in this window, dispatch all the 'WS_ACTIVATE' messages that are coming to the window !

#2. Actually I just saw some time ago an article on codeproject just right about this, about dll injecting into the specific window, and by tracking the window's activity you can actually see when will want to create a new window and you can find what will be the window's handle before it will be created or drawn.

As I said, I want to know others oppinions ...
0
Comment
Question by:AlexMert
  • 5
  • 4
10 Comments
 
LVL 30

Expert Comment

by:Zoppo
Comment Utility
Hi AlexMert,

if you just want to know other opinions I would like to mention API hooking, this would i.e. allow you to hook CreateWindow.

For API hooking you can use existing libraries like i.e. MS Detour (http://research.microsoft.com/en-us/projects/detours/) or Mhook (http://codefromthe70s.org/mhook22.aspx). A good article to learn about API hooking using MS Detour is http://www.codeproject.com/Articles/30140/API-Hooking-with-MS-Detours?msg=4038017#xx4038017xx

ZOPPO
0
 

Author Comment

by:AlexMert
Comment Utility
@Zoppo, so I will then be able to click on window , the window to process the click but to not get activated anymore ?

Also you haven't responded to my second question >.< with the window detecting thing :(
0
 
LVL 30

Accepted Solution

by:
Zoppo earned 500 total points
Comment Utility
About the click handling IMO it dependes on the application which the window belongs to and how it processes messages. There may be several possibilities to catch the mouse click (mouse hook, transparent top-most window, API hook for Get-/PeekMessage, ...), but if/how it's possible to let that application handle the mouse click without activating it depends on the application's implementation, i.e. it might be the application assumes it is active and/or has input focus or it's mouse click handler implicit activates the window. It might be the best you can do is to just de-activate the window after a mouse click.

The second question is why I mentioned the API hook because I think it might be the best way to want to create a new window [...] find what will be the window's handle before it will be created or drawn because your hook can intercept CreateWindow(Ex) function, call the original itself to create the window, do anything you want to do and then pass back the handle to the calling application.
0
 

Author Comment

by:AlexMert
Comment Utility
Thankyou alot Zoppo !

May I ask you how can I contact you ? Its not about this problem nor other, you'll see what I mean when I will send you a private message. Thankyou
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 30

Expert Comment

by:Zoppo
Comment Utility
Hi - I'm glad I could help you ...

But sorry, to be honest I don't like to give my email to many peoples to allow them to ask me for help whenever they need one. I'll be noticed when new questions are asked here and I swear whenever I have time and an idea how to help I'll help.

Have a nice day,

best regards,

ZOPPO
0
 

Author Comment

by:AlexMert
Comment Utility
Zoppo, I want to pay for a project ! Thats why I wanted to speak wit you
0
 
LVL 30

Expert Comment

by:Zoppo
Comment Utility
Well, sorry, I'm even not really interested in another job coz I have one which really takes up all of my time, I don't want to spend my little spare time with more work.

Please understand that I even don't want to share any contact info here because otherwise everyone who accidentally sees this thread can write me mails.

BTW, you could try to add a job offer at http://careers.experts-exchange.com/, thus I think you probably can find other experts here which are willing to help you. I know a lot of experts here are at least as (or even more) experienced as I am.

ZOPPO
0
 

Author Comment

by:AlexMert
Comment Utility
Oh thanks again Zoppo, didn't know about carriers on ee :) I hope you success on your projects then ;) !
0
 
LVL 30

Expert Comment

by:Zoppo
Comment Utility
Thanks a lot. I wish you good luck with your project too ...
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
mapShare challenge 13 66
SQL400 max size 5 52
eclipse package explorer vs project explorer view 2 27
Not needed 13 53
A short article about a problem I had getting the GPS LocationListener working.
Citrix XenApp, Internet Explorer 11 set to Enterprise Mode and using central hosted sites.xml file.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

762 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

11 Experts available now in Live!

Get 1:1 Help Now