With SuperStrict you have to declare what kind of variable all your variables are. They default to integer.
CreateWindow returns a TGadget, but MainWindow is an integer.
That should fix your problem(s).
MainWindow = CreateWindow("Test",200,200,800,600,0,style)
CreateWindow returns a TGadget, but MainWindow is an integer.
MainWindow:TGadget = CreateWindow("Test",200,200,800,600,0,style)
That should fix your problem(s).