i want to cascade window in pywin32 module.
i use:
win32gui.CascadeWindow()
but rased an error:
AttributeError: module 'win32gui' has no attribute 'CascadeWindow'. how can i fix this?
AttributeError: module 'win32gui' has no attribute 'CascadeWindow'. Did you mean: 'CreateWindow'?
[MS.Learn]: CascadeWindows function (winuser.h) is not wrapped (exported) by the Win32GUI (or any other) module (part of [GitHub]: mhammond/pywin32 - Python for Windows (pywin32) Extensions)).
An alternative would be to call the function "directly", via [Python.Docs]: ctypes - A foreign function library for Python.
Check [SO]: C function called from Python via ctypes returns incorrect value (@CristiFati's answer) before going further.
code00.py:
Output:
As a side note, I managed to mess up my windows on the desktop (luckily, I didn't have as many of them as I usually do, open :) ).
Update #0
I submitted [GitHub]: mhammond/pywin32 - Add CascadeWindows wrapper (merged to main on 230104).
Check [SO]: How to change username of job in print queue using python & win32print (@CristiFati's answer) (at the end) for possible ways to go further.