Windows screen saver and toplevel -use option
- From: "Jeff Godfrey" <jeff_godfrey@xxxxxxxxx>
- Date: Fri, 14 Jul 2006 23:43:00 GMT
Hi All,
I'm trying to create a WinXP screen saver using a TclApp wrapped
executable. So far, I don't see any stumbling blocks except for
supporting the small "preview" mode of most screen savers.
In this mode, Windows calls the screen saver application with a "/p
####" command line switch, where the "####" is the decimal
representation of the HWND for the small preview window shown in the
screen saver dialog. The application is supposed to create a window
that's a child of that HWND and display itself (scaled down) in the
new window.
I can' seem to figure out how to get my newly created toplevel window
properly parented to the passed HWND argument. I've tried to create
the new window like this:
set parentID <passed_HWND>
set child [toplevel .child-use $parentID]
set childID [winfo id $child]
Using the above code, I don't get any errors, which I do if I pass an
invalid HWND, so Tk seems to understand what I'm trying to do, but I
don't seem to get the results I expect. In fact, using twapi, if I
do:
puts [twapi::window_is_child $parentID $childID]
it returns "0", indicating that my new window is indeed *not* a child
of the passed parent. I thought I could maybe reparent my new window
using twapi's "Win32 Raw API" support via the windows "SetParent"
function, but it doesn't seem to be in the available Win API commands
supported by twapi. I *think* it'd be possible to access "SetParent"
and friends via ffidl, though I've never used ffidl.
So, am I missing something simple, or do I need to get a bigger hammer
(some other twapi functions, or ffidl)? If that's the case, any tips
on getting my window properly parented would be appreciated.
Thanks,
Jeff
.
- Follow-Ups:
- Re: Windows screen saver and toplevel -use option
- From: Jeff Godfrey
- Re: Windows screen saver and toplevel -use option
- Prev by Date: Re: Nasty problem with background fcopy from socket to stdout
- Next by Date: Re: Another parser question
- Previous by thread: Nasty problem with background fcopy from socket to stdout
- Next by thread: Re: Windows screen saver and toplevel -use option
- Index(es):
Relevant Pages
|