1. Child windows of other processes
		
		
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.
		
	 
	
		
		2. Re: Child windows of other processes
		
		
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?
This functionality is not already coded as a Win32lib routine. However, as
Win32lib allows you to mix its routines with standard API calls, you can still do
this using the library but you have to code the functionality yourself using API
calls.
-- 
Derek Parnell
Melbourne, Australia
Skype name: derek.j.parnell
		
	 
	
		
		3. Re: Child windows of other processes
		
		
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