Hello. I’m programming on window XP service pack 2.
I need to create a window(using SDL), in (x,y) coordinates(not at random).
I have read the SDL API documentation but I can’t find any functions.
There is a solution?
Please not answer me there is a solution in X11…etc.
according to others there isa a putenv( VARIABLE ); that will do it;
but there are problems as SDL inherits the enviorment as-was when the
program is loaded. to make it work you nedd a program that will put
the variable there first or to run a batch fiel which will set the
variable and run the .exe
sorry, but i forget the name of the variable.
try the wiki.
BTW, i get the feeling the downloadable documentation is not up to
date. is this true, and if so can the updated docs be downloaded
easily?
Yes, there is a problem. I have looked into this extensively. There
is no way to position the window in a Windows™ environment once
your program has started to run. The only way to do it is to set the
environment variables before your program starts to run.
In order to do window positioning, I had to modify and recompile the source.
I hope in the next version of SDL they have the facility to set a
window position on at least create, and a function to read the window
position so it can be saved when the program quits. It is very rude
behavior in a windowed app to not remember the position the user moved
the window to.
I am guessing that most people using SDL do full-screen, and this is
why this is low priority.
Unfortunately, the lack of this one feature will probably require that
I abandon SDL for my project.
TankkoOn 5/10/05, Brian Barrett <brian.ripoff at gmail.com> wrote:
according to others there isa a putenv( VARIABLE ); that will do it;
but there are problems as SDL inherits the enviorment as-was when the
program is loaded. to make it work you nedd a program that will put
the variable there first or to run a batch fiel which will set the
variable and run the .exe
sorry, but i forget the name of the variable.
try the wiki.
BTW, i get the feeling the downloadable documentation is not up to
date. is this true, and if so can the updated docs be downloaded
easily?
I’ve been looking at this, cannot you not use SDL_GetWMInfo to retrieve the
window manager info (which includes the handle) and then use the standard
GetWindowPos and SetWindowPos to positon the screen. I tested this on my
Windows XP machine and it works…
Dean> ----- Original Message -----
From: tankko@gmail.com (Tankko Omaskio)
To:
Sent: Wednesday, May 18, 2005 5:01 PM
Subject: Re: [SDL] Set the window position
Yes, there is a problem. I have looked into this extensively. There
is no way to position the window in a Windows™ environment once
your program has started to run. The only way to do it is to set the
environment variables before your program starts to run.
In order to do window positioning, I had to modify and recompile the source.
I hope in the next version of SDL they have the facility to set a
window position on at least create, and a function to read the window
position so it can be saved when the program quits. It is very rude
behavior in a windowed app to not remember the position the user moved
the window to.
I am guessing that most people using SDL do full-screen, and this is
why this is low priority.
Unfortunately, the lack of this one feature will probably require that
I abandon SDL for my project.
Tankko
On 5/10/05, Brian Barrett <brian.ripoff at gmail.com> wrote:
according to others there isa a putenv( VARIABLE ); that will do it;
but there are problems as SDL inherits the enviorment as-was when the
program is loaded. to make it work you nedd a program that will put
the variable there first or to run a batch fiel which will set the
variable and run the .exe
sorry, but i forget the name of the variable.
try the wiki.
BTW, i get the feeling the downloadable documentation is not up to
date. is this true, and if so can the updated docs be downloaded
easily?