Re: perltray/tk intercept windows minimize function

listmail <[email protected]>
Newsgroups gmane.comp.lang.perl.tk
Message-ID <[email protected]>
I appreciate the response,  I was able to clean up some code and I 
removed the Win32Util module altogether.  I've been trying to understand 
the bit AND operation and how it removes the buttons.  I was trying to 
remove just the minimize button, for example, but something like $style 
&= ~(WS_MINIMIZEBOX); only ~greys~ out the minimize button and does not 
remove it.  Can you explain that piece to me?


Rob Seegel wrote:
> Whoops! I forgot the critical update call in the last two messages. 
> Updated below.
>
> use Tk;
> use Win32::GUI;
>
> my $mw = MainWindow->new;
> $mw->update;  ## Important bit!
>
> my $winH = hex($mw->frame);
> my $style = Win32::GUI::GetWindowLong($winH, -16);
> $style &= ~(WS_MINIMIZEBOX | WS_MAXIMIZEBOX);
> Win32::GUI::SetWindowLong($winH, -16, $style);
> Win32::GUI::DrawMenuBar($winH);
> Win32::GUI::Maximize($winH);
>
> MainLoop;
>
>
> Rob Seegel wrote:
>> As for maximize -- why not use Thundergnats solution? It seems to 
>> work perfectly well for me. Below is the updated code...
>>
>>
>>
>>
>>
>>
>
>
> -++**==--++**==--++**==--++**==--++**==--++**==--++**==
> This message was posted through the Stanford campus mailing list
> server.  If you wish to unsubscribe from this mailing list, send the
> message body of "unsubscribe ptk" to [email protected]
>

-++**==--++**==--++**==--++**==--++**==--++**==--++**==
This message was posted through the Stanford campus mailing list
server.  If you wish to unsubscribe from this mailing list, send the
message body of "unsubscribe ptk" to [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.