Click here to Skip to main content
15,890,512 members
Home / Discussions / C#
   

C#

 
Questioncross-post Pin
Luc Pattyn27-Oct-10 0:58
sitebuilderLuc Pattyn27-Oct-10 0:58 
AnswerRe: cross-post Pin
mengnancy27-Oct-10 1:02
mengnancy27-Oct-10 1:02 
QuestionKeyboard input handle problem Pin
Emmet_Brown26-Oct-10 21:22
Emmet_Brown26-Oct-10 21:22 
AnswerRe: Keyboard input handle problem Pin
RaviRanjanKr26-Oct-10 21:59
professionalRaviRanjanKr26-Oct-10 21:59 
GeneralRe: Keyboard input handle problem Pin
Emmet_Brown26-Oct-10 22:01
Emmet_Brown26-Oct-10 22:01 
QuestionApplication events Pin
jenya726-Oct-10 21:12
jenya726-Oct-10 21:12 
AnswerRe: Application events Pin
Rajesh Anuhya26-Oct-10 21:17
professionalRajesh Anuhya26-Oct-10 21:17 
AnswerRe: Application events Pin
Keith Barrow26-Oct-10 21:27
professionalKeith Barrow26-Oct-10 21:27 
Assuming you can't change the other appication, the only way that I know is through the Windows message queue.
Windows Message Handling - Part 1[^]

You need to get the windows handle (the HWND pointer IIRC) of the application you want to interact with, then hook into the queue filtering messages aimed at that window. Finally, you need the pointer of the button that you want to observe, and react to any ON_CLICK event raised by it.

Go to Start Menu ---> Microsoft VSnnnn --> Visual Studio Tools --> Spy++. Spy ++ allows you to watch the message queue for a window through a GUI, so you can see better what is going on.


I had a requirement for a WPF project of mine to interact with a VC++ 6.0 application, via the message queue. We were lucky that the C++ app was written in-house, so we arranged for a handshake between our two applications (passing the HWND handle to eachother). This meant we could raise events and pass small amounts of data directly across the message queue. This avoided the need to figure out the HWND of the buttons, as these changed each time.

GeneralRe: Application events Pin
jenya726-Oct-10 21:32
jenya726-Oct-10 21:32 
QuestionOO training Pin
abhithcker26-Oct-10 19:47
abhithcker26-Oct-10 19:47 
AnswerRe: OO training Pin
Rajesh Anuhya26-Oct-10 20:03
professionalRajesh Anuhya26-Oct-10 20:03 
GeneralRe: OO training Pin
leppie26-Oct-10 20:37
leppie26-Oct-10 20:37 
AnswerRe: OO training PinPopular
RaviRanjanKr26-Oct-10 21:08
professionalRaviRanjanKr26-Oct-10 21:08 
QuestionC# - Send Message to minimize window game. How i can do this? Pin
NaiiD26-Oct-10 10:02
NaiiD26-Oct-10 10:02 
AnswerRe: C# - Send Message to minimize window game. How i can do this? Pin
NaiiD27-Oct-10 6:33
NaiiD27-Oct-10 6:33 
Questioncan someone tell me how can i detect an ellipse in BTMP file? Pin
inayathussaintoori26-Oct-10 9:46
inayathussaintoori26-Oct-10 9:46 
AnswerRe: can someone tell me how can i detect an ellipse in BTMP file? Pin
DaveAuld26-Oct-10 9:50
professionalDaveAuld26-Oct-10 9:50 
Answer1212 Pin
Luc Pattyn26-Oct-10 9:53
sitebuilderLuc Pattyn26-Oct-10 9:53 
GeneralRe: 1212 [modified] Pin
DaveAuld26-Oct-10 9:55
professionalDaveAuld26-Oct-10 9:55 
GeneralRe: can someone tell me how can i detect an ellipse in BTMP file? Pin
inayathussaintoori26-Oct-10 11:37
inayathussaintoori26-Oct-10 11:37 
AnswerRe: can someone tell me how can i detect an ellipse in BTMP file? Pin
Luc Pattyn26-Oct-10 12:01
sitebuilderLuc Pattyn26-Oct-10 12:01 
GeneralRe: can someone tell me how can i detect an ellipse in BTMP file? Pin
inayathussaintoori26-Oct-10 12:35
inayathussaintoori26-Oct-10 12:35 
GeneralRe: can someone tell me how can i detect an ellipse in BTMP file? Pin
Dave Kreskowiak26-Oct-10 13:49
mveDave Kreskowiak26-Oct-10 13:49 
AnswerRe: can someone tell me how can i detect an ellipse in BTMP file? Pin
Alan Balkany27-Oct-10 4:51
Alan Balkany27-Oct-10 4:51 
Questionface detection problem Pin
inayathussaintoori26-Oct-10 8:04
inayathussaintoori26-Oct-10 8:04 

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.