How do you use D to launch/open a window?

thedeemon via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Apr 23 08:15:37 PDT 2016


On Friday, 22 April 2016 at 21:13:31 UTC, anonymousuer wrote:
> What code is needed to tell D to open a window? Thank you in 
> advance.

import dlangui;
mixin APP_ENTRY_POINT;

extern (C) int UIAppMain(string[] args) {
     Window window = Platform.instance.createWindow("Window 
caption", null);
     window.mainWidget = parseML(q{
         TextWidget {text: "hi!"}
     });

     window.show();
     return Platform.instance.enterMessageLoop();
}



More information about the Digitalmars-d-learn mailing list