Click here to Skip to main content
14,303,324 members

C / C++ / MFC

 
AnswerRe: Retrieve HWND of a control that has focus Pin
_Flaviu10-Aug-18 3:56
member_Flaviu10-Aug-18 3:56 
AnswerRe: Retrieve HWND of a control that has focus Pin
_Flaviu10-Aug-18 4:36
member_Flaviu10-Aug-18 4:36 
GeneralRe: Retrieve HWND of a control that has focus Pin
David Crow10-Aug-18 4:58
memberDavid Crow10-Aug-18 4:58 
AnswerRe: Retrieve HWND of a control that has focus Pin
leon de boer10-Aug-18 6:57
memberleon de boer10-Aug-18 6:57 
GeneralRe: Retrieve HWND of a control that has focus Pin
_Flaviu11-Aug-18 21:08
member_Flaviu11-Aug-18 21:08 
GeneralRe: Retrieve HWND of a control that has focus Pin
Richard MacCutchan11-Aug-18 21:56
protectorRichard MacCutchan11-Aug-18 21:56 
GeneralRe: Retrieve HWND of a control that has focus Pin
_Flaviu13-Aug-18 0:09
member_Flaviu13-Aug-18 0:09 
GeneralRe: Retrieve HWND of a control that has focus Pin
Randor 13-Aug-18 1:51
professional Randor 13-Aug-18 1:51 
Some comments:

1.) If you are not the author of the target process then from a purely conceptual point of view you are attacking the process. The modern UWP applications will limit these types of cross process interactions. You should check if the target process supports Active Accessibility, UI Automation, or IAccessibleEx.

2.) If you need to send input such as WM_CHAR to a window owned by another process you may need to use the AttachThreadInput function before sending the WM_CHAR or other input messages.

3.) The SetWindowText function can only be used in the current process. It cannot be used to set the text in a window owned by another process.

4.) To set the text of a window in another process you will need to send the WM_SETTEXT message directly.

5.) The SendMessage function can cause your program to hang. Use SendMessageTimeout instead.

6.) You will need to make sure that the process setting the text is of greater or equal integrity levels. For example... a process running at medium level cannot set the text in a window owned by a process running at high integrity level.

Best Wishes,
-David Delaune

P.S. The solution to your problem is in bold.
GeneralRe: Retrieve HWND of a control that has focus Pin
leon de boer12-Aug-18 3:47
memberleon de boer12-Aug-18 3:47 
QuestionWhat is the magic incantation to select a row in a CListCtrl in report mode ? Pin
Maximilien9-Aug-18 9:09
memberMaximilien9-Aug-18 9:09 
GeneralRe: What is the magic incantation to select a row in a CListCtrl in report mode ? Pin
David Crow9-Aug-18 9:47
memberDavid Crow9-Aug-18 9:47 
GeneralRe: What is the magic incantation to select a row in a CListCtrl in report mode ? Pin
Maximilien9-Aug-18 12:06
memberMaximilien9-Aug-18 12:06 
GeneralRe: What is the magic incantation to select a row in a CListCtrl in report mode ? Pin
Maximilien21-Aug-18 5:11
memberMaximilien21-Aug-18 5:11 
Questionhow to use recursive descent algorithm to compute an arithmetical expression? Pin
tony_ming8-Aug-18 20:42
membertony_ming8-Aug-18 20:42 
AnswerRe: how to use recursive descent algorithm to compute an arithmetical expression? Pin
Richard MacCutchan8-Aug-18 20:50
protectorRichard MacCutchan8-Aug-18 20:50 
AnswerRe: how to use recursive descent algorithm to compute an arithmetical expression? Pin
Stefan_Lang8-Aug-18 22:07
memberStefan_Lang8-Aug-18 22:07 
QuestionRe: how to use recursive descent algorithm to compute an arithmetical expression? Pin
David Crow9-Aug-18 4:55
memberDavid Crow9-Aug-18 4:55 
AnswerRe: how to use recursive descent algorithm to compute an arithmetical expression? Pin
CPallini9-Aug-18 10:38
mveCPallini9-Aug-18 10:38 
QuestionMovePrev() throwing 265926 error code (End Of RowsSet). Pin
Sampath5797-Aug-18 20:19
memberSampath5797-Aug-18 20:19 
AnswerRe: MovePrev() throwing 265926 error code (End Of RowsSet). Pin
Jochen Arndt7-Aug-18 21:52
mveJochen Arndt7-Aug-18 21:52 
GeneralRe: MovePrev() throwing -2147217837 error code Pin
Sampath5797-Aug-18 22:23
memberSampath5797-Aug-18 22:23 
GeneralRe: MovePrev() throwing 265926 error code (End Of RowsSet). Pin
Jochen Arndt7-Aug-18 23:26
mveJochen Arndt7-Aug-18 23:26 
GeneralRe: MovePrev() throwing 265926 error code (End Of RowsSet). Pin
Sampath5798-Aug-18 0:01
memberSampath5798-Aug-18 0:01 
GeneralRe: MovePrev() throwing 265926 error code (End Of RowsSet). Pin
Jochen Arndt8-Aug-18 0:29
mveJochen Arndt8-Aug-18 0:29 
GeneralRe: MovePrev() throwing 265926 error code (End Of RowsSet). Pin
Sampath5798-Aug-18 3:19
memberSampath5798-Aug-18 3:19 

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.