Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Add child to existing window
#1
Is it possible to add a child to existing window?

Thanks
#2
Can CreateControl be used?
#3
Existing window of other process?

Easy way.
Create control in QM (use CreateControl or CreateWindowEx), and use SetParent to add it to the window.
But then the child window belongs to other thread and even to other process than its parent window. Something will not work well.

Other way.
Create dll and inject it into that process/thread, for example using a hook. Then the dll can create the child window (CreateWindowEx).
#4
Do you have example of CreateControl please?
#5
Macro Macro1561
Code:
Copy      Help
int w=win("Calculator" "CalcFrame")
int c=CreateControl(0 "Edit" "text" 0 0 0 50 20 w -100)
out c

opt waitmsg 1
wait 5

DestroyWindow c

Most controls will not work, because parent window does not know about the control
#6
Is this wrong?

Macro Macro3
Code:
Copy      Help
int hwnd = win("Secure Client DB")
int t =CreateControl(0 "Edit" 0 0 184 310 104 18 hwnd 33)
BringWindowToTop t
10
#7
need opt waitmsg 1 and DestroyWindow.
#8
It created the edit box, but when message is sent to enter it throws back unsupported operation which is telling be the parent window can not read the entered information in the newly created edit box, correct?
#9
probably
#10
Next step...

Other way.
Create dll and inject it into that process/thread, for example using a hook. Then the dll can create the child window (CreateWindowEx).


Which I am a beginner at so we will see where that leads us.

Possible have an example?

Thanks
#11
Probably will be too difficult for you. Look in codeproject.com etc. QM cannot create dlls.
#12
Am I on the right track here?

http://www.codeproject.com/KB/system/ho ... tkw=inject
#13
No, it is not API hooking.
Look for
inject dll into other process with a hook

If you did not create dlls previously, you will have to learn many many things.

Quote:It created the edit box, but when message is sent to enter it throws back unsupported operation which is telling be the parent window can not read the entered information in the newly created edit box, correct?

Probably will be the same with or without dll.
#14
http://www.codingthewheel.com/archives/ ... sembly-dll
#15
http://www.codeproject.com/KB/threads/winspy.aspx
#16
Gintaras Wrote:
Quote:It created the edit box, but when message is sent to enter it throws back unsupported operation which is telling be the parent window can not read the entered information in the newly created edit box, correct?

Probably will be the same with or without dll.

Just saw this, if that's the case I will stop messing with this considering I don't really know much about the process of injecting the dll into the foreground process. Creating the dll itself isn't my problem but I am stumped as too how this injection process works!

Thank you very much for being understanding and for all the help Gintaras!


Forum Jump:


Users browsing this thread: 1 Guest(s)