[perl-win32-gui] -style definitely deprecated

2000-11-14 Thread Aldo Calpini

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;






Re: [perl-win32-gui] -style definitely deprecated

2000-11-14 Thread Ludvig af Klinteberg

Aldo Calpini wrote:
 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.

Why doesn't -visible = 1/0 use -addstyle or -remstyle instead? That
would avoid a bug that could be hard to track for anyone who doesn't
know about this.

Or maybe I'm completely off track now?

-Ludde




Re: [perl-win32-gui] -style definitely deprecated

2000-11-14 Thread felice . vittoria

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?

Thanks,
Felice




Aldo Calpini [EMAIL PROTECTED] on 11/14/2000 08:47:27 AM

Please respond to [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:(bcc: Felice Vittoria/Aut/Schneider)
Subject:  [perl-win32-gui] -style definitely deprecated




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;












[perl-win32-gui] Menu selection marks

2000-11-14 Thread Jonathan Southwick

I have noticed that in some menus there is either a checkmark or a circle beside the 
desired selection.  Is there a way
in Win32:GUI to use the circle?  I know I can use the checkmark with the -checked = 1 
option.

Jonathan




[perl-win32-gui] two questions...

2000-11-14 Thread EvanK40767

ok, first of all, is it possible to change the object options (for instance, 
"-disable") after the object is already defined?  I mean, I've tried using 
hashes in all these different ways, but none of them work:

$Button{-disable} = 1;
$Button{'-disable'} = 1;
$Button-{-disable} = 1;
$Button-{'-disable'} = 1;

so, can I change those options, and if so, how?