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

2000-11-09 Thread Chuck . Hirstius



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] Need Help from Winamp Users

2000-11-09 Thread Chuck . Hirstius



Todd,

The problem was finding a way to determine the volume of winamp at startup so I
could position my volume slider accordingly.  There was no message to retrieve
it, and I thought just forcing it to a certain volume was a cheesy fix - nothing
like setting it low, then restarting and it's blaring again...

I was never offered a solution, so I let the project slip.

Chuck





What was the problem with the volume control?

Todd


On Thu, 9 Nov 2000 [EMAIL PROTECTED] wrote:



 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








[perl-win32-gui] Changing text color 'inline'

2000-03-16 Thread Chuck . Hirstius



Does anyone know of a way to change the color of formatting fo text 'inline'?

Such as:

my $text = "This is my new text";

$mw-SomeLabel-Change( -text = $text );

can you somehow do anything like:

my $text = "This is my bnew text/b";  # ok, ok, I KNOW that's HTML!

$mw-SomeLabel-Change( -text = $text );

Of course that won't work, but is there a similar way? or a way to combine 2
fonts on a  line to achive this?

I want to color CERTAIN text red if there is a configuration error, I've
included a screen shot so you can get an idea of what I'm trying to do.
Currently every label you see there is one big long text string, I didn't want
to make a seperate labels for EVERYTHING there, if there is a better way to lay
something like this out PLEASE tell me how, but for now this works.  If an error
is detected, I want to color that item red, so if the subnet mask was found to
be incorrect that whole line would be red, but it's part of one big text string.
Any ideas?  Thanks,

Chuck






[perl-win32-gui] Still looking for a replacement for Frames

2000-03-14 Thread Chuck . Hirstius



Under Tk, I had a program that displayed 'pages' based on user selections.  Very
much like a tabstrip, but I DON'T want a tabstrip, what I want to do is
replicate the ability of Tk to make a frame, pack it with widgets, and then
display, or hide the frame (displaying and hiding the widgets for each as well,
without me having to care WHAT was in each frame) depending on what the user
selects.  i know there is a groupbox style, but as far as I can tell there is no
way to BIND widgets to a groupbox so that when the groupbox is hidden the
widgets hide as well.  I tried creating the widgets as so:

$mw = new Win32::GUI::DialogBox( ..  #Make the main window

$gb = $mw-AddButton(  # make a groupbox inside it
 -text = 'hey',
 
 ...
 -style = WS_CHILD|WS_VISIBLE|7,
);


$gb-AddButton(.  # Try to create a button off the groupbox



but that failed (not surprising), is there a way to do this?  Thanks,

Chuck

P.S.  ummm, the example above is abbreviated! ; )






Re: [perl-win32-gui] Changing the Icon in the Top Left corner of a Window

2000-03-11 Thread Chuck Hirstius

This is untested but should give you a good idea of what to do...

$my_icon = new Win32::GUI::Icon("c:\\path\\to\\my\\icon.ico");

create your main window, then...

$my_main_window-SetIcon($my_icon);

I believe that should do it, HTH good luck!

Chuck


- Original Message -
From: "webmaster" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, March 11, 2000 6:25 AM
Subject: [perl-win32-gui] Changing the Icon in the Top Left corner of a
Window


 Hi.

 Can anyone tell me how I can change the Icon at the top left corner of a
 Window.

 A simple example of syntax would greatly help.

 Thanks and Best Regards,
 Ken






[perl-win32-gui] A few Simple Questions about Win32::GUI

2000-02-17 Thread Chuck Hirstius

Well, at least I HOPE they are simple!

I am "porting" an app I did in Tk, over to Win32::GUI, it's basically a
ground up re-write, and I've been looking for an excuse to learn Win32::GUI,
but I've run into a few problems.

#1  How can I bind a keystroke to a Widget in Win32::GUI?  Such as a tab or
enter key to a textfield?  In Tk, this is easy, as you use Bind().  Or
another way to ask it is this...  In the Tk version, I have bound the enter
key to a password entry widget, this way if the user hits enter while that
widget has focus, it calls the same subroutine as clicking the "logon"
button, that way the user didn't have to "tab" to it, or use the mouse to
click, though both of those methods worked as well.  Is there a way to make
a button the global default when the enter key is pressed?  as that would
generate the same result

#2  Is there a replacement for Tk's Frame widgets?  like creating a window
within a window? and how do you get the sunken, or ridged borders drawn
around them?  I've looked at a few of the sample scripts, and I know the
answer is in the -style tag, but I have no idea what all those constants
mean, and some, where the names SOUND explanatory enough, are useless
because I have no grasp of the context.

#3 How do I create a simple yes/no dialog box with an info icon, or a
warning icon?  That was very easy in Tk.  I know Win32::GUI has a DialogBox
creation method, what flags need to go to the style tag to get a dialog like
that?

I apologize if these are easily explained in the docs somewhere, I have been
through what was available on Aldo's site, but I just don't know enough
about the Win32 API to understand what most of it means.  Thanks!

Chuck