[perl-win32-gui-users] hack message queue and get particular message

2001-08-06 Thread Renat Araslanow
how i can subj? strictly speaking i want get WM_HELP message to process help
button that appears in title when we create window with following tags

-helpbutton=>1,
-maximizebox=>0,
-minimizebox=>0,

here a sample prog that not work. somebody can help me (except God, of
course =)?

use Win32::GUI;
my $main_window=new Win32::GUI::Window(
-name=>"main_window",
-title=>"main window",
-pos=>[100,50],
-size=>[500,500],
-helpbutton=>1,
-maximizebox=>0,
-minimizebox=>0,
);

$main_window->AddTabStrip(
-justify=>1,
-name=>"tabs",
-pos=>[0,0],
-helpId=>10,
-size=>[400,500]);

$main_window->tabs->InsertItem(-text=>"first");
$main_window->tabs->InsertItem(-text=>"#",);

$main_window->Show();
#Win32::GUI::Dialog();
open FH,"> zzz";
while(1)
{
my @msg;

print "founded!!" if Win32::GUI::PeekMessage(0x0053,0x0053,[EMAIL 
PROTECTED]);
print "@msg";
my $z=unpack('IiiLLllpl',$msg[3]);
print $z;
Win32::GUI::DoEvents();
select(undef, undef, undef, 0.5);
}

sub main_window_Terminate
{
exit;
return -1;
}

PS% sorry for my awful English. =(




Re: [perl-win32-gui-users] bug_or_feature [1]

2001-08-06 Thread Renat Araslanow
>> Subject: Can't see label with user defined font
>>Reason: '-escapement' tag in font definition"

>this is a (rather unpleasant) feature :-)

[explanation skiped]

thanks a lot! but dont u think that this can be documented? and who maintain
documentation.
in Win32-GUI-0.0.558.tar.gz archive dont full (huh, maybe more than `dont
full` ;) ) and so many TDB =(

>> when i write in C and use it - it working pretty good.

>you should've been writing something else, because in C it works
>exactly the same way as Win32::GUI.

I meant no harm you. i end my bussines wih Win32 API long time ago and
possibly i forgot about this behavior.

PS% and how about buttons valign bug?
___
Perl-Win32-GUI-Users mailing list
Perl-Win32-GUI-Users@lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users





RE: [perl-win32-gui-users] interactive help [? ]button

2001-08-06 Thread Forhan, Michael
Aye, therein lies the rub. I haven't had any practical application for it
yet, but hopefully this page from the MSDN will help:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/
frlrfSystemWindowsFormsFormClassHelpButtonTopic.asp

This page describes the event for a Help button as 'control.HelpRequested',
I can only assume that means you will have a sub for each item you want to
provide help on? I tried to write a quick program, but didn't have much luck
making it work. This is all I have found so far, but I hope that it helps
you out.

Sorry I don't have any more information for you,
-Mike
[EMAIL PROTECTED]


-Original Message-
From: Rogers, John [mailto:[EMAIL PROTECTED]
Sent: Sunday, August 05, 2001 12:53 AM
To: 'perl-win32-gui-users@lists.sourceforge.net'
Subject: RE: [perl-win32-gui-users] interactive help [? ]button


I looked up this theard and others in the archives
I now know how to hide it , Thanks
But my question still remains, how to make it Do something ?

JohnR

> -Original Message-
> From: Forhan, Michael [mailto:[EMAIL PROTECTED]
> Sent: Friday, 3 August 2001 11:55
> To: 'perl-win32-gui-users@lists.sourceforge.net'
> Subject: RE: [perl-win32-gui-users] interactive help [? ]button
> 
> 
> The issue of the question button came up some time ago in 
> this group, (I
> have a post from 5/31/01 in my personal archive), thought it 
> may have been
> hard to spot from the subject [ Window Size Controls & 
> Miscellany ?'s ] Here
> it is for your reference:
> 
> 
> 
> I pulled up Microsoft's website on maximizebox settings (I 
> just searched for
> it from their main page), and linking from there I found 
> information for a
> 'helpbutton'. After putting -helpbutton => 1 in my
> window, sure enough, I got one of those '?' boxes. 
> 
> Its amazing what new functionality you can find by just being 
> curious ;) 
> 
> -Michael Forhan
> 
> -Original Message-
> From: Frazier, Joe Jr [mailto:[EMAIL PROTECTED]
> Sent: Thursday, May 31, 2001 1:49 PM
> To: perl-win32-gui-users@lists.sourceforge.net
> Subject: RE: [perl-win32-gui-users] Window Size Controls & Miscellany
> ?'s
> 
> 
> Yea, I just found about the -maximizebox thing.  -minimizebox does the
> opposite.  Set both to 0 if you want neither to show.  I wonder if
> -questionbox works the same way for a Win32::GUI::DialogWindow and
> removes the goofy question mark box?
> 
> 
> 
> Hope this helps!
> -Mike 
> [EMAIL PROTECTED]
> 
> PS. I believe you have to have -minimizebox and -maximizebox 
> => 0 before you
> can use the questionbox option.
> 
> -Original Message-
> 
> Gday,
> 
> I just joined this list Ive been using perl a Win32::GUI for 
> a few months
> now,
> I posted the following on win32 users list and got no answer 
> any one here
> help ?
> 
> -
> Does anyone know how to use the interactive help, (?) button on the
> dialogbox ???
> 
> cant find it in the docs
> 
> dosent have to really work just a button event would be ok,
> --
> 
> JohnR
> 
> ___
> Perl-Win32-GUI-Users mailing list
> Perl-Win32-GUI-Users@lists.sourceforge.net
> http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
> 


## 
Disclaimer 

If this e-mail has been sent to you in error, please notify 
Océ-Australia Limited immediately and delete this e-mail from 
your system. 

Any views expressed in this e-mail are those of the individual 
sender and may not necessarily reflect the views of 
Océ-Australia Limited. 
##

___
Perl-Win32-GUI-Users mailing list
Perl-Win32-GUI-Users@lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users



Re: [perl-win32-gui-users] bug_or_feature [1]

2001-08-06 Thread Aldo Calpini
Renat Araslanow wrote:
> Subject: Can't see label with user defined font
> Reason: '-escapement' tag in font definition"

this is a (rather unpleasant) feature :-)
the label is there, and the text is even rotated 90╟, but it
falls outside of the label area. the reference point for the
text is the upper left corner of the label, so when you rotate
it, the text is above the label area. the following ASCII art
should (hopefully) explain what's happening:

   T
   X
   E
   T
  +--++--+
  |TEXT  ||  |
  +--++--+
  normal  rotated

I did some research and found that, in order to see at least
some of the text inside the label, you need this:

$W->AddLabel(
-name=>"ok",
-left=>0,-top=>100,
-width=>500,-height=>500,
-align => 'center',  # center horizontally
-addstyle => 0x200, # SS_CENTERIMAGE (center vertically)
-font=>$font1,
-text=>"ooo",
);

the only drawback to this is that SS_CENTERIMAGE works only for
a single-line text. if you try it with more than one line, it
just doesn't wrap.

another pretty ugly workaround to fit the text in the label area
is to add some newline before the text (eg. -text =>
"\r\n\r\noo").

> when i write in C and use it - it working pretty good.

you should've been writing something else, because in C it works
exactly the same way as Win32::GUI.


cheers,
Aldo

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





Re: [perl-win32-gui-users] Window without border and icons for a splash screen?

2001-08-06 Thread Peter Köller
Great work, Johan!

This did the trick. Thanks,

Peter


> -Ursprüngliche Nachricht-
> Von: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Auftrag von
> Johan Lindstrom
> Gesendet am: Sonntag, 5. August 2001 23:00
> An: perl-win32-gui-users@lists.sourceforge.net
> Betreff: Re: [perl-win32-gui-users] Window without border and icons for
> a splash screen?
>
> Peter wrote:
> >is there a solution for creating splash screens without the
> windows border
> >and icons (e. g. like Opera).
>
> Try this:
>
> my $winMain = new Win32::GUI::Window(
>  -left   => 13,
>  -top=> 32,
>  -width  => 439,
>  -height => 260,
>  -name   => "winMain",
>  -text   => "Autoscroller",
>  -style => 0x8000#WS_POPUP
>  );
>
> Read more about the CreateWindow function in the Win32 API for
> other things
> you can do to the style.
>
> 


/J - just back from YAPC::Europe in Amsterdam

--  --- -- -- -- -  -   ---
Johan LindströmBoss Casinos
Sourcerer [EMAIL PROTECTED]
  http://www.bahnhof.se/~johanl/
If the only tool you have is a hammer,
everything tends to look
like a nail



___
Perl-Win32-GUI-Users mailing list
Perl-Win32-GUI-Users@lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users