Click here to Skip to main content
15,899,679 members
Home / Discussions / C#
   

C#

 
GeneralRe: problem with logic Pin
tasumisra10-Jun-09 5:42
tasumisra10-Jun-09 5:42 
QuestionHooking messages of external application Pin
Muneeb Abdul Shakoor10-Jun-09 1:21
Muneeb Abdul Shakoor10-Jun-09 1:21 
AnswerRe: Hooking messages of external application Pin
Pete O'Hanlon10-Jun-09 1:28
mvePete O'Hanlon10-Jun-09 1:28 
RantRe: Hooking messages of external application PinPopular
Rajesh R Subramanian10-Jun-09 1:43
professionalRajesh R Subramanian10-Jun-09 1:43 
GeneralRe: Hooking messages of external application Pin
Manas Bhardwaj10-Jun-09 1:44
professionalManas Bhardwaj10-Jun-09 1:44 
GeneralRe: Hooking messages of external application Pin
saurabh sahay10-Jun-09 2:41
saurabh sahay10-Jun-09 2:41 
GeneralRe: Hooking messages of external application Pin
EliottA10-Jun-09 2:45
EliottA10-Jun-09 2:45 
GeneralRe: Hooking messages of external application Pin
Rajesh R Subramanian10-Jun-09 3:16
professionalRajesh R Subramanian10-Jun-09 3:16 
GeneralRe: Hooking messages of external application Pin
saurabh sahay10-Jun-09 4:01
saurabh sahay10-Jun-09 4:01 
GeneralRe: Hooking messages of external application Pin
Rajesh R Subramanian10-Jun-09 3:06
professionalRajesh R Subramanian10-Jun-09 3:06 
GeneralRe: Hooking messages of external application Pin
saurabh sahay10-Jun-09 4:02
saurabh sahay10-Jun-09 4:02 
AnswerRe: Hooking messages of external application Pin
saurabh sahay10-Jun-09 3:13
saurabh sahay10-Jun-09 3:13 
GeneralRe: Hooking messages of external application Pin
Dave Kreskowiak10-Jun-09 5:19
mveDave Kreskowiak10-Jun-09 5:19 
GeneralRe: Hooking messages of external application Pin
saurabh sahay10-Jun-09 5:47
saurabh sahay10-Jun-09 5:47 
You are correct in terms of stating that he needs to use C++ to catch the messages going to a specific word application as C#.net is safe programming.
In order to make the solution possible in C# we need to take indirect route that could have been direct with VC++, with the call back function private static IntPtr HookCallback(
int nCode, IntPtr wParam, IntPtr lParam)

by using MouseMessages, we can find the point where the click happened.
Then we will use WindowFromPoint(hookStruct.pt)
We can now find the class id. and pass the message further by SendMessage(hToolbar, TB_MOVEBUTTON, 2, 12); and send the hook again CallNextHookEx(_hookID, nCode, wParam, lParam). By knowing the structure of the word application, we will then find the button control id and name of it from its structure.
GeneralRe: Hooking messages of external application Pin
Rajesh R Subramanian10-Jun-09 6:17
professionalRajesh R Subramanian10-Jun-09 6:17 
GeneralRe: Hooking messages of external application Pin
saurabh sahay10-Jun-09 6:30
saurabh sahay10-Jun-09 6:30 
GeneralRe: Hooking messages of external application Pin
Rajesh R Subramanian10-Jun-09 7:09
professionalRajesh R Subramanian10-Jun-09 7:09 
GeneralRe: Hooking messages of external application Pin
saurabh sahay10-Jun-09 7:20
saurabh sahay10-Jun-09 7:20 
AnswerRe: Hooking messages of external application Pin
saurabh sahay10-Jun-09 3:31
saurabh sahay10-Jun-09 3:31 
GeneralRe: Hooking messages of external application Pin
tasumisra10-Jun-09 3:40
tasumisra10-Jun-09 3:40 
GeneralRe: Hooking messages of external application Pin
saurabh sahay10-Jun-09 4:03
saurabh sahay10-Jun-09 4:03 
GeneralRe: Hooking messages of external application Pin
Rajesh R Subramanian10-Jun-09 3:59
professionalRajesh R Subramanian10-Jun-09 3:59 
Questionopen Pdf in WebBrowser Control [modified] Pin
Abdul Rahman Hamidy10-Jun-09 1:08
Abdul Rahman Hamidy10-Jun-09 1:08 
AnswerRe: open Pdf in WebBrowser Control Pin
0x3c010-Jun-09 2:11
0x3c010-Jun-09 2:11 
GeneralRe: open Pdf in WebBrowser Control [modified] Pin
Abdul Rahman Hamidy10-Jun-09 19:44
Abdul Rahman Hamidy10-Jun-09 19:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.