[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 532
  • Last Modified:

Dispatch "WS_ACTIVATE" messages

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
AlexMert
Asked:
AlexMert
  • 5
  • 4
1 Solution
 
ZoppoCommented:
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
 
AlexMertAuthor Commented:
@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
 
ZoppoCommented:
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
AlexMertAuthor Commented:
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
 
ZoppoCommented:
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
 
AlexMertAuthor Commented:
Zoppo, I want to pay for a project ! Thats why I wanted to speak wit you
0
 
ZoppoCommented:
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
 
AlexMertAuthor Commented:
Oh thanks again Zoppo, didn't know about carriers on ee :) I hope you success on your projects then ;) !
0
 
ZoppoCommented:
Thanks a lot. I wish you good luck with your project too ...
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 5
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now