Hi,
I need to change the size and position of my game window. It must work with 1 monitor or 3 monitors (extended under MS Windows).
For my test i have a PC with 2 monitors of 1920x1080. The MS Windows desktop is extended.
I have tried to use UGameUserSettings. When i tried different game window size and game window positions, sometimes it works, sometimes it doesn’t work (bad position, bad window size).
And i can never have a game window width bigger then 1920.
UGameUserSettings* settings = GEngine->GameUserSettings;
settings->SetScreenResolution(resolution);
settings->SetWindowPosition(position.X, position.Y);
settings->SetFullscreenMode(EWindowMode::Type::Windowed);
settings->SetResolutionScaleValueEx(100);
settings->ConfirmVideoMode();
settings->ApplyResolutionSettings(true);
I have also tried to launche this command during the game:
r.setres 2520x1080w
It changes the size of the window with succes. The width and height is good but it ignores previous window Position (x and y are set to zero)
In C++, this function do the same job and same result:
FSystemResolution::RequestResolutionChange(widthX, heightY, EWindowMode::Windowed);
How can i change the position and the size of my game window on a PC having one or more monitors ?