# 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:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![RealCoder](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@RealCoder](https://forums.unrealengine.com/u/RealCoder)\
**Post date:** [July 24, 2015, 10:29am UTC](https://forums.unrealengine.com/t/two-windows-in-a-program/326375/1 "2015-07-24T10:29:38Z")

</div>

Hi!

I need to make a program with two windows: the first window (main) where the player could walk around the level and the second window, where I could change the position of the actors in runtime (some kind of room planning app)

Is it possible to realize in UE4?

with best regards,

RealCoder

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_807ed13e](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_807ed13e](https://forums.unrealengine.com/u/anonymous_user_807ed13e)\
**Post date:** [April 25, 2016, 8:10pm UTC](https://forums.unrealengine.com/t/two-windows-in-a-program/326375/2 "2016-04-25T20:10:05Z")

</div>

Curious about this as well…

---

<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.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_5d8c2ae0](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_5d8c2ae0](https://forums.unrealengine.com/u/anonymous_user_5d8c2ae0)\
**Post date:** [June 2, 2016, 1:45pm UTC](https://forums.unrealengine.com/t/two-windows-in-a-program/326375/4 "2016-06-02T13:45:15Z")

</div>

Hey ,

i am extremely interested in this too. Could you give me some short example code which extends the unreal engine and just adds a new window without any content but which is shown? That would be really nice of you.

Thanks in advance and best regards.

---

<div class="post-metadata">

**Author:** ![KnightArchitects](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@KnightArchitects](https://forums.unrealengine.com/u/KnightArchitects)\
**Post date:** [September 21, 2016, 8:24am UTC](https://forums.unrealengine.com/t/two-windows-in-a-program/326375/5 "2016-09-21T08:24:39Z")

</div>

I was looking into this as well and here is what I have ended up with:

```
SlateWin = SNew(SWindow)
	.AutoCenter(EAutoCenter::None)
	.Title(FText::FromString(TEXT("Control Window")))
	.IsInitiallyMaximized(false)
	.ScreenPosition(FVector2D(0, 0))
	.ClientSize(FVector2D(500, 800))
	.CreateTitleBar(true)
	.SizingRule(ESizingRule::UserSized)
	.SupportsMaximize(false)
	.SupportsMinimize(true)
	.HasCloseButton(true);

TSharedRef<SWindow> SlateWinRef = SlateWin.ToSharedRef();

FSlateApplication & SlateApp = FSlateApplication::Get();

SlateApp.AddWindow(SlateWinRef, true);

SlateWinRef->SetContent(SNew(SControlWidget));

```

This creates and displays a basic window that you can place slate stuff into. Thanks to for the pointers!

---

<div class="post-metadata">

**Author:** ![wangchao719](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@wangchao719](https://forums.unrealengine.com/u/wangchao719)\
**Post date:** [December 14, 2016, 8:25am UTC](https://forums.unrealengine.com/t/two-windows-in-a-program/326375/6 "2016-12-14T08:25:45Z")

</div>

How can I just want a left top small main window in full screen mode (other place are all black)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_1ef8ead5](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_1ef8ead5](https://forums.unrealengine.com/u/anonymous_user_1ef8ead5)\
**Post date:** [March 18, 2017, 6:08pm UTC](https://forums.unrealengine.com/t/two-windows-in-a-program/326375/7 "2017-03-18T18:08:07Z")

</div>

Thanks for this code snippit!

For other newbies like me: Just keep in mind the “SControlWidget” is your own content for your new widget. SControlWidget is no Class of Unreal. You have to define it yourself.

---

<div class="post-metadata">

**Author:** ![Geodesix](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Geodesix](https://forums.unrealengine.com/u/Geodesix)\
**Post date:** [October 28, 2017, 9:15pm UTC](https://forums.unrealengine.com/t/two-windows-in-a-program/326375/8 "2017-10-28T21:15:35Z")

</div>

I made some plugin, maybe it can help you [GitHub - Batname/SpectatorWindow](https://github.com/Batname/SpectatorWindow)

---

<div class="post-metadata">

**Author:** ![CrashAngel](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/crashangel/32/467279_2.png) [@CrashAngel](https://forums.unrealengine.com/u/CrashAngel)\
**Post date:** [March 16, 2018, 3:20am UTC](https://forums.unrealengine.com/t/two-windows-in-a-program/326375/9 "2018-03-16T03:20:06Z")

</div>

Hi, i trying Build this plugin in 4.19 and receive erros…

I would love to be able to use this plugin … can you take a look without a code, please?

---

<div class="post-metadata">

**Author:** ![flarion](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@flarion](https://forums.unrealengine.com/u/flarion)\
**Post date:** [March 16, 2018, 9:30am UTC](https://forums.unrealengine.com/t/two-windows-in-a-program/326375/10 "2018-03-16T09:30:55Z")

</div>

Hi!,

I recently upgraded the project to 4.18.3 (pull request is waiting). You can find it here:

> **[GitHub - fweidner/SpectatorWindow](https://github.com/fweidner/SpectatorWindow)**
>
> Contribute to fweidner/SpectatorWindow development by creating an account on GitHub.

Best,  
F

---

<div class="post-metadata">

**Author:** ![CrashAngel](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/crashangel/32/467279_2.png) [@CrashAngel](https://forums.unrealengine.com/u/CrashAngel)\
**Post date:** [March 16, 2018, 5:21pm UTC](https://forums.unrealengine.com/t/two-windows-in-a-program/326375/11 "2018-03-16T17:21:31Z")

</div>

Hi, i Receive this error in this line when Build

R\_MotionController-\>Hand = EControllerHand::Right; (No member named member in hand in UmotionControllerComponent)

---

<div class="post-metadata">

**Author:** ![CrashAngel](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/crashangel/32/467279_2.png) [@CrashAngel](https://forums.unrealengine.com/u/CrashAngel)\
**Post date:** [March 17, 2018, 1:08am UTC](https://forums.unrealengine.com/t/two-windows-in-a-program/326375/12 "2018-03-17T01:08:00Z")

</div>

Hi, i Build the project… More When I Package i receive this message: Could not find SuperStruct MV\_UserWidget to create BP\_MV\_UserWidget\_C

could you tell me where I can change?

This variable is Protected and i change to Public more no effect…

---

<div class="post-metadata">

**Author:** ![intrus03](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@intrus03](https://forums.unrealengine.com/u/intrus03)\
**Post date:** [March 29, 2018, 11:02pm UTC](https://forums.unrealengine.com/t/two-windows-in-a-program/326375/13 "2018-03-29T23:02:02Z")

</div>

Hi Denis

Is it possible with SpectatorWindow render from a render target instead of draw from frame buffer? If it is posible how can I do it?

Thank you in advance.

---

<div class="post-metadata">

**Author:** ![sgtDrew](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@sgtDrew](https://forums.unrealengine.com/u/sgtDrew)\
**Post date:** [February 14, 2019, 8:36am UTC](https://forums.unrealengine.com/t/two-windows-in-a-program/326375/14 "2019-02-14T08:36:37Z")

</div>

I need to create, fundamentally, a separate window in which there will be a widget with buttons (something like a control panel). I create the second separate window SWindow in which I place the widget. When you press a button on the widget, the game stops, when button it is released - game continues. If this widget is placed in the main window, this does not happen. Is it possible to overcome it? And what can it be connected with?

---

<div class="post-metadata">

**Author:** ![sgtDrew](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@sgtDrew](https://forums.unrealengine.com/u/sgtDrew)\
**Post date:** [February 14, 2019, 10:05am UTC](https://forums.unrealengine.com/t/two-windows-in-a-program/326375/15 "2019-02-14T10:05:47Z")

</div>

I excusal. The problem was only when you run through the “PLAY”. If run through the “LAUNCH” then neither does not freeze and does not stop

---

<div class="post-metadata">

**Author:** ![Geodesix](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Geodesix](https://forums.unrealengine.com/u/Geodesix)\
**Post date:** [February 14, 2019, 11:16am UTC](https://forums.unrealengine.com/t/two-windows-in-a-program/326375/16 "2019-02-14T11:16:04Z")

</div>

Hello, I’m working on a new solution for it for one of our customers, I’ll share some code later on. about 1 month. Contact me by dennis `at` geodesic.games or follow our website if I won’t put an update here in one month [http://www.geodesic.games/](http://www.geodesic.games/)

Thank

---

<div class="post-metadata">

**Author:** ![Geodesix](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Geodesix](https://forums.unrealengine.com/u/Geodesix)\
**Post date:** [March 2, 2019, 7:53pm UTC](https://forums.unrealengine.com/t/two-windows-in-a-program/326375/17 "2019-03-02T19:53:42Z")

</div>

Hello, We made a new tutorial about multiwindow rendering from the screen capture component

http://www.geodesic.games/2019/02/28/ue4-plugin-for-scene-capture-rendering-to-separate-window/

And here is GitHub [GitHub - Batname/UE4MultiWindow](https://github.com/Batname/UE4MultiWindow)

 ![269872-playcapture1.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/5/7/8572516396db46dc00f742992266226ba711c4a6.jpeg)

---

<div class="post-metadata">

**Author:** ![mrboni](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mrboni](https://forums.unrealengine.com/u/mrboni)\
**Post date:** [December 28, 2019, 11:41pm UTC](https://forums.unrealengine.com/t/two-windows-in-a-program/326375/18 "2019-12-28T23:41:32Z")

</div>

Thanks for sharing this! It runs in 4.24, however no post fx seems to be enabled, notably aa. any idea why?

Another two questions if you don’t mind -

- how do I set the view / camera used by the PlayScene window?
- can I have more than one? 🙂

---

<div class="post-metadata">

**Author:** ![vrandar123](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@vrandar123](https://forums.unrealengine.com/u/vrandar123)\
**Post date:** [March 23, 2022, 5:23pm UTC](https://forums.unrealengine.com/t/two-windows-in-a-program/326375/19 "2022-03-23T17:23:17Z")

</div>

can u share cpp and .h files or screen shot

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_5e9bbeab](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_5e9bbeab](https://forums.unrealengine.com/u/anonymous_user_5e9bbeab)\
**Post date:** [April 13, 2022, 2:07pm UTC](https://forums.unrealengine.com/t/two-windows-in-a-program/326375/20 "2022-04-13T14:07:59Z")

</div>

Hi all, I’m looking this second window result with a workflow in blueprints. That second window needs to automatically populate the second screen with a minimap that I have created.  
Hope someone can help,  
Cheers!
