Minimize Window in C++ With a Custom BP Node?

I couldn’t find a way to Minimize the Window with Blueprint, so i tried in C++ but i can’t get it to work
I have the custom BP node and it works it’s showing in game and i tried to print some text with it, I’m not really familiar with C++ pretty basic Knowledge
How can i implement FGenericWindow::Minimize to work and minimize my game?
I’m using borderless thats why i need it.

The function trying to do is not static, on what do you calliing Minimize on? Can you paste code?

I’m using this to create a custom BP , but i’m not sure on how to call minimize and i realized that Minimize is virtual not static but i don’t understand C++ Too much i’m more familiar with different Languages.

UCLASS()
class CONSTRAINTS_API UclientMinimizeBlueprint : public UBlueprintFunctionLibrary
{
	GENERATED_BODY()

		/** Activate Fancy New Project-Specific System Created in C++! */
		UFUNCTION(BlueprintCallable, Category = "Client")
		static void HideClient();
	
	
};

Any clue on how i can call FGenericWindow::Minimize with this?

First you need to get viewport, you can do so from GEngine:

https://docs.unrealengine.com/latest/INT/API/Runtime/Engine/Engine/UEngine/GameViewportForWorld/index.html

From here you can get slate window

You can already minimize from SWindow, but you can go farther and access FGenericWindow, a native system window from this function

https://docs.unrealengine.com/latest/INT/API/Runtime/SlateCore/Widgets/SWindow/GetNativeWindow/2/index.html

Note that in PIE you will minimize the editor it self, remember that editor also run on engine and running in PIE you actually operating editor it self

Thanks for the informations, i tought that GEngine was the way but didn’t get it working in first place, i’ll give another shot tomorrow with the infos you have provide thanks a lot sir.

I can’t get it to work, even tried to ask some friends who know more of C++ than me and either them couldn’t help me using the UE Api
I’m asking too much if you could build the code for me? so maybe i understand how to properly use the API and what i’m doing wrong. I’m Kinda confused honestly i keep getting errors anyway
I’m not sure how to properly use TSharedPtr either

I’m googling like mad but can’t find any usefull informations or anything similiar to understand my mistakes

TSharedPtr acts like normal pointer (as it overloads → and * operators) only difference is that you can’t set it freely, it also have function which let you check if pointer is still valid. What issue you have now? You can try to contact me at Unreal Slackers Discord server so we can talk faster and possibly screenshere. I never minimized window myself i only assuming here how it works and might missing something.

Never mind i keep getting weird errors that have nothing to do with the code itself this time
in the end i realized that i can’t even change the borderless mode to normal window from the code itself so i just enabled the borders back.
Also i will not be home for some weeks so i just go forward on my project for now.

You need add new module “SlateCore” to “YourProject.Build.cs”:
It’s somethink like this:

PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "SlateCore" });

After, you need make code
GEngine->GameViewportForWorld(GetWorld())->GetWindow()->Minimize();
And that should work)