in reply to Win32::GUI frustration

It's actually non-trivial :) You need to define your own "class" (not an OO class) and assign the color to it, then assign the "class" to your window. This is roughly how to do it:

my $clsColor = Win32::GUI::Class->new( -name => "classColor", -color => 2, ) or die("Could not create Class\n");

And when you create the window, add the option

-class => $clsColor,

If you happen to use The GUI Loft, I stole this snippet from the demo program FetchURL. It's a bit different, so copy the demo program and go from there.

/J

Replies are listed 'Best First'.
Re^2: Win32::GUI frustration
by Anonymous Monk on Jun 29, 2004 at 14:12 UTC
    That's ace - thanks!

    Although if you can tell me how '2' is 'pale blue', that'd be ace, too..

    I tried the following, as I need a specific colour, having read the faq, to no avail.. 'Could not create class'

    #Brush to define the colour my $brush = new Win32::GUI::Brush(-color=>[198, 223, 198])or die("Coul +d not create Brush\n"); #Class for the colour my $clsColour = Win32::GUI::Class->new( -name => "classColour", -color => $brush, ) or die("Could not create Class +\n");
Re^2: Win32::GUI frustration
by flippy (Novice) on Jun 29, 2004 at 14:38 UTC
    Above was me -- sorry, forgot to log in!