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;












Re: [perl-win32-gui] Disabling RichEdit control

2000-11-10 Thread felice . vittoria

Hey guys,

I found a "fix" to my problem.Here it is:

$EM_SETBKGNDCOLOR = 1091;

# enable RichEdit control and set background color to white
$M-rchText-SendMessage( $EM_SETBKGNDCOLOR, 0, 0xFF );
$M-rchText-InvalidateRect(1);
$M-rchText-Enable();

# disable RichEdit control and set background color to gray
$M-rchText-SendMessage( $EM_SETBKGNDCOLOR, 0, 0xC0C0C0 );
$M-rchText-InvalidateRect(1);
$M-rchText-Disable();

Felice





Re: [perl-win32-gui] Disabling RichEdit control

2000-11-09 Thread felice . vittoria

Hey guys,

Here's my script that's having trouble.   Actually, I created a script to show
you the differences.  You will notice that when  I disable the textfield,
the background color turns grey.However, when I disable the RichEdit no
background color changes.  BTW ... the control does get disabled ... my bad.

However, I still ask why when disabling the textfield the background color
changes and when disabling the RichEdit the background color does not change.

Felice

(See attached file: exgui.pl)




Aldo Calpini [EMAIL PROTECTED] on 11/08/2000 12:00:21 PM

Please respond to [EMAIL PROTECTED]

To:   "[EMAIL PROTECTED]" [EMAIL PROTECTED]
cc:(bcc: Felice Vittoria/Aut/Schneider)
Subject:  Re: [perl-win32-gui] Disabling RichEdit control




[EMAIL PROTECTED] wrote:
 Hello all,

 I have a RichEdit control designed on my form. When I try
 to do something like $M-txtText-Disable(), this will not
 disable the RichEdit control.
 Please note ... $M =DialogBox, txtText = RichEdit ControlName.
 However, if I convert txtText from RichEdit control to
 Textfield control, the Disable method works properly.

 Any ideas on why it's not working for RichEdit?

seems to work for me. no idea, sorry...
perhaps you can post something more from your code.

cheers,
Aldo

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








 exgui.pl


Re: [perl-win32-gui] Disabling RichEdit control

2000-11-09 Thread felice . vittoria

Aldo ( and everyone ) ,

I'm running Windows NT 4.0 SP5
ActiveState Perl 5.6 build 620
Win32-GUI version 0.0.490

And here are my RichEdit DLL versions ( found in c:\winnt\system ):

11/10/99  03:01a   431,376 riched20.dll
05/07/98  06:36p   174,352 riched32.dll

Felice




Aldo Calpini [EMAIL PROTECTED] on 11/09/2000 07:15:18 AM

Please respond to [EMAIL PROTECTED]

To:   "[EMAIL PROTECTED]" [EMAIL PROTECTED]
cc:(bcc: Felice Vittoria/Aut/Schneider)
Subject:  Re: [perl-win32-gui] Disabling RichEdit control




[EMAIL PROTECTED] wrote:
 However, I still ask why when disabling the textfield the
 background color changes and when disabling the RichEdit the
 background color does not change.

it does for me, I see them both grey when disabled. I think
it's just that your system (in particular, your version of
RICHED32.DLL) decided this way... who knows ;-)

BTW, I'm on a Win2k Advanced Server. on which system are
you running?

cheers,
Aldo

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












Re: [perl-win32-gui] Need Help from Winamp Users

2000-11-09 Thread felice . vittoria

David,

You can goto http://msdn.microsoft.comand then enter WM_COMMAND or WM_USER to
find out more information.That's what I do.

Felice




David Hiltz [EMAIL PROTECTED] on 11/09/2000 01:57:52 PM

Please respond to [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:(bcc: Felice Vittoria/Aut/Schneider)
Subject:  Re: [perl-win32-gui] Need Help from Winamp Users




 There's more features available using SendMessage() than using
 keyboard commands.

  ..such as?

  Is there any documentation on SendMessage and what these numbers mean?

  Win32::GUI::SendMessage( $winampHandle, WM_COMMAND, 40045, 0 );

  Win32::GUI::SendMessage( $winampHandle, WM_USER, 122, 0 );


 On Thu, 9 Nov 2000, David Hiltz wrote:

 
Why not try the Win32::Setupsup module which also lets you send keystrokes
to a window?
 
   Todd!!  I tried the same things!  I got fairly close to making a usable
   interface, but when I asked the winamp folks for help (7 times) I never
got a
   response.  I have code I can send if you would like it, it's fairly
complete,
   except for the volume control (which was what I was writing to winamp
about)  if
   you would like to see it.
  
   The answer to your question is that I had to go to MS's website and get
the
   value of the WM_USER constant, which I then set since it wasn't being
exported
   by Win32::GUI.
  
   HTH,
  
   Chuck
  
   Todd McLaughlin [EMAIL PROTECTED] on 11/08/2000 07:37:25 PM
  
   Please respond to [EMAIL PROTECTED]
  
To:  [EMAIL PROTECTED]
  
cc:  (bcc: Chuck Hirstius/Corp/Walgreens)
  
  
  
Subject: [perl-win32-gui] Need Help from Winamp Users
  
   Winamp published a list of codes to control the program using
   SendMessage().  The web page is listed in my code below.
  
   I can get the set of WM_COMMAND codes to work (stop and play), but not the
   WM_USERS codes (mute and status.  I have no way of knowing if the problem
   is caused by my code, Win32::GUI, or Winamp.  I'd appreciate it if any
   Winamp users could take a quick look at this.
  
   Thanks!
   Todd
  
  
   use Win32::GUI;
  
   #Win32::GUI home: http://dada.perl.it/
   #Win32::GUI docs: http://dada.perl.it/gui_docs/Win32_GUI.html#Version
   #Winamp docs: http://www.winamp.com/nsdn/winamp2x/dev/sdk/api.jhtml
  
   $winampHandle = Win32::GUI::FindWindow("Winamp v1.x", "");
   print "Handle: $winampHandle\n";
  
   ## STATUS ##
   #print Win32::GUI::PostMessage( $winampHandle, WM_USER, 101, 0 );
   #print Win32::GUI::PostMessage( $winampHandle, WM_USER, 0, 101 );
  
   ## MUTE ##
   #Win32::GUI::SendMessage( $winampHandle, WM_USER, 122, 0 );
   #Win32::GUI::SendMessage( $winampHandle, WM_USER, 0, 122 );
  
   ## PLAY ##
   #Win32::GUI::SendMessage( $winampHandle, WM_COMMAND, 40045, 0 );
  
   ## STOP ##
   #Win32::GUI::SendMessage( $winampHandle, WM_COMMAND, 40047, 0 );
  
  
  
  
  
  
 
 












Re: [perl-win32-gui] 0.0.490

2000-10-23 Thread felice . vittoria

Aldo,

After unzipping your latest 0.0.490 version I ran "nmake" and received the
following error (see attached).

Any ideas?

Thanks,
Felice

(See attached file: build.err)

 build.err