PyCWnd.SetActiveWindow() sometimes fails with "The window was created in a different thread and can not be mapped.", though the function did its job.
Thats obviously (just) because it tries to convert the return value (previous window / CWnd* may be temporary according MSDN) with
"return PyCWnd::make( UITypeFromCObject(pRel), pRel)->GetGoodRet();" which uses FromHandlePermanent and some thread check or so.
Perhaps it needs a less rigid converter or return Non instead of failure.
PyCWnd.SetActiveWindow() sometimes fails with "The window was created in a different thread and can not be mapped.", though the function did its job.
Thats obviously (just) because it tries to convert the return value (previous window / CWnd* may be temporary according MSDN) with "return PyCWnd::make( UITypeFromCObject(pRel), pRel)->GetGoodRet();" which uses FromHandlePermanent and some thread check or so. Perhaps it needs a less rigid converter or return Non instead of failure.
Reported by: kxroberto
Original Ticket: pywin32/bugs/578