# Creating slate window outside of Engine tick

**URL:** <https://forums.unrealengine.com/t/creating-slate-window-outside-of-engine-tick/2144593>\
**Category:** C++\
**Tags:** unreal-engine, question\
**Created:** [November 22, 2024, 9:55pm UTC](https://forums.unrealengine.com/t/creating-slate-window-outside-of-engine-tick/2144593 "2024-11-22T21:55:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![David\_Morasz](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/david_morasz/32/247970_2.png) [@David\_Morasz](https://forums.unrealengine.com/u/David_Morasz)\
**Post date:** [November 22, 2024, 9:55pm UTC](https://forums.unrealengine.com/t/creating-slate-window-outside-of-engine-tick/2144593/1 "2024-11-22T21:55:59Z")

</div>

I’m writing a low level error type for better and more civilized error handling from C++, is there a way in Slate to create a window with its own message pump so I can display potentially fatal errors to the user while blocking the engine tick? I’m on this endeavour to give a more unified better UX for error handling in my plugins.

`FPlatformMisc::MessageBoxExt` is too limitting for me (it doesn’t even allow to set my own buttons with their own text on the bottom of the message).

I’m asking this first before I resort to build my own UI with an external library, which wouldn’t be very kosher in an Unreal Engine code base

---

<div class="post-metadata">

**Author:** ![David\_Morasz](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/david_morasz/32/247970_2.png) [@David\_Morasz](https://forums.unrealengine.com/u/David_Morasz)\
**Post date:** [November 22, 2024, 10:06pm UTC](https://forums.unrealengine.com/t/creating-slate-window-outside-of-engine-tick/2144593/2 "2024-11-22T22:06:21Z")

</div>

On `FSlateApplication` I found the following function promising

```auto
	/**
	 * Adds a modal window to the application.  
	 * In most cases, this function does not return until the modal window is closed (the only exception is a modal window for slow tasks)  
	 *
	 * @param InSlateWindow A SlateWindow to which to add a native window.
	 * @param InParentWindow	The parent of the modal window. All modal windows must have a parent.
	 * @param bSlowTaskWindow	true if the window is for a slow task and this function should return before the window is closed
	 */
	SLATE_API void AddModalWindow( TSharedRef<SWindow> InSlateWindow, const TSharedPtr<const SWidget> InParentWidget, bool bSlowTaskWindow = false );

```

which according to its source does exactly what I meant to do (it has an internal while loop as well), I haven’t tested yet.
