# Two windows in a program

**URL:** <https://forums.unrealengine.com/t/two-windows-in-a-program/326375>\
**Category:** Platform & Builds\
**Tags:** window, unreal-engine, question, CPP\
**Created:** [July 24, 2015, 10:29am UTC](https://forums.unrealengine.com/t/two-windows-in-a-program/326375 "2015-07-24T10:29:38Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Shadowriver](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Shadowriver](https://forums.unrealengine.com/u/Shadowriver)\
**Post date:** [April 26, 2016, 12:15am UTC](https://forums.unrealengine.com/t/two-windows-in-a-program/326375/3 "2016-04-26T00:15:55Z")

</div>

It is possible as editor does that, it seems it quite easy to be done with Slate, you create window first which you need to do with this function:

> **[FSlateRenderer::CreateViewport](https://docs.unrealengine.com/5.1/en-US/API/Runtime/SlateCore/Rendering/FSlateRenderer/CreateViewport/)**
>
> Creates a rendering viewport

You can get rederer via this:  
FSlateApplication::Get().GetRenderer()

Window is also widget SWindow:

> **[SWindow](https://docs.unrealengine.com/5.1/en-US/API/Runtime/SlateCore/Widgets/SWindow/)**
>
> \[SWindow\](API\\Runtime\\SlateCore\\Widgets\\SWindow) is a platform-agnostic representation of a top-level window.

Inside windows you place SViewport:

> **[SViewport](https://docs.unrealengine.com/5.1/en-US/API/Runtime/Slate/Widgets/SViewport/)**

If you have 0 idea about Slate, it is engine UI system initially made for editor, but it also can power gameplay UI (for example UMG is blueprint front end of Slate), here link for good starting resource:

> **[Slate UI Programming](https://docs.unrealengine.com/5.1/en-US/slate-user-interface-programming-framework-for-unreal-engine/)**
>
> Program user interfaces with Unreal Engine's Slate framework.

> **[A new, community-hosted Unreal Engine Wiki](https://forums.unrealengine.com/t/a-new-community-hosted-unreal-engine-wiki/141494)**
>
> After over a year in maintenance mode, the official Unreal Engine Wiki is now permanently offline. These resources now live on a new community-run Unreal Engine Community Wiki — https://unrealcommunity.wiki/! You will be able to find content from...

This can be helpful to as it shows some slate stuff:

In the first function i give you as SWindow aregument you use SNew(SWindow) or better SAssignNew(MyWindowVarable,SWindow), as for argument functions you look up FArgument sub class in API refrence usally in bottom, but i give oyu links for SViewport and SWindow

> **[FArguments](https://docs.unrealengine.com/5.1/en-US/API/Runtime/SlateCore/Widgets/SWindow/FArguments/)**

> **[FArguments](https://docs.unrealengine.com/5.1/en-US/API/Runtime/Slate/Widgets/SViewport/FArguments/)**

Slate is weakly documented so ultimate example resource for is engine source code it self aspecially editor code, but no worries Slate works outside editor (it needs to power UMG anyway) so as long as you dont call any editor code you are ok.

---

_[View the full topic](https://forums.unrealengine.com/t/two-windows-in-a-program/326375)._
