Question

On Windows we can find the window handle of running process and attach our window onto it as a child window, so the two different processes look like the same one.

I wonder if there is a similar way to implement this requirement in cocoa.

Was it helpful?

Solution

This is possible using code injection. Have a look at mach inject framework and PorcShark Finder.

enter image description here

Or
Find position of another window using CGWindow methods and display your window over it.
Have a look at Son of Grab sample project.

Son of Grab shows how to use the new CGWindow API to get images of arbitrary sets of windows, including images of the current contents of the screen.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top