Solved

Dispatch "WS_ACTIVATE" messages

Posted on 2013-06-20
10
525 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 31

Expert Comment

by:Zoppo
ID: 39265527
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
ID: 39266264
@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 31

Accepted Solution

by:
Zoppo earned 500 total points
ID: 39270412
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
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 

Author Comment

by:AlexMert
ID: 39277463
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
 
LVL 31

Expert Comment

by:Zoppo
ID: 39278318
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
ID: 39278467
Zoppo, I want to pay for a project ! Thats why I wanted to speak wit you
0
 
LVL 31

Expert Comment

by:Zoppo
ID: 39278522
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
ID: 39278640
Oh thanks again Zoppo, didn't know about carriers on ee :) I hope you success on your projects then ;) !
0
 
LVL 31

Expert Comment

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

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

773 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