Opening a window

I feel retarded asking this question, but I am having trouble opening a window from my code. I tried everything that looked remotely capable of spawning a window, to no avail.

I believe that the correct function would be as follows:


But it doesn’t work.

I use:


To close a window with success.

Thanks in advance,


And there is your Problem as PtDestroyWidget literally destroys the widget. You would have to recrate it using PtCreateWidget before you can realize it.

Or simply use PtUnrealizeWidget instead of PtDestroyWidget.