?
Solved

Dispatch "WS_ACTIVATE" messages

Posted on 2013-06-20
10
Medium Priority
?
530 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
[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
  • 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 2000 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
Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

 

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
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.
Progress
Suggested Courses

771 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