Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

So when I start my game it starts out in the middle of my screen at 1024x768 resolution, but then when I change the resolution via consolecommand("SETRES ..."); it resets the window position to the top left of my desktop.

Is there a way for me to set the windows position after I make this change?

share|improve this question

1 Answer 1

As far as I am aware, there isn't; I think SETRES is intended to be used in conjunction with the game running in (or toggling almost immediately to) full-screen.

However, it's possible that you could write a C++ extension DLL to provide yourself a scripting command to move the window (you'd want to use Win32 method to locate the window and call SetWindowPos probably).

It's also possible that you can achieve what you want by setting the appropriate values in the viewport frame of the game client object, if you have access to it.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.