[python-win32] Re: Is pure-win32 GetWindowPlacement() available ?
rwupole at msn.com
Thu Jun 15 04:51:32 CEST 2006
Pierre Rouleau wrote:
> Hi all,
> I have been looking for a wrapper for the Win32 function
> GetWindowPlacement() but could not find it in the latest version of
> Python for Windows extension (version 208). I saw a reference to
> PyCWnd.GetWindowPlacement() where a MFC CWnd is needed but could not
> find a pure Win32 version.
> Does anyone know if this is/will be wrapped?
> What I want to do is to be able to detect the state of a window (is it
> maximized, minimized, etc...) and I would use GetWindowPlacement() in
> Win32 code. Aside from doing my own wrapper, does anyone know if there
> is another wrapper function to perform the same action?
> Thanks in advance!
> Pierre Rouleau
You can use win32ui.CreateWindowFromHandle to wrap a raw
window handle in a PyCWnd, and then use its GetWindowPlacement
It would be relatively simple to wrap this function in
win32gui also, mostly cut-n-paste from win32ui.
More information about the Python-win32