Click here to Skip to main content
16,005,473 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: how to send mouseclickmsg to window? Pin
prasad_som28-Mar-07 6:26
prasad_som28-Mar-07 6:26 
GeneralRe: how to send mouseclickmsg to window? Pin
Goggelmoggel28-Mar-07 6:32
Goggelmoggel28-Mar-07 6:32 
GeneralRe: how to send mouseclickmsg to window? Pin
James R. Twine28-Mar-07 6:36
James R. Twine28-Mar-07 6:36 
GeneralRe: how to send mouseclickmsg to window? Pin
Goggelmoggel28-Mar-07 6:41
Goggelmoggel28-Mar-07 6:41 
GeneralRe: how to send mouseclickmsg to window? Pin
James R. Twine28-Mar-07 6:47
James R. Twine28-Mar-07 6:47 
AnswerRe: how to send mouseclickmsg to window? Pin
prasad_som28-Mar-07 6:44
prasad_som28-Mar-07 6:44 
QuestionRe: how to send mouseclickmsg to window? Pin
Goggelmoggel28-Mar-07 6:54
Goggelmoggel28-Mar-07 6:54 
AnswerRe: how to send mouseclickmsg to window? Pin
prasad_som28-Mar-07 19:56
prasad_som28-Mar-07 19:56 
Sending WM_LBUTTONDOWN to parent window will not work here, as parent window will receive this message, which does not effect in clicking the control.
You need to identify window from a particular point, then send WM_LBUTTONDOWN and WM_LBUTTONUP messages in sequnce to simulate click. Using X,Y values you have mentioned get window at that point using WindowFromPoint send messages mentioned above.
Use code smething like this,
const long nClickingPoint= 5;
POINT pt;
// X and y are point you are talking about
pt.x = x + nClickingPoint;// to make click inside button
pt.y = y + nClickingPoint;// to make click inside button
CWnd * pCtrl = WindowFromPoint(pt);//this will return window at that point
pCtrl->SendMessage(WM_LBUTTONDOWN,0,MAKELPARAM((nClickingPoint),(nClickingPoint)));
pCtrl->SendMessage(WM_LBUTTONUP,0,MAKELPARAM((nClickingPoint),(nClickingPoint)));


Remember, WindowFromPoint requires screen co-ordinates to identify window. Use ClientToScreen appropriately for that.





QuestionWinHttp help with Request Headers Pls.. Pin
montiee28-Mar-07 4:29
montiee28-Mar-07 4:29 
AnswerRe: WinHttp help with Request Headers Pls.. Pin
montiee28-Mar-07 6:35
montiee28-Mar-07 6:35 
QuestionTab control Pin
prathuraj28-Mar-07 4:21
prathuraj28-Mar-07 4:21 
QuestionRe: Tab control Pin
David Crow28-Mar-07 4:47
David Crow28-Mar-07 4:47 
AnswerRe: Tab control Pin
prathuraj28-Mar-07 18:31
prathuraj28-Mar-07 18:31 
GeneralRe: Tab control Pin
David Crow29-Mar-07 2:32
David Crow29-Mar-07 2:32 
Questioncapture mouse move Pin
deeps_cute28-Mar-07 3:24
deeps_cute28-Mar-07 3:24 
AnswerRe: capture mouse move [modified] Pin
prasad_som28-Mar-07 3:46
prasad_som28-Mar-07 3:46 
AnswerRe: capture mouse move Pin
James R. Twine28-Mar-07 4:01
James R. Twine28-Mar-07 4:01 
QuestionCan a console application use Message IPC for broadcasting to other process(Not windows) Pin
param_nirvana28-Mar-07 0:35
param_nirvana28-Mar-07 0:35 
GeneralRe: Can a console application use Message IPC for broadcasting to other process(Not windows) Pin
param_nirvana28-Mar-07 0:59
param_nirvana28-Mar-07 0:59 
AnswerRe: Can a console application use Message IPC for broadcasting to other process(Not windows) Pin
James R. Twine28-Mar-07 2:33
James R. Twine28-Mar-07 2:33 
GeneralRe: Can a console application use Message IPC for broadcasting to other process(Not windows) Pin
Nibu babu thomas28-Mar-07 2:41
Nibu babu thomas28-Mar-07 2:41 
GeneralRe: Can a console application use Message IPC for broadcasting to other process(Not windows) Pin
James R. Twine28-Mar-07 3:02
James R. Twine28-Mar-07 3:02 
GeneralRe: Can a console application use Message IPC for broadcasting to other process(Not windows) Pin
param_nirvana28-Mar-07 3:25
param_nirvana28-Mar-07 3:25 
GeneralRe: Can a console application use Message IPC for broadcasting to other process(Not windows) Pin
param_nirvana28-Mar-07 3:27
param_nirvana28-Mar-07 3:27 
Questionhow to load bit map Pin
birajendu28-Mar-07 0:16
birajendu28-Mar-07 0:16 

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.