What is winfo_id() under Win32

Attila Filetóth tothfile at freemail.hu
Fri Jan 28 05:09:13 EST 2000


Hi!

> >         hwnd = self.winfo_id()
> > #       hwnd = win32ui.GetParent(hwnd)  # Attribute error: GetParent
> >         win32gui.ShowWindow(hwnd, SW_SHOWMAXIMIZED)  # It would only
> > work after the GetParent() call
> 
> win32gui _should_ include these functions.  If I remember, I will add
> them.

Only 'GetParent' is the one that cannot be imported in the example.
'ShowWindow' can be called, just doesn't take the expected effect
(because of the wrong hwnd).

> In the meantime, the following _should_ work:
> 
> wnd = win32ui.CreateWindowFromHande()
> parent = wnd.GetParent()

Unfortunately I also get an Attribute error for 'CreateWindowFromHande'.

Actually when I search through win32* files for the string 'GetParent',
it matches in the file Pythonwin\win32ui.pyd (and win32com\win32com.hlp)
while 'CreateWindowFromHande' cannot be found at all and neither of them
can be imported.

(I've fetched the latest win32all.exe but it was the same I've already
installed)

BR,
    Attila



More information about the Python-list mailing list