On Friday, 22 April 2016 at 21:29:29 UTC, anonymousuer wrote:
On Friday, 22 April 2016 at 21:26:25 UTC, ciechowoj wrote:
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.

Could you specify what kind of window do you need?

As in a regular Windows window, for example when you open up IE or a program. The container of the program itself, non-command-line.

The short answer: the same way you do it in C or C++. You just need to use bindings to the C or C++ libraries out there. D can interface directly with the Win32 API and the bindings for it are in DRuntime (the core.sys.windows as Rikki suggested). If all you need is to develop on Windows, that's a safe option. If you need a complete, cross-platform GUI toolkit, there are D bindings for Gtk (GtkD) and SWT (DWT). If you don't need all the bells and whistles like tabs, menus, editor panes and the like, then you can use SDL or GLFW (see DerelictSDL2 and DerelictGLFW3 for bindings), which are oriented toward games and, in GLFW's case, OpenGL.

Reply via email to