[EMAIL PROTECTED] wrote:
> Aldo,
>
> Quick comment.   I have a window that I defined with
> -style  => WS_OVERLAPPED.
> This produced a window with a titlebar with no
> minimzie/maximize/close buttons on it.   Now that I use
> -addstyle  => WS_OVERLAPPED I will get a window with
> minimize/maximize/close buttons.      Is this a bug?

no, no and no.
the *real* *deal* here is that, ideally, you should never
have to mess with style constants, but rather stick with the
provided options.

I say 'ideally' because implementing ALL of them is a fairly
huge task, and in fact there are a number of things that
can be achieved only by mangling the style.

still, the word of wisdom is (pardon the caps):

    IF YOU ARE WORKING WITH STYLE CONSTANTS, YOU ARE EXPECTED
    TO HAVE A GOOD UNDERSTANDING OF WHAT'S HAPPENING BEHIND
    THE SCENES (eg. have a copy of the MSDN library handy),
    OTHERWISE PLEASE DON'T MESS AT ALL!!!

in your case what's happening is: a Window is by default
created with the WS_OVERLAPPEDWINDOW style, which is a
combination of the following styles:
    WS_OVERLAPPED
    WS_SYSMENU
    WS_THICKFRAME
    WS_MINIMIZEBOX
    WS_MAXIMIZEBOX

by using -style, you are negating everything except
WS_OVERLAPPED, which is what you want to have. by using
-addstyle instead you are adding WS_OVERLAPPED to
WS_OVERLAPPEDWINDOW, which already contains it, so in
practice you're changing nothing.

I didn't say that you should blindly s/-style/-addstyle/,
but that most of the times -addstyle is more convenient
for you; and that in any case where you're using styles,
you're swimming in undocumented, unimplemented, unreliable
water.

I can't stress this enough: all the -style stuff is
provided as a low level access for who has the guts
to play with the internals of the Windows APIs, it's not
intended to be a commonly useable feature.

BTW, in v0.0.490 I've added the following options to the
Window and DialogBox classes:

    -topmost => 1/0
    -minimizebox => 1/0
    -maximizebox => 1/0
    -sizable => 1/0
    -menubox => 1/0

it's highly recommended to use these, instead of anything
that has to do with style.
    

cheers,
Aldo

__END__
$_=q,just perl,,s, , another ,,s,$, hacker,,print;



Reply via email to