Dear all,

my application is based on Tkinter, not wxPython, so please excuse when I'm
asking a question about good ole Tkinter here ...

I was annoyed by the fact that the Tkinter Toplevel windows on the PDA all
come sizeable and with that additional titlebar, eating up valuable screen
estate.

So I had the idea to do the following:
        import Tkinter
        import win32gui
        GWL_EXSTYLE = -20
        WS_EX_NODRAG = 0x40000000
        tk = Tkinter.Tk()
        hwnd = tk.winfo_id()
        wsex = win32gui.GetWindowLong(hwnd,GWL_EXSTYLE)
        win32gui.SetWindowLong(hwnd,GWL_EXSTYLE,wsex|WS_EX_NODRAG)

This "works" on the PC (though the WS_EX_NODRAG is not respected, of
course). wsex is returned as 4 (WS_EX_NOPARENTNOTIFY), which is in line with
the Tk CreateWindowEx call in tkWinWindow.c:TkpMakeWindow:
        hwnd = CreateWindowEx(WS_EX_NOPARENTNOTIFY, TK_WIN_CHILD_CLASS_NAME, 
NULL,
                style, Tk_X(winPtr), Tk_Y(winPtr), Tk_Width(winPtr),
                Tk_Height(winPtr), parentWin, NULL, Tk_GetHINSTANCE(), NULL);

However, the GetWindowLong and SetWindowLong calls always come back with 0
on the PDA!

Alternatively, I tried the same with hwnd = eval(tk.wm_frame()). Same story,
GetWindowLong and SetWindowLong return 0.

Any idea why this isn't working?

I'd love to call GetLastError on the PDA now, but this is in the pywin
win32api module, and this is not available on the PDA!

Any way win32api could be built for the PDA? I'd give it a try myself, but I
don't have a build environment handy.

Regards,
Sebastian

_______________________________________________
PythonCE mailing list
PythonCE@python.org
http://mail.python.org/mailman/listinfo/pythonce

Reply via email to