CreateWindowFromHandle causes app crash in embedded Win32 app
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
Python is embedded in our main app.
I use 'Very High Level Embedding' and just call PyRun_SimpleString. The string is created on the fly with the current window handle embedded.
The called script looks something like that:
shellHandle = 0x0...0 #Handle is filled on the fly
import win32api
wnd = win32ui.CreateWindowFromHandle(shellHandle)
wnd.SetWindowText("new window text")
The text of the window has changed but when the script has finished the app crashes.
What happens at the end of the script?
Is Destroy called on wnd? (which should not)
System: Window 8.1 64bit
Python: 3.4.1
Pythonwin: build 219