Re: Child windows of other processes

new topic     » goto parent     » topic index » view thread      » older message » newer message

Christian Winsall wrote:
> 
> Is it possible to create a child window of another process using win32lib? 
> I'm making a screensaver, so my application is supposed to run in preview mode
> if called with the command-line argument /p ####.  It's supposed to run as a
> child of the window with #### as its HWND.  I think I probably won't be able
> to do this with win32lib, can anyone confirm?
> 
> Thanks,
> chris.

If I were snooping on other computers, or trying to spread trojans, this would
be a dream. However, using the only API routine I know about which could do the
job (SetParent()) doesn't look good, because
<quote Microsofr doc>
Remarks

An application can use the SetParent function to set the parent window of a
pop-up, overlapped, or child window. The new parent window and the child window
must belong to the same application.
If the window identified by the hwndChild parameter is visible, Windows performs
the appropriate redrawing and repainting.
</quote>

You can wrap SetParent() using registerw32Function(). The next version of the
library should provide such a wrapper, with extended functionaluty. However,
breaking the "same app" limitation, if at all possible, will involve advanced
trickery where win32lib won't help.

CChris

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu