How to get the HWND
of a Tkinter window in python3 on windows?
- I would like to get the native window handle of the Tkinter window if possible.
- I would need either the
HWND
orHDC
of the window to perform custom drawing operations.
Is there a way to get the HWND
of the Canvas
or any other child components?
There is a way to list all the windows created by the current process. I am also able to iterate through the child windows of any window listed previously. This would be the ugly solution for the problem.
Please post any alternative solutions if Tkinter does not expose the handle directly.