Home > Software engineering >  Consult for prosperous message window handle
Consult for prosperous message window handle

Time:10-05

Need to write application background replication currently open prosperous text messages window area, my idea is original rough way, simulated mouse selected and keyboard copy operation, the background to want want send selected and copied the message window, and then copy the text of the copy out,
Met a problem now, I send message area of the prosperous message window selection, every time is positioned to the message input box, a location to the message area, I suspect that the message area and message input box are two different child Windows, I want to send message directly to a child window message area, how do I get messages area child window handle,

Get prosperous message window code:
//get the mouse position window HWND 
HWND SWND=WindowFromPoint (scmPt);

News regional coordinate access:
 GetWindowRect (SWND, & amp; Rec a); 
POINT pt={(rec a. + rec a right. The left)/2, (rec a. + rec a bottom. Top)/2};

Send the left mouse button pressed and pop-up message:
 mouse_event (MOUSEEVENTF_LEFTDOWN, x, y, 0, 0). 
Sleep (100);
Mouse_event (MOUSEEVENTF_LEFTUP, x, y, 0, 0).

Send A Ctrl + A selection message:
 keybd_event (VK_CONTROL, 0, 0, 0); 
Keybd_event (' A ', 0, 0, 0).
Keybd_event (' A ', 0, KEYEVENTF_KEYUP, 0).
Keybd_event (KEYEVENTF_KEYUP VK_CONTROL, 0, 0);

CodePudding user response:

GetWindow (HWND, GW_CHILD); Returns null, even can't find the window control, fast was tortured to death

CodePudding user response:

People in order to avoid the hackers do illegal things in this way, interface controls are actually completely mapped out, how can let you grab that you try the QQ, is it

CodePudding user response:

Using GetWord controls,

CodePudding user response:

Is that a DUI, could not find the HWND child window handle,

CodePudding user response:

Want want message box is to obtain the best, just try, you can find A message through FindWindowEx handles the message area, activate the window, to send Ctrl + A, Ctrl + C to copy the text, the landlord to try again

CodePudding user response:

Done, ask a question again, want want window is based on cef, I look at the window control for aef. DLL, should be based on cef control, is there any way to cef was obtained from the handle to the window HWND of the browser? Then I can use the broser access to the frame, then view the HTML code of the current message window

CodePudding user response:

reference 4 floor VisualEleven response:
that's DUI, could not find the HWND child window handle,

Message window should be based on the chrome cef control, is there a way can be a handle to the window HWND from news, access to the control of the browser? I want to get to the window of the HTML source code

CodePudding user response:

reference 5 floor cvbtvbwu reply:
want want message box is to obtain the best, just try, you can find A message through FindWindowEx handles the message area, activate the window, to send Ctrl + A, Ctrl + C to copy the text, the original poster try again

Message window should be based on the chrome cef control, is there a way can be a handle to the window HWND from news, access to the control of the browser? I want to get to the window of the HTML source code
  • Related