English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

how to capture events thats generated while "save dialogbox" appears from any application ?

What i'm trying to do is:
while clicking "save/save as" button from ms-word a save-dialogbox appears. i want to replace that dialog box with my own application. i mean, i want to catch that perticular event and handle it my way.
This is global-hooking concept. I do have some ex. of global hooking.

2006-06-13 22:15:48 · 1 answers · asked by Krex 3 in Computers & Internet Software

1 answers

Hooking can be part of that, yes, but what you're really looking to do is subclass the window. Basically what you're going to do is build a piece of software that diverts messages going to the target window through your own code. From there, you can change the behavior however you like. Note that depending on exactly what that window is (and you should be able to figure out a lot about it with your hooks), you may run into problems if it's a system dialog or similar.

The real trick here is getting into the process space you want, in a such a way that you won't cause problems in the target application. That's a slightly different topic, and in some ways more interesting topic, but I'm afraid I have to leave the precise mechanics to you ;)

As an aside, while this is certainly possible using the win32 api (weird system dialog cases possibly excepted), I haven't seen a working example in .Net. It's really not something that comes up much, but I'd guess you're going to be doing native for this one.

2006-06-13 22:32:12 · answer #1 · answered by Ryan 4 · 2 1

fedest.com, questions and answers