Re: [perl-win32-gui-users] Continued Window Background Color Problems]

2005-08-22 Thread Brian Fredette
Hi Jason, 

Thanks for the reply.  I may try to recompile ... just need to find
the time.  I assume the fix is in the latest source?  Do you know what
the actual fix is and/or if there is a simple way to correct it
without recompiling?

Regards,
Brian

On 8/22/05, Jason P. <[EMAIL PROTECTED]> wrote:
> I apologize for the format, my mail server decided to amazingly drop the
> postmaster address for a couple of hours.
> Jason P. wrote:
> 
> > Brian Fredette wrote:
> >
> >> Greetings all.
> >>
> >> I read in the group there was a bug submitted regarding the setting of
> >> window background colors
> >> (http://sourceforge.net/tracker/index.php?func=detail&aid=1236053&group_id=16572&atid=116572)
> >>
> >>
> >> I'm still having this problem but the bug tracker says the problem has
> >> been fixed.  What do I need to do to correct this issue?
> >>
> >> My setup is:
> >>
> >> WinXP SP2
> >> AP 5.8.6 Build 811
> >> Win32::GUI 1.02
> >>
> >> Regards,
> >> Brian
> >>
> >>
> >> ---
> >> SF.Net email is Sponsored by the Better Software Conference & EXPO
> >> September 19-22, 2005 * San Francisco, CA * Development Lifecycle
> >> Practices
> >> Agile & Plan-Driven Development * Managing Projects & Teams * Testing
> >> & QA
> >> Security * Process Improvement & Measurement *
> >> http://www.sqe.com/bsce5sf
> >> ___
> >> Perl-Win32-GUI-Users mailing list
> >> Perl-Win32-GUI-Users@lists.sourceforge.net
> >> https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
> >>
> >>
> >>
> > This problem has indeed been resolved however:
> > 8/3/2005 6:29 PM [EMAIL PROTECTED]
> > Re: [win32gui] [perl-win32-gui-users] The window -backgroud option
> > >I just put a fix for this into CVS.
> > >Rob.
> >
> > It is not part of the 1.02 release. You will need to recompile or wait
> > for the next release. (ATM, I haven't recompiled either, and I am the
> > one who pointed this whole mess out.)
> >
> 
> 
> 
> ---
> SF.Net email is Sponsored by the Better Software Conference & EXPO
> September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
> Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
> Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
> ___
> Perl-Win32-GUI-Users mailing list
> Perl-Win32-GUI-Users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
>



Re: [perl-win32-gui-users] Continued Window Background Color Problems]

2005-08-22 Thread Jeremy White

Thanks for the reply.  I may try to recompile ... just need to find
the time.  I assume the fix is in the latest source?  Do you know what
the actual fix is and/or if there is a simple way to correct it
without recompiling?


It's a straightforward process to recompile - the fix is in CVS, so you'll 
have to check out the source code from the sourceforge repository. 
Unfortunately, there is no simple way to fix this without recompiling. A new 
version should be released in a couple of weeks if you can wait that long.


Cheers,

jez.





[perl-win32-gui-users] SW_SHOWNA and SW_SHOWNOACTIVATE

2005-08-22 Thread Jason P.
Submitting these values to Show in regards to a window does not always 
work appropriately

"$win->Show(SW_SHOWNA);"

Herein lies an example sccript, along with an attached .ico file for use 
with said script.


Sometimes it fires the Activate, sometimes it doesnt...odd, and annoying 
to have it grab the cursor away, if only for brief moments, It can stop 
you typing at just the right time..


WinXP Pro SP2
AS perl 5.8.4 build 810
Win32::GUI 1.02

Any help in sorting out why its pissy/not working properly would be 
appreciated!


#-snip-#
use warnings;
use strict;

use Win32::GUI;

# winuser.h constants.
#-- both are supposed to make it so the window is shown, but not activated.
use constant SW_SHOWNOACTIVATE => 4;
use constant SW_SHOWNA => 8;

# collapsing length (milliseconds)
use constant COLLAPSE_TIME => 100;

# shell window handle
my ($DOS) = Win32::GUI::GetPerlWindow();

# Functional States
my $isActive = 1;
my $isPopable = 1;

# Collapsing Controls
my $lapseTime = 0;
my $lapsePart = 0;
use constant LAPSE_TIME  => 100;
use constant LAPSE_PARTS => 10;

# This window is created and never shown/activated/enabled, as a means 
to NOT show the notification on the taskbar. (needs a parent != desktop)

my $winDiscard = new Win32::GUI::Window(
   -name=>'winGarbage',
   -height => 0,
   -width => 0,
   -remstyle => 0x, #make borderless
   -addstyle => 0x8000 | 0, #make borderless
   -minimizebox=>0,
   -maximizebox=>0,
   -sizeable=>1,
   -resizable=>0,
   -menubox=>0,
   -sysmenu=>1,
   -dialogui=>0,
); # the better part of these options are purely here because I copied 
them from below.


my $win = new Win32::GUI::Window(
   -parent=>$winDiscard,
   -name =>'winPopNotify',
   -height => 20,
   -width => 200,
   -topmost => 1,
   -remstyle => 0x, #make borderless
   -addstyle => 0x8000 | 0, #make borderless
   -minimizebox=>0,
   -maximizebox=>0,
   -sizeable=>1,
   -resizable=>0,
   -menubox=>0,
   -sysmenu=>1,
   -dialogui=>0,
);

# add Show Timer
my $stimer = $win->AddTimer('tShow',30*1000); #30 seconds

# add Collapsing Timer
my $ctimer = $win->AddTimer('tCollapse',COLLAPSE_TIME);

# Create NotifyIcon
my $icon = new Win32::GUI::Icon('stupid.ico');
my $ni = $win->AddNotifyIcon(-name => 'NI', -id=>1, 
-tip=>'PopNotifyContol', -icon=>$icon);


# Create richedit (content)
my $re = $win->AddRichEdit(
   -name => 'rePNContent',
   -height => ($win->GetClientRect)[3],
   -width =>($win->GetClientRect)[2],
);

# Create NI Menu
my $NI_NO_MENU = 0;
my $Menus = $winDiscard->AddMenu(
   -name => 'MMMenus',
);
my $MTray = $Menus->AddMenuButton(
   -name => 'MTray',
);
my $MTShowStatus = $MTray->AddMenuItem(
   -name => 'MTShowStatus',
   -text => 'Show Status',
   -id   => 3,
   -onClick => \&MTShowStatus_Toggle,
);
my $MTPopup = $MTray->AddMenuItem(
   -name => 'MTPopup',
   -text => 'Popup',
   -id   => 2,
   -onClick => \&MTPopup_Toggle,
);
$MTray->AddMenuItem(
   -seperator => 1,
   -id   => 1,
);
my $MTExit = $MTray->AddMenuItem(
   -name => 'MTExit',
   -text => 'Exit',
   -id   => 0,
   -onClick => \&MTExit,
);

# Prep content
$win->rePNContent->BackColor('#00');
$win->rePNContent->SetCharFormat(-color=>'#00');
$win->rePNContent->Select(-1,-1);
$win->rePNContent->ReplaceSel("Notification\nPopup\n");

# Prep NI menu
$MTShowStatus->Checked($isActive);
$MTPopup->Checked($isPopable);
$MTPopup->Enabled($isActive);


# Hide the shell window
#- disabled for debug
# Win32::GUI::Hide($DOS);

# Adjust the position of the Popup
ResizeWindow();

# Show the popup without activation.
$win->Show(SW_SHOWNA);
$win->Enable(0);

# Begin GUI Event Loop
Win32::GUI::Dialog();

# Show the shell window
Win32::GUI::Show($DOS);


#3
# routines
sub AdjustWindow{
   my ($edge, $need) = FindTrayEdge();
   #- Debug
   # print "On edge [b/r/t/l]:$edge\nEdge is: $need\n";
   if($edge == 1){
   $win->Left(Win32::GUI::GetSystemMetrics(SM_CXSCREEN) - $win->Width);
   $win->Top( $need - $win->Height);
   }
   if($edge == 2){
   $win->Left($need - $win->Width);
   $win->Top( Win32::GUI::GetSystemMetrics(SM_CYSCREEN) - 
$win->Height);

   }
   if($edge == 3){
   $win->Left(Win32::GUI::GetSystemMetrics(SM_CXSCREEN) - $win->Width);
   $win->Top( $need);
   }
   if($edge == 4){
   $win->Left($need);
   $win->Top( Win32::GUI::GetSystemMetrics(SM_CYSCREEN) - 
$win->Height);

   }
   return undef;
}


sub ResizeWindow{
   my $lines = 
$win->rePNContent->LineFromChar($win->rePNContent->TextLength());

   my $lsize = 14; # derive formula for proper size. Anyone have this?
   $win->Height( ($lines * $lsize) + 4);
   $win->rePNContent->Height($win->Height);
   AdjustWindow();
   return undef;
}

##++
# Show Timer events
sub tShow_Timer{
   $lapseTime=0;
   if($isActive){
   ResizeWindow();
   $win->Show(SW_SHOWNA);
   }
}
#--

##++
# Collapse Timer events
sub tCollapse_Timer{
   if($win->IsVisible && $isPopa

[perl-win32-gui-users] Re: [Vertical Slider?

2005-08-22 Thread Robert May

Jason P. wrote:

Steven Lloyd wrote:

I know that a horizontal slider can by created but is there a way to 
create a vertical slider control using Win32::GUI?  Does AddSlider 
have such an option?


Steve Lloyd
http://www.basgetti.com



-horizontal=>0

snatched from Splitter.xs


Or possibly, -vertical => 1 See Win32::GUI::Slider docs at
http://perl-win32-gui.sourceforge.net/docs/Win32/GUI/Slider.html

[Splitters and Sliders aren't the same thing!  The XS code for a slider 
can be found in Trackbar.xs]


Rob.



Re: [win32gui] [perl-win32-gui-users] Continued Window Background Color Problems

2005-08-22 Thread Robert May

Brian Fredette wrote:

I read in the group there was a bug submitted regarding the setting of
window background colors
(http://sourceforge.net/tracker/index.php?func=detail&aid=1236053&group_id=16572&atid=116572)

I'm still having this problem but the bug tracker says the problem has
been fixed.  What do I need to do to correct this issue?


This is probably a good opportunity to let you all know how I am trying 
to use the tracker system for bugs and enhancements:


(1) If the tracker has been assigned to someone, then that person is 
(probably) looking at the issue.  If the issue is unassigned, then 
chances are we're not looking at it currently.


(2) Once I have a potential fix for an issue, I'm putting the fix into 
the CVS source tree (so that it stands a chance of running in a few 
different environments), marking the issue as fixed and lowering the 
priority.


(3) Once we have a release containing the fix, then I'll close the tracker.

So, in this specific case, the fact that the tracker is marked as fixed 
means there is a fix in CVS, but the fact that the tracker is still open 
 means that the fix is not in a release yet.


Regards,
Rob.



Re: [win32gui] [perl-win32-gui-users] Continued Window Background Color Problems

2005-08-22 Thread Brian Fredette
Hi Rob,

Thanks for the clarification.

Regards,
Brian

On 8/22/05, Robert May <[EMAIL PROTECTED]> wrote:
> Brian Fredette wrote:
> > I read in the group there was a bug submitted regarding the setting of
> > window background colors
> > (http://sourceforge.net/tracker/index.php?func=detail&aid=1236053&group_id=16572&atid=116572)
> >
> > I'm still having this problem but the bug tracker says the problem has
> > been fixed.  What do I need to do to correct this issue?
> 
> This is probably a good opportunity to let you all know how I am trying
> to use the tracker system for bugs and enhancements:
> 
> (1) If the tracker has been assigned to someone, then that person is
> (probably) looking at the issue.  If the issue is unassigned, then
> chances are we're not looking at it currently.
> 
> (2) Once I have a potential fix for an issue, I'm putting the fix into
> the CVS source tree (so that it stands a chance of running in a few
> different environments), marking the issue as fixed and lowering the
> priority.
> 
> (3) Once we have a release containing the fix, then I'll close the tracker.
> 
> So, in this specific case, the fact that the tracker is marked as fixed
> means there is a fix in CVS, but the fact that the tracker is still open
>  means that the fix is not in a release yet.
> 
> Regards,
> Rob.
>