Hello perl-win32-gui,

please take note that in latest version (v0.0.490)
I've added the following options which are available
to all window types:

    -addstyle
     (synonim: -pushstyle)
    -remstyle
     (synonims: -popstyle/-notstyle/-negstyle)

along with their 'ex' counterparts for dwExStyle:

    -addexstyle
     (synonim: -pushexstyle)
    -remexstyle
     (synonims: -popexstyle/-notexstyle/-negexstyle)

that said, you should ALWAYS use them and NEVER MORE use
-style, which is *absolutely* deprecated (unless you are
prepared to accept the consequences ;-).

to clarify the question: several options are internally
converted to bits of styles; for example, adding the option

    -visible => 1

really means, to the underlying Win32 APIs, to turn on the
WS_VISIBLE bit in a DWORD that holds all the style
information. by using -style you are explicitly giving the
*whole* value for this DWORD, so you are mangling the
rest of the options you're giving, as well as estabilished
default styles for various window types. also note that
options are processed in order of appearance, so this
snippet:

    -visible => 1,
    -style => WS_BORDER | WS_DISABLED,

gives the (probably undesired) result of the window not
being visible, because the style (which has been added
the WS_VISIBLE flag) is then replaced by WS_BORDER |
WS_DISABLED, thus WS_VISIBLE is gone away. everything
is perfectly fine if you use instead:

    -visible => 1,
    -addstyle => WS_BORDER | WS_DISABLED,

which produces the (probably ;-) expected result.

I hope all this makes some sense: if it does not for you,
please forget all the ranting about WS_* and DWORDs and
simply NEVER, NEVER EVER use -style in your scripts.

cheers,
Aldo

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



Reply via email to