Open wilon opened 6 years ago
Have you tried
win.SendMessage(hwnd, win.WM_CLOSE, 0, 0)
?
It might be prudent to use the non-blocking variant
win.PostMessage(yourHWND, win.WM_CLOSE, 0, 0)
The program you are trying to close might open a popup dialog (e.g. requesting to save the modified document it was showing) and that will block your program!