Re: [AD] default windowed position on windows

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


>> Now that you mention, I think not, but a workaround would be possible
>> It could create it with CW_USEDEFAULT, store the coords, move it
>> to -100, -100 and then once visible move it back to the stored position

>A bit hackish, isn't it ? I don't want to do that for the 4.0.3, 
>so we'll go with centering instead.
>

I don't know how CW_USEDEFAULT works under Win32, but in VB, it did a
'cascading' effect. However, in VB it would know the width and height of
the window, and position the x,y accordingly. With how Allegro is set up,
we don't know the width and height at create time, so I'm not sure the
USEDEFAULT would work out. (Perhaps if the programmer desires a large
window, it may be off screen on the bottom/right.) So I agree that
centering would be a better choice.

Anyway the other thing I've been forgetting to bring up is that the
-100,-100 positioning isn't failsafe either. I work with two monitors, and
sometimes have it set up so the second one is positioned to the upper left
of the primary display. Thus, when -100,-100 is used, I can see the window
on my second screen. This should be simple to fix (ie, detect a virtual
screen and adjust accordingly), and I can supply a patch on that.

--
Matthew Leverton - matthew@xxxxxxxxxx
http://www.allegro.cc


--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.com/ .






Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/