![]() |
|
how to center a window |
gogomon
Member #7,481
July 2006
|
I'm using openlayer under windows and cant figured out how to center the window in the middle of the screen when in windowed mode, can somebody point me in the right direction pls. |
ReyBrujo
Moderator
January 2001
![]() |
That is not possible with the current Allegro library. You will have to write your own Window Class to handle the position, or recompile the Allegro library. -- |
gogomon
Member #7,481
July 2006
|
is there anyway i can use the function to get a handle and call a function that will center the window and pass the HWND as reference?. I never programmed with windows so I dont really know. |
Richard Phipps
Member #1,632
November 2001
![]() |
Some code by Spellcaster:
You'll need to add #include <winalleg.h> after your #include <alleg.h> line |
Matthew Leverton
Supreme Loser
January 1999
![]() |
Doesn't the Allegro window start up centered or does OpenLayer somehow change that? changelog said:
Changes from 4.1.17 to 4.1.18 (January 2005)
|
gogomon
Member #7,481
July 2006
|
not sure, but thanks for the code richard exactly what i was looking for. Thx again |
Felipe Maia
Member #6,190
September 2005
![]() |
OpenLayer changes that somehow. |
Thomas Fjellstrom
Member #476
June 2000
![]() |
I'll bet its AllegroGL changing it, AGL replaces ALOT of allegro's code. It is a separate driver after all. -- |
|