C++ for a blueprint user - Calling (fDisplayMetrics) to Specify execute on non-primary monitor

Uncharted Territory for me, I have an actual C++ script I need to run before or when the game runs that detects how many monitors the system has and then start it on the second monitor. I have the code available from;

But, I have only worked in blueprints up until now. I have Visual studio up with a blank face wondering what to do now.

Big questions that I don’t know,
a. Where to I put the script?
b. How do I make sure the game call the script?
c. I assume It (the .cpp file) doesn’t have to be named anything specific, right?
d. Can this be done in Blueprint?
e. What’s the easiest way to buy you a coffee/beer?

I’m eternally grateful for anyone taking the time to get me pointed in the right direction.

Edit01: I found the FDisplayMetrics from;

https://docs.unrealengine.com/latest/INT/API/Runtime/Core/GenericPlatform/FDisplayMetrics/index.html

Though I have been trying, I’m having no luck calling to it. I was thinking that I could cast to it and then break open the information like monitor info to just be able to dig deeper - nadda. I see that it say’s Struct so I tried to find and assign the struct to break that apart - nadda. It might be painfully obvious that I’m completely lost, because I am. I’ve been digging in the doc’s, fingers crossed.

I’m wondering about this too. It would be nice if Epic could include a console command to set the monitor used.

Did you ever find a solution ? It’s crazy that something this basic is not available in blueprints.

I had to ask a dedicated programmer to write some code and inject it into the engine to expose to blueprint functionality that is already available to C++ writers. I believe it was a pretty simple fix for someone who is already familiar with working with C++ within UE4. I’ve been away from that project for a couple years now so I don’t remember much more than that.

You need to call this function to get info

Create FDisplayMetrics struct then put it as argument of that function and it will be filled with information.

You don’t need to “inject” any code to engine to expose functionality to blueprint as long as APIs are exposed to other modules. Just make blueprint function that calls that C++ function.