Reputation: 171
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.
Upvotes: 3
Views: 730
Reputation: 22930
This is possible using code injection. Have a look at mach inject framework and PorcShark Finder.
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.
Upvotes: 2