<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<id>tag:www.nabble.com,2006:forum-3460</id>
	<title>Nabble - Win32::GUI</title>
	<updated>2008-11-29T23:22:21Z</updated>
	<link rel="self" type="application/atom+xml" href="http://www.nabble.com/Win32::GUI-f3460.xml" />
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Win32%3A%3AGUI-f3460.html" />
	<subtitle type="html">Win32::GUI is a Win32-platform native graphical user interface toolkit for perl.   basically, it's an XS implementation of most of the functions found in user32.dll and gdi32.dll,   with an object oriented perl interface and an event-based dialog model. Win32::GUI home is &lt;a href=&quot;http://sourceforge.net/projects/perl-win32-gui/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;.</subtitle>
	
<entry>
	<id>tag:www.nabble.com,2006:post-20755202</id>
	<title>Re: Strawberry</title>
	<published>2008-11-29T23:22:21Z</published>
	<updated>2008-11-29T23:22:21Z</updated>
	<author>
		<name>zak3</name>
	</author>
	<content type="html">thanks for the info
&lt;br&gt;i have installed strawberry perl to the default c:\strawberry , but when i run the cpan client and try to install modules it will install everything to the activestate perl default folder c:\perl , so i have tried it again after renaming the c:\perl to something else and now it have installed modules to c:\strawberry , 
&lt;br&gt;the mentioned error:(Can't call method &amp;quot;STORE&amp;quot; ...) also there with the activestate perl.
&lt;br&gt;it is useful to have stawberry perl since many cpan modules have no counterpart ppm activestate modules
&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;Sean Healy wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;As of October 20, Strawberry Perl is out!
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://strawberryperl.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://strawberryperl.com/&lt;/a&gt;&lt;br&gt;&lt;br&gt;It comes in two varieties: 5.10.0.3 and 5.8.8.3.
&lt;br&gt;&lt;br&gt;One caveat - you can only install it to the C or D drive, and there is 
&lt;br&gt;a separate download for each option. (But you could build it yourself 
&lt;br&gt;and put it anywhere you want if that limitation really bothers you.)
&lt;br&gt;&lt;br&gt;Win32::GUI builds cleanly out of the box with 5.10.0.3, thanks to work 
&lt;br&gt;done earlier by Laurent Rocher. (At least, I think that's who did the 
&lt;br&gt;work to make Win32::GUI build with dmake instead of Visual Studio.)
&lt;br&gt;&lt;br&gt;I even ran a few of the test scripts in the demo folder, and they run 
&lt;br&gt;fine. (By the way, I got the error 'Can't call method &amp;quot;STORE&amp;quot; on an 
&lt;br&gt;undefined value during global destruction' when exiting Notepad.pl.)
&lt;br&gt;&lt;br&gt;To install Win32::GUI on Strawberry Perl:
&lt;br&gt;&lt;br&gt;Run the CPAN client. (It can be found in c:\strawberry\perl\bin\, but 
&lt;br&gt;there's also a Strawberry Perl item in the start menu from which you can 
&lt;br&gt;run the CPAN client.)
&lt;br&gt;&lt;br&gt;In the client, type 'install ExtUtils::FakeConfig' and hit enter.
&lt;br&gt;&lt;br&gt;When that's done, type 'install Win32::GUI' and hit enter.
&lt;br&gt;&lt;br&gt;That's all there is to it.
&lt;br&gt;&lt;br&gt;&lt;br&gt;-------------------------------------------------------------------------
&lt;br&gt;This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
&lt;br&gt;Build the coolest Linux based applications with Moblin SDK &amp; win great prizes
&lt;br&gt;Grand prize is a trip for two to an Open Source event anywhere in the world
&lt;br&gt;&lt;a href=&quot;http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Perl-Win32-GUI-Users mailing list
&lt;br&gt;Perl-Win32-GUI-Users@lists.sourceforge.net
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users&lt;/a&gt;&lt;br&gt;&lt;a href=&quot;http://perl-win32-gui.sourceforge.net/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://perl-win32-gui.sourceforge.net/&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/perl-win32-gui-users-f3462.html&quot; embed=&quot;fixTarget[3462]&quot; target=&quot;_top&quot; &gt;perl-win32-gui-users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Strawberry-tp20721785p20755202.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-20721785</id>
	<title>Strawberry</title>
	<published>2008-11-27T08:13:49Z</published>
	<updated>2008-11-27T08:13:49Z</updated>
	<author>
		<name>Sean Healy</name>
	</author>
	<content type="html">As of October 20, Strawberry Perl is out!
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://strawberryperl.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://strawberryperl.com/&lt;/a&gt;&lt;br&gt;&lt;br&gt;It comes in two varieties: 5.10.0.3 and 5.8.8.3.
&lt;br&gt;&lt;br&gt;One caveat - you can only install it to the C or D drive, and there is 
&lt;br&gt;a separate download for each option. (But you could build it yourself 
&lt;br&gt;and put it anywhere you want if that limitation really bothers you.)
&lt;br&gt;&lt;br&gt;Win32::GUI builds cleanly out of the box with 5.10.0.3, thanks to work 
&lt;br&gt;done earlier by Laurent Rocher. (At least, I think that's who did the 
&lt;br&gt;work to make Win32::GUI build with dmake instead of Visual Studio.)
&lt;br&gt;&lt;br&gt;I even ran a few of the test scripts in the demo folder, and they run 
&lt;br&gt;fine. (By the way, I got the error 'Can't call method &amp;quot;STORE&amp;quot; on an 
&lt;br&gt;undefined value during global destruction' when exiting Notepad.pl.)
&lt;br&gt;&lt;br&gt;To install Win32::GUI on Strawberry Perl:
&lt;br&gt;&lt;br&gt;Run the CPAN client. (It can be found in c:\strawberry\perl\bin\, but 
&lt;br&gt;there's also a Strawberry Perl item in the start menu from which you can 
&lt;br&gt;run the CPAN client.)
&lt;br&gt;&lt;br&gt;In the client, type 'install ExtUtils::FakeConfig' and hit enter.
&lt;br&gt;&lt;br&gt;When that's done, type 'install Win32::GUI' and hit enter.
&lt;br&gt;&lt;br&gt;That's all there is to it.
&lt;br&gt;&lt;br&gt;&lt;br&gt;-------------------------------------------------------------------------
&lt;br&gt;This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
&lt;br&gt;Build the coolest Linux based applications with Moblin SDK &amp; win great prizes
&lt;br&gt;Grand prize is a trip for two to an Open Source event anywhere in the world
&lt;br&gt;&lt;a href=&quot;http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Perl-Win32-GUI-Users mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=20721785&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Perl-Win32-GUI-Users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users&lt;/a&gt;&lt;br&gt;&lt;a href=&quot;http://perl-win32-gui.sourceforge.net/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://perl-win32-gui.sourceforge.net/&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/perl-win32-gui-users-f3462.html&quot; embed=&quot;fixTarget[3462]&quot; target=&quot;_top&quot; &gt;perl-win32-gui-users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Strawberry-tp20721785p20721785.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-20642032</id>
	<title>How to control the keyboard cursor in a text box?</title>
	<published>2008-11-22T13:29:46Z</published>
	<updated>2008-11-22T13:29:46Z</updated>
	<author>
		<name>d c-9</name>
	</author>
	<content type="html">&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;&gt;&lt;tr&gt;&lt;td valign=&quot;top&quot; style=&quot;font: inherit;&quot;&gt;Hi,&lt;br&gt;&lt;br&gt;I am relatively new to Perl programming (in fact, PC programming in general).&lt;br&gt;&lt;br&gt;I have a script with multiple text input boxes and, everytime I move the mouse off&lt;br&gt;the window and back again, the keyboard input cursor has gone missing.&amp;nbsp; What I&lt;br&gt;am doing is using copy/paste from multiple other programs and building text lines.&lt;br&gt;e.g. From 3 separate sources 1) This is 2) a silly 3) text example. &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; To become 'This is a silly text example' &lt;br&gt;&lt;br&gt;The only cursor related functions that I can fins in Win32::Gui (set/getcursorpos)&lt;br&gt;relate to the mouse cursor not the keyboard cursor.&lt;br&gt;&lt;br&gt;Any help, pointers, suggestions will be greatly appreciated.&lt;br&gt;&lt;br&gt;Thank you.&lt;br&gt;&lt;br&gt;D &lt;br&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;br&gt;



      &lt;hr size=1&gt;Now with a new friend-happy design! Try the new &lt;a href=&quot;http://ca.beta.messenger.yahoo.com/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;&lt;b&gt;Yahoo! Canada Messenger&lt;/b&gt;&lt;/a&gt;&lt;br /&gt;-------------------------------------------------------------------------
&lt;br&gt;This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
&lt;br&gt;Build the coolest Linux based applications with Moblin SDK &amp; win great prizes
&lt;br&gt;Grand prize is a trip for two to an Open Source event anywhere in the world
&lt;br&gt;&lt;a href=&quot;http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/&lt;/a&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;Perl-Win32-GUI-Users mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=20642032&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Perl-Win32-GUI-Users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users&lt;/a&gt;&lt;br&gt;&lt;a href=&quot;http://perl-win32-gui.sourceforge.net/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://perl-win32-gui.sourceforge.net/&lt;/a&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/perl-win32-gui-users-f3462.html&quot; embed=&quot;fixTarget[3462]&quot; target=&quot;_top&quot; &gt;perl-win32-gui-users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/How-to-control-the-keyboard-cursor-in-a-text-box--tp20642032p20642032.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-20635765</id>
	<title>Re: bitmap - getting mouse clicks and mouse	location</title>
	<published>2008-11-22T04:07:32Z</published>
	<updated>2008-11-22T04:07:32Z</updated>
	<author>
		<name>Jeremy White-3</name>
	</author>
	<content type="html">&lt;html&gt;
&lt;head&gt;

&lt;/head&gt;
&lt;body class='hmmessage'&gt;
Hi,&lt;br&gt;&lt;br&gt;Try the following:&lt;br&gt;&lt;br&gt;use strict;&lt;br&gt;use warnings;&lt;br&gt;use Win32::GUI (qw {WS_CAPTION WS_SIZEBOX WS_CHILD WS_CLIPCHILDREN WS_EX_CLIENTEDGE});&lt;br&gt;&lt;br&gt;my $W = new Win32::GUI::Window(&lt;br&gt;-name =&amp;gt; &quot;W&quot;,&lt;br&gt;-title =&amp;gt; &quot;mouse click tracking&quot;,&lt;br&gt;-left =&amp;gt; 54,&lt;br&gt;-top =&amp;gt; 77,&lt;br&gt;-width =&amp;gt; 546,&lt;br&gt;-height =&amp;gt; 318,&lt;br&gt;);&lt;br&gt;my $textfield = $W-&amp;gt;AddTextfield(&lt;br&gt;-text =&amp;gt; &quot;&quot;,&lt;br&gt;-name =&amp;gt; &quot;Textfield_1&quot;,&lt;br&gt;-left =&amp;gt; 401,&lt;br&gt;-top =&amp;gt; 9,&lt;br&gt;-width =&amp;gt; 129,&lt;br&gt;-height =&amp;gt; 249,&lt;br&gt;-multiline =&amp;gt; 1,&lt;br&gt;-vscroll =&amp;gt; 1,&lt;br&gt;);&lt;br&gt;&lt;br&gt;my&amp;nbsp;&amp;nbsp; $childwindow = new Win32::GUI::Window (&lt;br&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; -parent&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =&amp;gt; $W,&lt;br&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; -name&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =&amp;gt; 'bitmap window',&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -left =&amp;gt; 4,&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -top =&amp;gt; 4,&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -width =&amp;gt; 270,&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -height =&amp;gt; 232,&lt;br&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; -popstyle&amp;nbsp;&amp;nbsp;&amp;nbsp; =&amp;gt; WS_CAPTION | WS_SIZEBOX,&lt;br&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; -pushstyle&amp;nbsp;&amp;nbsp; =&amp;gt; WS_CHILD | WS_CLIPCHILDREN,&lt;br&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; -pushexstyle =&amp;gt; WS_EX_CLIENTEDGE,&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #-hscroll&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =&amp;gt; 1,&lt;br&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; #-onScroll&amp;nbsp;&amp;nbsp;&amp;nbsp; =&amp;gt; \&amp;amp;Generic_Scroll,&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -onMouseMove =&amp;gt; \&amp;amp;Generic_MouseMove,&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -onPaint&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =&amp;gt; \&amp;amp;Generic_Paint,&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -onMouseDown =&amp;gt; \&amp;amp;Generic_MouseDown,&lt;br&gt;&amp;nbsp;&amp;nbsp; ); &lt;br&gt;&amp;nbsp;&lt;br&gt;&amp;nbsp;$childwindow-&amp;gt;Show; &lt;br&gt;&amp;nbsp;&lt;br&gt;&lt;br&gt;sub Generic_MouseMove {&lt;br&gt;&amp;nbsp; my ($win,$xcor,$ycor)=@_;&lt;br&gt;&amp;nbsp; print &quot;MouseMove $win,$xcor,$ycor\n&quot;;&lt;br&gt;}&lt;br&gt;&lt;br&gt;sub Generic_Paint {&lt;br&gt;&amp;nbsp; my $win=shift;&amp;nbsp; &lt;br&gt;&amp;nbsp; print &quot;Paint $win\n&quot;;&lt;br&gt;}&lt;br&gt;&lt;br&gt;sub Generic_MouseDown {&lt;br&gt;&amp;nbsp; my ($win,$xcor,$ycor)=@_;&amp;nbsp; &lt;br&gt;&amp;nbsp; print &quot;MouseDown $win,$xcor,$ycor\n&quot;;&lt;br&gt;&amp;nbsp; $textfield -&amp;gt; Append( &quot;$xcor - $ycor \n&quot;)&lt;br&gt;}&lt;br&gt;&lt;br&gt;&lt;br&gt;$W-&amp;gt;Show();&lt;br&gt;Win32::GUI::Dialog();&lt;br&gt;&lt;br&gt;exit(0);&lt;br&gt;&lt;br&gt;sub Window_Terminate {&lt;br&gt;return -1;&lt;br&gt;}&lt;br&gt;&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; From: &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=20635765&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;pcourterelle@...&lt;/a&gt;&lt;br&gt;&amp;gt; To: &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=20635765&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;perl-win32-gui-users@...&lt;/a&gt;&lt;br&gt;&amp;gt; Date: Fri, 21 Nov 2008 13:08:47 -0800&lt;br&gt;&amp;gt; Subject: Re: [perl-win32-gui-users] bitmap - getting mouse clicks and mouse	location&lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; To get the absolute X and Y coordinates, would you have to subtract the&lt;br&gt;&amp;gt; position of the child (label) from the position of the parent (main window)?&lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; pc&lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; -----Original Message-----&lt;br&gt;&amp;gt; From: zak3 [mailto:&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=20635765&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;zak31415@...&lt;/a&gt;] &lt;br&gt;&amp;gt; Sent: Friday, November 21, 2008 2:21 AM&lt;br&gt;&amp;gt; To: &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=20635765&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;perl-win32-gui-users@...&lt;/a&gt;&lt;br&gt;&amp;gt; Subject: Re: [perl-win32-gui-users] bitmap - getting mouse clicks and mouse&lt;br&gt;&amp;gt; location&lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; i have experemented using as a guide the message:&lt;br&gt;&amp;gt; http://&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=20635765&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;www.mail-archive.com/perl-win32-gui-users@...&lt;/a&gt;/msg03&lt;br&gt;&amp;gt; 025.html&lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; here is a main form and a Label, when you click on the Label, the textfield&lt;br&gt;&amp;gt; control will show the coordinates of mouse cursor , it seems to me that&lt;br&gt;&amp;gt; those coordinated are relative to the screen, you may adapt the code to&lt;br&gt;&amp;gt; display the coordinates relative to the form or relative to the label, or a&lt;br&gt;&amp;gt; graphic control.&lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; use strict;&lt;br&gt;&amp;gt; use warnings;&lt;br&gt;&amp;gt; use Win32::GUI();&lt;br&gt;&amp;gt;  &lt;br&gt;&amp;gt;  my $W = new Win32::GUI::Window(&lt;br&gt;&amp;gt;  -name =&amp;gt; &quot;W&quot;,&lt;br&gt;&amp;gt;  -title =&amp;gt; &quot;mouse click tracking&quot;,&lt;br&gt;&amp;gt;  -left =&amp;gt; 54,&lt;br&gt;&amp;gt;  -top =&amp;gt; 77,&lt;br&gt;&amp;gt;  -width =&amp;gt; 546,&lt;br&gt;&amp;gt;  -height =&amp;gt; 318,&lt;br&gt;&amp;gt;  );&lt;br&gt;&amp;gt;  my $textfield = $W-&amp;gt;AddTextfield(&lt;br&gt;&amp;gt;        -text    =&amp;gt; &quot;&quot;,&lt;br&gt;&amp;gt;        -name    =&amp;gt; &quot;Textfield_1&quot;,&lt;br&gt;&amp;gt;        -left    =&amp;gt; 401,&lt;br&gt;&amp;gt;        -top     =&amp;gt; 9,&lt;br&gt;&amp;gt;        -width   =&amp;gt; 129,&lt;br&gt;&amp;gt;        -height  =&amp;gt; 249,&lt;br&gt;&amp;gt;        -multiline    =&amp;gt; 1,&lt;br&gt;&amp;gt;        -vscroll    =&amp;gt; 1,&lt;br&gt;&amp;gt;       );&lt;br&gt;&amp;gt;       &lt;br&gt;&amp;gt;  $W-&amp;gt;AddLabel(&lt;br&gt;&amp;gt;        -text    =&amp;gt; &quot;zz&quot;,&lt;br&gt;&amp;gt;        -name    =&amp;gt; &quot;Label_2&quot;,&lt;br&gt;&amp;gt;        -left    =&amp;gt; 0,&lt;br&gt;&amp;gt;        -top     =&amp;gt; 0,&lt;br&gt;&amp;gt;        -width   =&amp;gt; 270,&lt;br&gt;&amp;gt;        -height  =&amp;gt; 232,&lt;br&gt;&amp;gt;        -foreground    =&amp;gt; 0,&lt;br&gt;&amp;gt;        -background    =&amp;gt; 12615935,&lt;br&gt;&amp;gt;        -notify =&amp;gt; 1,&lt;br&gt;&amp;gt;        -onMouseDown  =&amp;gt; sub { my($mx, $my) =&lt;br&gt;&amp;gt; Win32::GUI::GetCursorPos();$textfield -&amp;gt; Append( &quot;$mx - $my \n&quot;);},&lt;br&gt;&amp;gt;       );&lt;br&gt;&amp;gt;       &lt;br&gt;&amp;gt;  &lt;br&gt;&amp;gt;       &lt;br&gt;&amp;gt;  $W-&amp;gt;Show();&lt;br&gt;&amp;gt;  Win32::GUI::Dialog();&lt;br&gt;&amp;gt;  &lt;br&gt;&amp;gt;  exit(0);&lt;br&gt;&amp;gt;  &lt;br&gt;&amp;gt;  sub Window_Terminate {&lt;br&gt;&amp;gt;  return -1;&lt;br&gt;&amp;gt;  }&lt;br&gt;&amp;gt;  &lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; iaagaiow wrote:&lt;br&gt;&amp;gt; &amp;gt; &lt;br&gt;&amp;gt; &amp;gt; Hello,&lt;br&gt;&amp;gt; &amp;gt; &lt;br&gt;&amp;gt; &amp;gt; I'm developing an app which will display a bitmap.? I want to be able to&lt;br&gt;&amp;gt; &amp;gt; detect mouse clicks on the bitmap and get the mouse cursor location when&lt;br&gt;&amp;gt; &amp;gt; clicks are detected.&lt;br&gt;&amp;gt; &amp;gt; &lt;br&gt;&amp;gt; &amp;gt; Displaying the bitmap is easy - there are demos that show that.? I have&lt;br&gt;&amp;gt; &amp;gt; been trying to modify the demos to detect clicks and get the mouse cursor&lt;br&gt;&amp;gt; &amp;gt; location, but nothing has worked yet.? Have been going thru doc/demos/etc,&lt;br&gt;&amp;gt; &amp;gt; and will keep doing so, but if you happen to have experience with this&lt;br&gt;&amp;gt; &amp;gt; topic, please send me any pointers you can.&lt;br&gt;&amp;gt; &amp;gt; &lt;br&gt;&amp;gt; &amp;gt; I have tried using GetCursorPos, but thus far seem to be getting undefined&lt;br&gt;&amp;gt; &amp;gt; return values.? As for the mouse click, tried setting up -onClick option&lt;br&gt;&amp;gt; &amp;gt; but this seems to be ignored.&lt;br&gt;&amp;gt; &amp;gt; &lt;br&gt;&amp;gt; &amp;gt; Thanks for your time!&lt;br&gt;&amp;gt; &amp;gt; &lt;br&gt;&amp;gt; &amp;gt; Regards,&lt;br&gt;&amp;gt; &amp;gt; &lt;br&gt;&amp;gt; &amp;gt; LP&lt;br&gt;&amp;gt; &amp;gt; &lt;br&gt;&amp;gt; &amp;gt; -------------------------------------------------------------------------&lt;br&gt;&amp;gt; &amp;gt; This SF.Net email is sponsored by the Moblin Your Move Developer's&lt;br&gt;&amp;gt; &amp;gt; challenge&lt;br&gt;&amp;gt; &amp;gt; Build the coolest Linux based applications with Moblin SDK &amp;amp; win great&lt;br&gt;&amp;gt; &amp;gt; prizes&lt;br&gt;&amp;gt; &amp;gt; Grand prize is a trip for two to an Open Source event anywhere in the&lt;br&gt;&amp;gt; &amp;gt; world&lt;br&gt;&amp;gt; &amp;gt; http://moblin-contest.org/redirect.php?banner_id=100&amp;amp;url=/&lt;br&gt;&amp;gt; &amp;gt; _______________________________________________&lt;br&gt;&amp;gt; &amp;gt; Perl-Win32-GUI-Users mailing list&lt;br&gt;&amp;gt; &amp;gt; &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=20635765&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Perl-Win32-GUI-Users@...&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;gt; https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users&lt;br&gt;&amp;gt; &amp;gt; http://perl-win32-gui.sourceforge.net/&lt;br&gt;&amp;gt; &amp;gt; &lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; -- &lt;br&gt;&amp;gt; View this message in context:&lt;br&gt;&amp;gt; http://www.nabble.com/bitmap---getting-mouse-clicks-and-mouse-location-tp205&lt;br&gt;&amp;gt; 49181p20618513.html&lt;br&gt;&amp;gt; Sent from the perl-win32-gui-users mailing list archive at Nabble.com.&lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; -------------------------------------------------------------------------&lt;br&gt;&amp;gt; This SF.Net email is sponsored by the Moblin Your Move Developer's challenge&lt;br&gt;&amp;gt; Build the coolest Linux based applications with Moblin SDK &amp;amp; win great&lt;br&gt;&amp;gt; prizes&lt;br&gt;&amp;gt; Grand prize is a trip for two to an Open Source event anywhere in the world&lt;br&gt;&amp;gt; http://moblin-contest.org/redirect.php?banner_id=100&amp;amp;url=/&lt;br&gt;&amp;gt; _______________________________________________&lt;br&gt;&amp;gt; Perl-Win32-GUI-Users mailing list&lt;br&gt;&amp;gt; &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=20635765&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Perl-Win32-GUI-Users@...&lt;/a&gt;&lt;br&gt;&amp;gt; https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users&lt;br&gt;&amp;gt; http://perl-win32-gui.sourceforge.net/&lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; -------------------------------------------------------------------------&lt;br&gt;&amp;gt; This SF.Net email is sponsored by the Moblin Your Move Developer's challenge&lt;br&gt;&amp;gt; Build the coolest Linux based applications with Moblin SDK &amp;amp; win great prizes&lt;br&gt;&amp;gt; Grand prize is a trip for two to an Open Source event anywhere in the world&lt;br&gt;&amp;gt; http://moblin-contest.org/redirect.php?banner_id=100&amp;amp;url=/&lt;br&gt;&amp;gt; _______________________________________________&lt;br&gt;&amp;gt; Perl-Win32-GUI-Users mailing list&lt;br&gt;&amp;gt; &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=20635765&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Perl-Win32-GUI-Users@...&lt;/a&gt;&lt;br&gt;&amp;gt; https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users&lt;br&gt;&amp;gt; http://perl-win32-gui.sourceforge.net/&lt;/div&gt;&lt;br /&gt;&lt;hr /&gt;BigSnapSearch.com - 24 prizes a day, every day.  &lt;a href='http://clk.atdmt.com/UKM/go/117442309/direct/01/' target='_new' rel=&quot;nofollow&quot;&gt;Search now&lt;/a&gt;&lt;/body&gt;
&lt;/html&gt;&lt;br /&gt;-------------------------------------------------------------------------
&lt;br&gt;This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
&lt;br&gt;Build the coolest Linux based applications with Moblin SDK &amp; win great prizes
&lt;br&gt;Grand prize is a trip for two to an Open Source event anywhere in the world
&lt;br&gt;&lt;a href=&quot;http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/&lt;/a&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;Perl-Win32-GUI-Users mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=20635765&amp;i=8&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Perl-Win32-GUI-Users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users&lt;/a&gt;&lt;br&gt;&lt;a href=&quot;http://perl-win32-gui.sourceforge.net/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://perl-win32-gui.sourceforge.net/&lt;/a&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/perl-win32-gui-users-f3462.html&quot; embed=&quot;fixTarget[3462]&quot; target=&quot;_top&quot; &gt;perl-win32-gui-users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/bitmap---getting-mouse-clicks-and-mouse-location-tp20549181p20635765.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-20629545</id>
	<title>Re: bitmap - getting mouse clicks and mouse location</title>
	<published>2008-11-21T13:08:47Z</published>
	<updated>2008-11-21T13:08:47Z</updated>
	<author>
		<name>pcourterelle</name>
	</author>
	<content type="html">&lt;br&gt;To get the absolute X and Y coordinates, would you have to subtract the
&lt;br&gt;position of the child (label) from the position of the parent (main window)?
&lt;br&gt;&lt;br&gt;pc
&lt;br&gt;&lt;br&gt;&lt;br&gt;-----Original Message-----
&lt;br&gt;From: zak3 [mailto:&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=20629545&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;zak31415@...&lt;/a&gt;] 
&lt;br&gt;Sent: Friday, November 21, 2008 2:21 AM
&lt;br&gt;To: &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=20629545&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;perl-win32-gui-users@...&lt;/a&gt;
&lt;br&gt;Subject: Re: [perl-win32-gui-users] bitmap - getting mouse clicks and mouse
&lt;br&gt;location
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;i have experemented using as a guide the message:
&lt;br&gt;&lt;a href=&quot;http://www.mail-archive.com/perl-win32-gui-users@lists.sourceforge.net/msg03&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.mail-archive.com/perl-win32-gui-users@.../msg03&lt;/a&gt;&lt;br&gt;025.html
&lt;br&gt;&lt;br&gt;here is a main form and a Label, when you click on the Label, the textfield
&lt;br&gt;control will show the coordinates of mouse cursor , it seems to me that
&lt;br&gt;those coordinated are relative to the screen, you may adapt the code to
&lt;br&gt;display the coordinates relative to the form or relative to the label, or a
&lt;br&gt;graphic control.
&lt;br&gt;&lt;br&gt;use strict;
&lt;br&gt;use warnings;
&lt;br&gt;use Win32::GUI();
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;my $W = new Win32::GUI::Window(
&lt;br&gt;&amp;nbsp;-name =&amp;gt; &amp;quot;W&amp;quot;,
&lt;br&gt;&amp;nbsp;-title =&amp;gt; &amp;quot;mouse click tracking&amp;quot;,
&lt;br&gt;&amp;nbsp;-left =&amp;gt; 54,
&lt;br&gt;&amp;nbsp;-top =&amp;gt; 77,
&lt;br&gt;&amp;nbsp;-width =&amp;gt; 546,
&lt;br&gt;&amp;nbsp;-height =&amp;gt; 318,
&lt;br&gt;&amp;nbsp;);
&lt;br&gt;&amp;nbsp;my $textfield = $W-&amp;gt;AddTextfield(
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-text &amp;nbsp; &amp;nbsp;=&amp;gt; &amp;quot;&amp;quot;,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-name &amp;nbsp; &amp;nbsp;=&amp;gt; &amp;quot;Textfield_1&amp;quot;,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-left &amp;nbsp; &amp;nbsp;=&amp;gt; 401,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-top &amp;nbsp; &amp;nbsp; =&amp;gt; 9,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-width &amp;nbsp; =&amp;gt; 129,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-height &amp;nbsp;=&amp;gt; 249,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-multiline &amp;nbsp; &amp;nbsp;=&amp;gt; 1,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-vscroll &amp;nbsp; &amp;nbsp;=&amp;gt; 1,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; );
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp;$W-&amp;gt;AddLabel(
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-text &amp;nbsp; &amp;nbsp;=&amp;gt; &amp;quot;zz&amp;quot;,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-name &amp;nbsp; &amp;nbsp;=&amp;gt; &amp;quot;Label_2&amp;quot;,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-left &amp;nbsp; &amp;nbsp;=&amp;gt; 0,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-top &amp;nbsp; &amp;nbsp; =&amp;gt; 0,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-width &amp;nbsp; =&amp;gt; 270,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-height &amp;nbsp;=&amp;gt; 232,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-foreground &amp;nbsp; &amp;nbsp;=&amp;gt; 0,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-background &amp;nbsp; &amp;nbsp;=&amp;gt; 12615935,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-notify =&amp;gt; 1,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-onMouseDown &amp;nbsp;=&amp;gt; sub { my($mx, $my) =
&lt;br&gt;Win32::GUI::GetCursorPos();$textfield -&amp;gt; Append( &amp;quot;$mx - $my \n&amp;quot;);},
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; );
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp;$W-&amp;gt;Show();
&lt;br&gt;&amp;nbsp;Win32::GUI::Dialog();
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;exit(0);
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;sub Window_Terminate {
&lt;br&gt;&amp;nbsp;return -1;
&lt;br&gt;&amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;iaagaiow wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Hello,
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I'm developing an app which will display a bitmap.? I want to be able to
&lt;br&gt;&amp;gt; detect mouse clicks on the bitmap and get the mouse cursor location when
&lt;br&gt;&amp;gt; clicks are detected.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Displaying the bitmap is easy - there are demos that show that.? I have
&lt;br&gt;&amp;gt; been trying to modify the demos to detect clicks and get the mouse cursor
&lt;br&gt;&amp;gt; location, but nothing has worked yet.? Have been going thru doc/demos/etc,
&lt;br&gt;&amp;gt; and will keep doing so, but if you happen to have experience with this
&lt;br&gt;&amp;gt; topic, please send me any pointers you can.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I have tried using GetCursorPos, but thus far seem to be getting undefined
&lt;br&gt;&amp;gt; return values.? As for the mouse click, tried setting up -onClick option
&lt;br&gt;&amp;gt; but this seems to be ignored.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Thanks for your time!
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Regards,
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; LP
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; -------------------------------------------------------------------------
&lt;br&gt;&amp;gt; This SF.Net email is sponsored by the Moblin Your Move Developer's
&lt;br&gt;&amp;gt; challenge
&lt;br&gt;&amp;gt; Build the coolest Linux based applications with Moblin SDK &amp; win great
&lt;br&gt;&amp;gt; prizes
&lt;br&gt;&amp;gt; Grand prize is a trip for two to an Open Source event anywhere in the
&lt;br&gt;&amp;gt; world
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/&lt;/a&gt;&lt;br&gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt; Perl-Win32-GUI-Users mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=20629545&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Perl-Win32-GUI-Users@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users&lt;/a&gt;&lt;br&gt;&amp;gt; &lt;a href=&quot;http://perl-win32-gui.sourceforge.net/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://perl-win32-gui.sourceforge.net/&lt;/a&gt;&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;-- 
&lt;br&gt;View this message in context:
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/bitmap---getting-mouse-clicks-and-mouse-location-tp205&quot; target=&quot;_top&quot;&gt;http://www.nabble.com/bitmap---getting-mouse-clicks-and-mouse-location-tp205&lt;/a&gt;&lt;br&gt;49181p20618513.html
&lt;br&gt;Sent from the perl-win32-gui-users mailing list archive at Nabble.com.
&lt;br&gt;&lt;br&gt;&lt;br&gt;-------------------------------------------------------------------------
&lt;br&gt;This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
&lt;br&gt;Build the coolest Linux based applications with Moblin SDK &amp; win great
&lt;br&gt;prizes
&lt;br&gt;Grand prize is a trip for two to an Open Source event anywhere in the world
&lt;br&gt;&lt;a href=&quot;http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Perl-Win32-GUI-Users mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=20629545&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Perl-Win32-GUI-Users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users&lt;/a&gt;&lt;br&gt;&lt;a href=&quot;http://perl-win32-gui.sourceforge.net/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://perl-win32-gui.sourceforge.net/&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;-------------------------------------------------------------------------
&lt;br&gt;This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
&lt;br&gt;Build the coolest Linux based applications with Moblin SDK &amp; win great prizes
&lt;br&gt;Grand prize is a trip for two to an Open Source event anywhere in the world
&lt;br&gt;&lt;a href=&quot;http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Perl-Win32-GUI-Users mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=20629545&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Perl-Win32-GUI-Users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users&lt;/a&gt;&lt;br&gt;&lt;a href=&quot;http://perl-win32-gui.sourceforge.net/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://perl-win32-gui.sourceforge.net/&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/perl-win32-gui-users-f3462.html&quot; embed=&quot;fixTarget[3462]&quot; target=&quot;_top&quot; &gt;perl-win32-gui-users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/bitmap---getting-mouse-clicks-and-mouse-location-tp20549181p20629545.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-20618513</id>
	<title>Re: bitmap - getting mouse clicks and mouse location</title>
	<published>2008-11-21T02:20:31Z</published>
	<updated>2008-11-21T02:20:31Z</updated>
	<author>
		<name>zak3</name>
	</author>
	<content type="html">i have experemented using as a guide the message:
&lt;br&gt;&lt;a href=&quot;http://www.mail-archive.com/perl-win32-gui-users@lists.sourceforge.net/msg03025.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.mail-archive.com/perl-win32-gui-users@lists.sourceforge.net/msg03025.html&lt;/a&gt;&lt;br&gt;&lt;br&gt;here is a main form and a Label, when you click on the Label, the textfield control will show the coordinates of mouse cursor , it seems to me that those coordinated are relative to the screen, you may adapt the code to display the coordinates relative to the form or relative to the label, or a graphic control.
&lt;br&gt;&lt;br&gt;use strict;
&lt;br&gt;use warnings;
&lt;br&gt;use Win32::GUI();
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;my $W = new Win32::GUI::Window(
&lt;br&gt;&amp;nbsp;-name =&amp;gt; &amp;quot;W&amp;quot;,
&lt;br&gt;&amp;nbsp;-title =&amp;gt; &amp;quot;mouse click tracking&amp;quot;,
&lt;br&gt;&amp;nbsp;-left =&amp;gt; 54,
&lt;br&gt;&amp;nbsp;-top =&amp;gt; 77,
&lt;br&gt;&amp;nbsp;-width =&amp;gt; 546,
&lt;br&gt;&amp;nbsp;-height =&amp;gt; 318,
&lt;br&gt;&amp;nbsp;);
&lt;br&gt;&amp;nbsp;my $textfield = $W-&amp;gt;AddTextfield(
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-text &amp;nbsp; &amp;nbsp;=&amp;gt; &amp;quot;&amp;quot;,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-name &amp;nbsp; &amp;nbsp;=&amp;gt; &amp;quot;Textfield_1&amp;quot;,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-left &amp;nbsp; &amp;nbsp;=&amp;gt; 401,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-top &amp;nbsp; &amp;nbsp; =&amp;gt; 9,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-width &amp;nbsp; =&amp;gt; 129,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-height &amp;nbsp;=&amp;gt; 249,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-multiline &amp;nbsp; &amp;nbsp;=&amp;gt; 1,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-vscroll &amp;nbsp; &amp;nbsp;=&amp;gt; 1,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; );
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp;$W-&amp;gt;AddLabel(
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-text &amp;nbsp; &amp;nbsp;=&amp;gt; &amp;quot;zz&amp;quot;,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-name &amp;nbsp; &amp;nbsp;=&amp;gt; &amp;quot;Label_2&amp;quot;,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-left &amp;nbsp; &amp;nbsp;=&amp;gt; 0,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-top &amp;nbsp; &amp;nbsp; =&amp;gt; 0,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-width &amp;nbsp; =&amp;gt; 270,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-height &amp;nbsp;=&amp;gt; 232,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-foreground &amp;nbsp; &amp;nbsp;=&amp;gt; 0,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-background &amp;nbsp; &amp;nbsp;=&amp;gt; 12615935,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-notify =&amp;gt; 1,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-onMouseDown &amp;nbsp;=&amp;gt; sub { my($mx, $my) = Win32::GUI::GetCursorPos();$textfield -&amp;gt; Append( &amp;quot;$mx - $my \n&amp;quot;);},
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; );
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp;$W-&amp;gt;Show();
&lt;br&gt;&amp;nbsp;Win32::GUI::Dialog();
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;exit(0);
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&amp;nbsp;sub Window_Terminate {
&lt;br&gt;&amp;nbsp;return -1;
&lt;br&gt;&amp;nbsp;}
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;iaagaiow wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;Hello,
&lt;br&gt;&lt;br&gt;I'm developing an app which will display a bitmap.? I want to be able to detect mouse clicks on the bitmap and get the mouse cursor location when clicks are detected.
&lt;br&gt;&lt;br&gt;Displaying the bitmap is easy - there are demos that show that.? I have been trying to modify the demos to detect clicks and get the mouse cursor location, but nothing has worked yet.? Have been going thru doc/demos/etc, and will keep doing so, but if you happen to have experience with this topic, please send me any pointers you can.
&lt;br&gt;&lt;br&gt;I have tried using GetCursorPos, but thus far seem to be getting undefined return values.? As for the mouse click, tried setting up -onClick option but this seems to be ignored.
&lt;br&gt;&lt;br&gt;Thanks for your time!
&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;&lt;br&gt;LP
&lt;br&gt;&lt;br&gt;-------------------------------------------------------------------------
&lt;br&gt;This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
&lt;br&gt;Build the coolest Linux based applications with Moblin SDK &amp; win great prizes
&lt;br&gt;Grand prize is a trip for two to an Open Source event anywhere in the world
&lt;br&gt;&lt;a href=&quot;http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Perl-Win32-GUI-Users mailing list
&lt;br&gt;Perl-Win32-GUI-Users@lists.sourceforge.net
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users&lt;/a&gt;&lt;br&gt;&lt;a href=&quot;http://perl-win32-gui.sourceforge.net/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://perl-win32-gui.sourceforge.net/&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/perl-win32-gui-users-f3462.html&quot; embed=&quot;fixTarget[3462]&quot; target=&quot;_top&quot; &gt;perl-win32-gui-users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/bitmap---getting-mouse-clicks-and-mouse-location-tp20549181p20618513.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-20549181</id>
	<title>bitmap - getting mouse clicks and mouse location</title>
	<published>2008-11-17T14:01:57Z</published>
	<updated>2008-11-17T14:01:57Z</updated>
	<author>
		<name>iaagaiow</name>
	</author>
	<content type="html">Hello,&lt;br&gt;
&lt;br&gt;
I'm developing an app which will display a bitmap.&amp;nbsp; I want to be able to detect mouse clicks on the bitmap and get the mouse cursor location when clicks are detected.&lt;br&gt;
&lt;br&gt;
Displaying the bitmap is easy - there are demos that show that.&amp;nbsp; I have been trying to modify the demos to detect clicks and get the mouse cursor location, but nothing has worked yet.&amp;nbsp; Have been going thru doc/demos/etc, and will keep doing so, but if you happen to have experience with this topic, please send me any pointers you can.&lt;br&gt;
&lt;br&gt;
I have tried using GetCursorPos, but thus far seem to be getting undefined return values.&amp;nbsp; As for the mouse click, tried setting up -onClick option but this seems to be ignored.&lt;br&gt;
&lt;br&gt;
Thanks for your time!&lt;br&gt;
&lt;br&gt;
Regards,&lt;br&gt;
&lt;br&gt;
LP&lt;br&gt;
&lt;div id='MAILCIADA018-5c804921e9d533a' class='aol_ad_footer'&gt;&lt;BR /&gt;&lt;FONT style=&quot;color: black; font: normal 10pt ARIAL, SAN-SERIF;&quot;&gt;&lt;HR style=&quot;MARGIN-TOP: 10px&quot;&gt;&lt;/HR&gt;Instant access to the latest &amp; most popular FREE games while you browse with the Games Toolbar - &lt;a href=&quot;http://pr.atwola.com/promoclk/100000075x1212904500x1200818240/aol?redir=http://toolbar.aol.com/games/download.html?ncid=emlweusdown00000004&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Download Now!&lt;/a&gt; &lt;/div&gt;
&lt;br /&gt;-------------------------------------------------------------------------
&lt;br&gt;This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
&lt;br&gt;Build the coolest Linux based applications with Moblin SDK &amp; win great prizes
&lt;br&gt;Grand prize is a trip for two to an Open Source event anywhere in the world
&lt;br&gt;&lt;a href=&quot;http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/&lt;/a&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;Perl-Win32-GUI-Users mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=20549181&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Perl-Win32-GUI-Users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users&lt;/a&gt;&lt;br&gt;&lt;a href=&quot;http://perl-win32-gui.sourceforge.net/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://perl-win32-gui.sourceforge.net/&lt;/a&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/perl-win32-gui-users-f3462.html&quot; embed=&quot;fixTarget[3462]&quot; target=&quot;_top&quot; &gt;perl-win32-gui-users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/bitmap---getting-mouse-clicks-and-mouse-location-tp20549181p20549181.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-20395328</id>
	<title>Re: SOLUTION --&gt; Newlines disappearing inrichedit(unicode-content)</title>
	<published>2008-11-08T03:56:33Z</published>
	<updated>2008-11-08T03:56:33Z</updated>
	<author>
		<name>Raphael Stoeckli</name>
	</author>
	<content type="html">Sory, some corrections of the last post (there was also a bug in the GetText-sub):
&lt;br&gt;&lt;br&gt;You need the pragmas:
&lt;br&gt;use utf8; # If you want to write unicode in your perl-file
&lt;br&gt;use use Encode qw/decode/;
&lt;br&gt;&lt;br&gt;If you want to define constants (you only need them, if you use the commented out lines in the function GetText, below):
&lt;br&gt;sub WM_USER() {1024};
&lt;br&gt;sub GT_DEFAULT() {0};
&lt;br&gt;sub EM_GETTEXTEX() {+WM_USER+94};
&lt;br&gt;&lt;br&gt;Here is the Get-function:
&lt;br&gt;sub GetText # gets unicode-textout of a richedit and returns it an string
&lt;br&gt;{
&lt;br&gt;my ($window, $richedit) = @_; # [0] = window-object, [1] = name oft the richedit-field
&lt;br&gt;&amp;nbsp; &amp;nbsp;my $maxlen = 1024;
&lt;br&gt;&amp;nbsp; &amp;nbsp;my $buffer = &amp;quot; &amp;quot; x $maxlen;
&lt;br&gt;&amp;nbsp; &amp;nbsp;my $flags = 0; # alternatively You can define the constant GT_DEFAULT in the header of the program --&amp;gt; 'sub GT_DEFAULT() {0};'
&lt;br&gt;&amp;nbsp; # my $flags = GT_DEFAULT; # defined with a constant
&lt;br&gt;&amp;nbsp; &amp;nbsp;my $codepage = 1200;
&lt;br&gt;&amp;nbsp; &amp;nbsp;my $struct = pack(&amp;quot;LLIpp&amp;quot;, $maxlen, $flags, $codepage, undef, undef);
&lt;br&gt;&amp;nbsp; &amp;nbsp;my $address = pack(&amp;quot;P20&amp;quot;, $struct);
&lt;br&gt;&amp;nbsp; &amp;nbsp;my $wparam = unpack(&amp;quot;L&amp;quot;, $address);
&lt;br&gt;&amp;nbsp; &amp;nbsp;my $numTchar = $window -&amp;gt; $richedit -&amp;gt; SendMessage(1118, $wparam, $buffer); # Alternatively You can define the message as constants WM_USER and EM_GETTEXTEX in the header of the program --&amp;gt; 'sub WM_USER() {1024};' and 'sub EM_GETTEXTEX() {+WM_USER+94};'
&lt;br&gt;&amp;nbsp; #my $numTchar = $window -&amp;gt; $richedit -&amp;gt; SendMessage(EM_GETTEXTEX, $wparam, $buffer); # defined with constants
&lt;br&gt;&amp;nbsp; &amp;nbsp;my $octets = substr($buffer, 0, ($numTchar*2));
&lt;br&gt;&amp;nbsp; &amp;nbsp;my $text = decode(&amp;quot;UCS-2LE&amp;quot;, $octets);
&lt;br&gt;&amp;nbsp; &amp;nbsp;return($text); # Returns a unicode-string
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;And the Set-function:
&lt;br&gt;sub SetText # prepares unicode-strings for the Text()-method of the richedit
&lt;br&gt;{
&lt;br&gt;my @input = @_;
&lt;br&gt;my $rtf_prolog = '{\rtf1'; # Minimal-RTF-Header. Define your own RTF-Header
&lt;br&gt;according the RTF-specs
&lt;br&gt;$input[0] =~ s/([^\x00-\x7F])/'\uc1\u'.((ord $1 &amp;lt; 32768)?ord $1 :
&lt;br&gt;ord($1)-65536).'?'/eg; # Converting unicode into 'escaped' RTF-format
&lt;br&gt;$input[0] =~ s/(\r\n)/\\par\r\n/g; # Converting common newlines (\r\n) into
&lt;br&gt;RTF-newlines (\par\r\n)
&lt;br&gt;return $rtf_prolog . $input[0] . '}'; # Returns the string as RTF
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;So if you want so get the text of the field, use:
&lt;br&gt;$SAVE = &amp;GetText($window,'richedit_field');
&lt;br&gt;&lt;br&gt;And to set it back, use:
&lt;br&gt;$window -&amp;gt; richdit_field -&amp;gt; Text(SetText($SAVE)); 
&lt;br&gt;&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;Raphael
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;On Do 06/11/08 22:00 , Raphael Stoeckli &amp;lt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=20395328&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;win32gui@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi Octavian and Glenn
&lt;br&gt;&amp;gt; The thing with the 'par' was the point.
&lt;br&gt;&amp;gt; The RTF-format is documented here:
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/aa140283(office.10).aspx&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://msdn.microsoft.com/en-us/library/aa140283(office.10).aspx&lt;/a&gt;&amp;nbsp;
&lt;br&gt;&amp;gt; i had to turn the 'rn' into '\parrn'.
&lt;br&gt;&amp;gt; So here is my solution to handle multiline-unicode-text with
&lt;br&gt;&amp;gt; richedit-fields.
&lt;br&gt;&amp;gt; You need the pragmas:
&lt;br&gt;&amp;gt; use utf8; # &amp;nbsp;'sub GT_DEFAULT() {0};'
&lt;br&gt;&amp;gt; #my $flags = $flags = GT_DEFAULT; # defined with a constant
&lt;br&gt;&amp;gt; my $codepage = 1200;
&lt;br&gt;&amp;gt; my $struct = pack(&amp;quot;LLIpp&amp;quot;, $maxlen, $flags, $codepage, undef,
&lt;br&gt;&amp;gt; undef);
&lt;br&gt;&amp;gt; my $address = pack(&amp;quot;P20&amp;quot;, $struct);
&lt;br&gt;&amp;gt; my $wparam = unpack(&amp;quot;L&amp;quot;, $address);
&lt;br&gt;&amp;gt; my $numTchar = $window -&amp;gt; $richedit -&amp;gt; SendMessage(1118, $wparam,
&lt;br&gt;&amp;gt; $buffer); #
&lt;br&gt;&amp;gt; Alternatively You can define the message as constants WM_USER and
&lt;br&gt;&amp;gt; EM_GETTEXTEX in
&lt;br&gt;&amp;gt; the header of the program --&amp;gt; 'sub WM_USER() {1024};' and 'sub
&lt;br&gt;&amp;gt; EM_GETTEXTEX()
&lt;br&gt;&amp;gt; {+WM_USER+94};'
&lt;br&gt;&amp;gt; # my $numTchar = $WIN -&amp;gt; re -&amp;gt; SendMessage(qw(EM_GETTEXTEX
&lt;br&gt;&amp;gt; {+WM_USER()
&lt;br&gt;&amp;gt; {1024}+94}), $wparam, $buffer); # defined with constants
&lt;br&gt;&amp;gt; my $octets = substr($buffer, 0, ($numTchar*2));
&lt;br&gt;&amp;gt; my $text = decode(&amp;quot;UCS-2LE&amp;quot;, $octets);
&lt;br&gt;&amp;gt; return($text); # Returns a unicode-string
&lt;br&gt;&amp;gt; }
&lt;br&gt;&amp;gt; And the Set-function:
&lt;br&gt;&amp;gt; sub SetText # prepares unicode-strings for the Text()-method of the
&lt;br&gt;&amp;gt; richedit
&lt;br&gt;&amp;gt; {
&lt;br&gt;&amp;gt; my @input = @_;
&lt;br&gt;&amp;gt; my $rtf_prolog &amp;nbsp;= '{rtf1'; # Minimal-RTF-Header. Define Your own
&lt;br&gt;&amp;gt; RTF-Header
&lt;br&gt;&amp;gt; according the RTF-specs
&lt;br&gt;&amp;gt; $input[0] =~ s/([^x00-x7F])/'uc1u'.((ord $1 &amp;lt; 32768)?ord $1 :
&lt;br&gt;&amp;gt; ord($1)-65536).'?'/eg; # Converting unicode into 'escaped'
&lt;br&gt;&amp;gt; RTF-format 
&lt;br&gt;&amp;gt; $input[0] =~ s/(rn)/\parrn/g; # Converting common newlines (rn) into
&lt;br&gt;&amp;gt; RTF-newlines (parrn)
&lt;br&gt;&amp;gt; return $rtf_prolog . $input[0] . '}'; # Returns the string as RTF
&lt;br&gt;&amp;gt; }
&lt;br&gt;&amp;gt; So if you want so get the text of the field, use:
&lt;br&gt;&amp;gt; $SAVE = &amp;GetText($window,'richedit_field');
&lt;br&gt;&amp;gt; And to set it back, use:
&lt;br&gt;&amp;gt; $window -&amp;gt; richdit_field -&amp;gt; Text(SetText($SAVE)); 
&lt;br&gt;&amp;gt; In this example, I made the function GetText variable, if you have
&lt;br&gt;&amp;gt; more than one
&lt;br&gt;&amp;gt; window or richedit-field.
&lt;br&gt;&amp;gt; Honestly, I tested this not to much. Newlines, tabs and spaces works
&lt;br&gt;&amp;gt; well. But i
&lt;br&gt;&amp;gt; don't know what happens, if there is something totally unexpected in
&lt;br&gt;&amp;gt; the richedit.
&lt;br&gt;&amp;gt; Feel free to ask, if anyone needs examples or further information to
&lt;br&gt;&amp;gt; the
&lt;br&gt;&amp;gt; functions above.
&lt;br&gt;&amp;gt; Again, thanks to all.
&lt;br&gt;&amp;gt; Regards,
&lt;br&gt;&amp;gt; Raphael
&lt;br&gt;&amp;gt; On Wed 05/11/08 22:49 , &amp;quot;Octavian Rasnita&amp;quot; &amp;nbsp;sent:
&lt;br&gt;&amp;gt; &amp;gt; If I remember well, you need to use
&lt;br&gt;&amp;gt; &amp;gt; par
&lt;br&gt;&amp;gt; &amp;gt; in the RTF document for specifying a new line.
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; Find and read the RTF specifications. It will help you to do more
&lt;br&gt;&amp;gt; other
&lt;br&gt;&amp;gt; &amp;gt; things.
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; Octavian
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; ----- Original Message ----- 
&lt;br&gt;&amp;gt; &amp;gt; From: &amp;quot;Raphael Stoeckli&amp;quot; &amp;nbsp;rabanti.ch&amp;gt;To: Sent: Wednesday,
&lt;br&gt;&amp;gt; November 05, 2008 10:05 PM
&lt;br&gt;&amp;gt; &amp;gt; Subject: [perl-win32-gui-users] Newlines disappearing in 
&lt;br&gt;&amp;gt; &amp;gt; richedit(unicode-content)
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; Hi @ all
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; I&amp;rsquo;m working on an program, that can handle
&lt;br&gt;&amp;gt; &amp;gt; Unicode-text in &amp;gt; richedit-fields.
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; The fields sets and gets the text using some
&lt;br&gt;&amp;gt; &amp;gt; modifications of the &amp;gt; richedit-field. These mods are also from
&lt;br&gt;&amp;gt; this
&lt;br&gt;&amp;gt; &amp;gt; mailinglist.&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; The problem is, that Newlines (rn) in strings
&lt;br&gt;&amp;gt; &amp;gt; (whether if it&amp;rsquo;s ASCII or &amp;gt; Unicode) seems to be wiped, when
&lt;br&gt;&amp;gt; I put the
&lt;br&gt;&amp;gt; &amp;gt; string into the modified &amp;gt; richedit-field.
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; I wrote a demo/test-program to show this
&lt;br&gt;&amp;gt; &amp;gt; behavior. You can get it here: &amp;gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://www.rabanti.ch/storage/rtf_utf_test.pl&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.rabanti.ch/storage/rtf_utf_test.pl&lt;/a&gt;&amp;nbsp;or
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; &lt;a href=&quot;http://www.rabanti.ch/storage/rtf_utf_test.zip&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.rabanti.ch/storage/rtf_utf_test.zip&lt;/a&gt;&amp;nbsp;(if
&lt;br&gt;&amp;gt; &amp;gt; there is a problem with &amp;gt; the encoding, while downloading)
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; Anyhow I try to describe it abbreviated in this
&lt;br&gt;&amp;gt; &amp;gt; post.&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; For saving Unicode-content into a string, I use
&lt;br&gt;&amp;gt; &amp;gt; these functions:&amp;gt; -------------------------------------
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; sub WM_USER() {1024};
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; sub EM_GETTEXTEX() {+WM_USER+94};
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; sub GT_DEFAULT() {0};
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; sub get_unicode # takes the text out of the
&lt;br&gt;&amp;gt; &amp;gt; richedit-field&amp;gt; {
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; &amp;nbsp; my $maxlen = 1024;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; &amp;nbsp; my $buffer = &amp;quot; &amp;quot; x
&lt;br&gt;&amp;gt; &amp;gt; $maxlen;&amp;gt; &amp;nbsp; my $flags = GT_DEFAULT;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; &amp;nbsp; my $codepage = 1200;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; &amp;nbsp; my $struct = pack(&amp;quot;LLIpp&amp;quot;, $maxlen,
&lt;br&gt;&amp;gt; &amp;gt; $flags, $codepage, undef, undef);&amp;gt; &amp;nbsp; my $address = pack(&amp;quot;P20&amp;quot;,
&lt;br&gt;&amp;gt; &amp;gt; $struct);&amp;gt; &amp;nbsp; my $wparam = unpack(&amp;quot;L&amp;quot;,
&lt;br&gt;&amp;gt; &amp;gt; $address);&amp;gt; &amp;nbsp; my $numTchar = $WIN -&amp;gt; re -&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; SendMessage(EM_GETTEXTEX, $wparam, &amp;gt; $buffer); # re is the
&lt;br&gt;&amp;gt; richedit-field, $WIN the
&lt;br&gt;&amp;gt; &amp;gt; window-object&amp;gt; &amp;nbsp; my $octets = substr($buffer, 0,
&lt;br&gt;&amp;gt; &amp;gt; ($numTchar*2));&amp;gt; &amp;nbsp; my $text = decode(&amp;quot;UCS-2LE&amp;quot;,
&lt;br&gt;&amp;gt; &amp;gt; $octets);&amp;gt; &amp;nbsp; return($text);
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; }
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; -------------------------------------
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; This is the richedit-field
&lt;br&gt;&amp;gt; &amp;gt; (simplified):&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; $RE = $WIN -&amp;gt; AddRichEdit(
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp;-name =&amp;gt; 're',
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp;-size =&amp;gt; [240, 80],
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp;-pushstyle =&amp;gt; WS_CHILD | WS_VISIBLE |
&lt;br&gt;&amp;gt; &amp;gt; WS_VSCROLL | WS_HSCROLL | ES_LEFT &amp;gt; | ES_MULTILINE,
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; );
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; -------------------------------------
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; I get the text out of the field like
&lt;br&gt;&amp;gt; &amp;gt; that:&amp;gt; $SAVE = &amp;get_unicode;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; When I try to write the string back into the
&lt;br&gt;&amp;gt; &amp;gt; field, I use this function &amp;gt; and definition:
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; -------------------------------------
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; our $RTF_PROLOG = '{rtf1';
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; sub string2rtf # string-converter for
&lt;br&gt;&amp;gt; &amp;gt; RTF-handling&amp;gt; {
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; my @input = @_;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp;$input[0] =~ s/([^x00-x7F])/'uc1u'.((ord
&lt;br&gt;&amp;gt; &amp;gt; $1 &amp;lt; 32768)?ord $1 : &amp;gt; ord($1)-65536).'?'/eg;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp;return $input[0];
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; }
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; -------------------------------------
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; I try to set the text like that:
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; $WIN -&amp;gt; re -&amp;gt; Text($RTF_PROLOG .
&lt;br&gt;&amp;gt; &amp;gt; string2rtf($SAVE) . '}');&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; The result is that all stored lines (in the
&lt;br&gt;&amp;gt; &amp;gt; string) appear on one single &amp;gt; line, without newlines.
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; The operation &amp;gt;&amp;gt; $input[0] =~
&lt;br&gt;&amp;gt; &amp;gt; s/([^x00-x7F])/'uc1u'.((ord $1 &amp;lt; &amp;gt; 32768)?ord $1 :
&lt;br&gt;&amp;gt; ord($1)-65536).'?'/eg; &amp;nbsp;seems to wipe the newlines. I &amp;gt; checked the
&lt;br&gt;&amp;gt; converted strings. The newlines
&lt;br&gt;&amp;gt; &amp;gt; (rn) are still there, &amp;gt; nonetheless the richedit-field do not
&lt;br&gt;&amp;gt; recognize
&lt;br&gt;&amp;gt; &amp;gt; them. If I use $WIN -&amp;gt; &amp;gt; re -&amp;gt; Text($SAVE), the Newlines are
&lt;br&gt;&amp;gt; &amp;gt; appearing, but the unicode is broken.&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; I think it's something about a sent
&lt;br&gt;&amp;gt; &amp;gt; (respectively not sent) system-signal. &amp;gt; But I have at this time
&lt;br&gt;&amp;gt; no plan about
&lt;br&gt;&amp;gt; these
&lt;br&gt;&amp;gt; &amp;gt; things.&amp;gt; I tested it on a Win2K (SP4)- System and a XP
&lt;br&gt;&amp;gt; &amp;gt; (SP3)-System with win32::GUI &amp;gt; v1.06 and Activestate Perl
&lt;br&gt;&amp;gt; v5.8.6.811
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; Can someone explain me this behavior, and get me
&lt;br&gt;&amp;gt; &amp;gt; a hint, how to correct &amp;gt; this?
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; Many thanks in advance!... and much sorry for
&lt;br&gt;&amp;gt; &amp;gt; the bad English.&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; Regards,
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; Raphael
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; -------------------------------------------------------------------------&amp;gt;
&lt;br&gt;&amp;gt; This
&lt;br&gt;&amp;gt; SF.Net email is sponsored by the Moblin
&lt;br&gt;&amp;gt; &amp;gt; Your Move Developer's &amp;gt; challenge
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; Build the coolest Linux based applications with
&lt;br&gt;&amp;gt; &amp;gt; Moblin SDK &amp; win great &amp;gt; prizes
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; Grand prize is a trip for two to an Open Source
&lt;br&gt;&amp;gt; &amp;gt; event anywhere in the &amp;gt; world
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; &lt;a href=&quot;http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/&amp;gt;&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/&amp;gt;&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;gt; _______________________________________________&amp;gt;
&lt;br&gt;&amp;gt; Perl-Win32-GUI-Users mailing list
&lt;br&gt;&amp;gt; &amp;gt; &amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-use&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-use&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;gt; rs&amp;gt; &lt;a href=&quot;http://perl-win32-gui.sourceforge.net/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://perl-win32-gui.sourceforge.net/&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; -------------------------------------------------------------------------
&lt;br&gt;&amp;gt; This SF.Net email is sponsored by the Moblin Your Move Developer's
&lt;br&gt;&amp;gt; challenge
&lt;br&gt;&amp;gt; Build the coolest Linux based applications with Moblin SDK &amp; win
&lt;br&gt;&amp;gt; great prizes
&lt;br&gt;&amp;gt; Grand prize is a trip for two to an Open Source event anywhere in
&lt;br&gt;&amp;gt; the world
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/&lt;/a&gt;&lt;br&gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt; Perl-Win32-GUI-Users mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users&lt;/a&gt;&lt;br&gt;&amp;gt; &lt;a href=&quot;http://perl-win32-gui.sourceforge.net/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://perl-win32-gui.sourceforge.net/&lt;/a&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;-------------------------------------------------------------------------
&lt;br&gt;This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
&lt;br&gt;Build the coolest Linux based applications with Moblin SDK &amp; win great prizes
&lt;br&gt;Grand prize is a trip for two to an Open Source event anywhere in the world
&lt;br&gt;&lt;a href=&quot;http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Perl-Win32-GUI-Users mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=20395328&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Perl-Win32-GUI-Users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users&lt;/a&gt;&lt;br&gt;&lt;a href=&quot;http://perl-win32-gui.sourceforge.net/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://perl-win32-gui.sourceforge.net/&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/perl-win32-gui-users-f3462.html&quot; embed=&quot;fixTarget[3462]&quot; target=&quot;_top&quot; &gt;perl-win32-gui-users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Re%3A-SOLUTION---%3E-Newlines-disappearing-inrichedit%28unicode-content%29-tp20395328p20395328.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-20371694</id>
	<title>Re: Threads</title>
	<published>2008-11-06T15:06:30Z</published>
	<updated>2008-11-06T15:06:30Z</updated>
	<author>
		<name>Jeremy White-3</name>
	</author>
	<content type="html">&lt;br&gt;&lt;br&gt;&amp;gt; I thought only the main thread can be used to create GUI elements reliably. 
&lt;br&gt;&amp;gt; Isn't that true?
&lt;br&gt;&lt;br&gt;No. As long as you are using the latest version of Win32::GUI and a late perl (5.8.7 +) you can have any number of threads creating GUI objects (a separate message pump will be created in each thread - so when one thread/window is frozen becuase it's doing work, all other thread/windows will still work).
&lt;br&gt;&lt;br&gt;The big problem becomes when you want to share Win32::GUI objects (the handles) between threads - for some things you'll be OK, for others you may get burnt (this is a windows issue rather than Win32::GUI). The best solution is to use the Win32::GUI object in the thread that created it and use thread safe queues to communicate between threads.
&lt;br&gt;&lt;br&gt;You are also safe when other perl modules create threads (perl and C threads) and comunicate back to the thread with the Win32::GUI GUI. 
&lt;br&gt;&lt;br&gt;For some examples on how easy threading can be with Win32::GUI have a look at: 
&lt;br&gt;&lt;br&gt;Win32::GUI::ThreadUtils @ &lt;a href=&quot;http://www.robmay.me.uk/win32gui&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.robmay.me.uk/win32gui&lt;/a&gt;&lt;br&gt;&lt;br&gt;The module is flaged as experimental, but it will give a good intro. Has some examples of various threading models - boss/worker etc.
&lt;br&gt;&lt;br&gt;Cheers,
&lt;br&gt;&lt;br&gt;Jeremy.
&lt;br&gt;&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Octavian
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; ----- Original Message ----- 
&lt;br&gt;&amp;gt; From: &amp;quot;Perl Rob&amp;quot; 
&lt;br&gt;&amp;gt; To: 
&lt;br&gt;&amp;gt; Sent: Thursday, November 06, 2008 6:52 PM
&lt;br&gt;&amp;gt; Subject: [perl-win32-gui-users] Threads
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; Hi all,
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Am I susceptible to a crash if I create a Win32::GUI object (such as a
&lt;br&gt;&amp;gt;&amp;gt; label) in one thread, then call methods on that object in another thread?
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Following is an example of what I mean. Notice that I'm passing the label
&lt;br&gt;&amp;gt;&amp;gt; object as an argument to the entry point function of the new thread. This
&lt;br&gt;&amp;gt;&amp;gt; seems to work, but I don't know if I should be doing it just because it
&lt;br&gt;&amp;gt;&amp;gt; works:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; use strict;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; use Win32::GUI();
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; use threads;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; my $main = Win32::GUI::Window-&amp;gt;new
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; (
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp;-name =&amp;gt; 'Main',
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp;-text =&amp;gt; 'Template Window',
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp;-size =&amp;gt; [300,300],
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; );
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; my $label = $main-&amp;gt;AddLabel
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; (
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp;-text =&amp;gt; 'I like the number 10',
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp;-pos &amp;nbsp;=&amp;gt; [10,10],
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; );
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; threads-&amp;gt;create('countDown', $label);
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; $main-&amp;gt;Center();
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; $main-&amp;gt;Show();
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Win32::GUI::Dialog();
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; sub countDown
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; {
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp;my $labelObject = shift;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp;for (my $i=9; $i&amp;gt;0; $i--)
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp;{
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$labelObject-&amp;gt;Text(&amp;quot;I like the number $i&amp;quot;);
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;sleep(1);
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; }
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Thanks,
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Rob
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; --------------------------------------------------------------------------------
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; -------------------------------------------------------------------------
&lt;br&gt;&amp;gt;&amp;gt; This SF.Net email is sponsored by the Moblin Your Move Developer's 
&lt;br&gt;&amp;gt;&amp;gt; challenge
&lt;br&gt;&amp;gt;&amp;gt; Build the coolest Linux based applications with Moblin SDK &amp; win great 
&lt;br&gt;&amp;gt;&amp;gt; prizes
&lt;br&gt;&amp;gt;&amp;gt; Grand prize is a trip for two to an Open Source event anywhere in the 
&lt;br&gt;&amp;gt;&amp;gt; world
&lt;br&gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/&lt;/a&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; --------------------------------------------------------------------------------
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt;&amp;gt; Perl-Win32-GUI-Users mailing list
&lt;br&gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=20371694&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Perl-Win32-GUI-Users@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt; &lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://perl-win32-gui.sourceforge.net/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://perl-win32-gui.sourceforge.net/&lt;/a&gt;&amp;nbsp;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; -------------------------------------------------------------------------
&lt;br&gt;&amp;gt; This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
&lt;br&gt;&amp;gt; Build the coolest Linux based applications with Moblin SDK &amp; win great prizes
&lt;br&gt;&amp;gt; Grand prize is a trip for two to an Open Source event anywhere in the world
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/&lt;/a&gt;&lt;br&gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt; Perl-Win32-GUI-Users mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=20371694&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Perl-Win32-GUI-Users@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users&lt;/a&gt;&lt;br&gt;&amp;gt; &lt;a href=&quot;http://perl-win32-gui.sourceforge.net/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://perl-win32-gui.sourceforge.net/&lt;/a&gt;&lt;/div&gt;&lt;br&gt;_________________________________________________________________
&lt;br&gt;BigSnapSearch.com - 24 prizes a day, every day - Search Now!
&lt;br&gt;&lt;a href=&quot;http://clk.atdmt.com/UKM/go/117442309/direct/01/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://clk.atdmt.com/UKM/go/117442309/direct/01/&lt;/a&gt;&lt;br&gt;-------------------------------------------------------------------------
&lt;br&gt;This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
&lt;br&gt;Build the coolest Linux based applications with Moblin SDK &amp; win great prizes
&lt;br&gt;Grand prize is a trip for two to an Open Source event anywhere in the world
&lt;br&gt;&lt;a href=&quot;http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Perl-Win32-GUI-Users mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=20371694&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Perl-Win32-GUI-Users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users&lt;/a&gt;&lt;br&gt;&lt;a href=&quot;http://perl-win32-gui.sourceforge.net/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://perl-win32-gui.sourceforge.net/&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/perl-win32-gui-users-f3462.html&quot; embed=&quot;fixTarget[3462]&quot; target=&quot;_top&quot; &gt;perl-win32-gui-users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Threads-tp20365052p20371694.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-20369623</id>
	<title>Re: SOLUTION --&gt; Newlines disappearing in richedit(unicode-content)</title>
	<published>2008-11-06T13:00:52Z</published>
	<updated>2008-11-06T13:00:52Z</updated>
	<author>
		<name>Raphael Stoeckli</name>
	</author>
	<content type="html">Hi Octavian and Glenn
&lt;br&gt;&lt;br&gt;The thing with the '\par' was the point.
&lt;br&gt;The RTF-format is documented here:
&lt;br&gt;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/aa140283(office.10).aspx&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://msdn.microsoft.com/en-us/library/aa140283(office.10).aspx&lt;/a&gt;&amp;nbsp;
&lt;br&gt;&lt;br&gt;i had to turn the '\r\n' into '\\par\r\n'.
&lt;br&gt;&lt;br&gt;So here is my solution to handle multiline-unicode-text with richedit-fields.
&lt;br&gt;&lt;br&gt;You need the pragmas:
&lt;br&gt;use utf8; # &amp;nbsp;'sub GT_DEFAULT() {0};'
&lt;br&gt;&amp;nbsp; #my $flags = $flags = GT_DEFAULT; # defined with a constant
&lt;br&gt;&amp;nbsp; &amp;nbsp;my $codepage = 1200;
&lt;br&gt;&amp;nbsp; &amp;nbsp;my $struct = pack(&amp;quot;LLIpp&amp;quot;, $maxlen, $flags, $codepage, undef, undef);
&lt;br&gt;&amp;nbsp; &amp;nbsp;my $address = pack(&amp;quot;P20&amp;quot;, $struct);
&lt;br&gt;&amp;nbsp; &amp;nbsp;my $wparam = unpack(&amp;quot;L&amp;quot;, $address);
&lt;br&gt;&amp;nbsp; &amp;nbsp;my $numTchar = $window -&amp;gt; $richedit -&amp;gt; SendMessage(1118, $wparam, $buffer); #
&lt;br&gt;Alternatively You can define the message as constants WM_USER and EM_GETTEXTEX in
&lt;br&gt;the header of the program --&amp;gt; 'sub WM_USER() {1024};' and 'sub EM_GETTEXTEX()
&lt;br&gt;{+WM_USER+94};'
&lt;br&gt;&amp;nbsp; # my $numTchar = $WIN -&amp;gt; re -&amp;gt; SendMessage(qw(EM_GETTEXTEX {+WM_USER()
&lt;br&gt;{1024}+94}), $wparam, $buffer); # defined with constants
&lt;br&gt;&amp;nbsp; &amp;nbsp;my $octets = substr($buffer, 0, ($numTchar*2));
&lt;br&gt;&amp;nbsp; &amp;nbsp;my $text = decode(&amp;quot;UCS-2LE&amp;quot;, $octets);
&lt;br&gt;&amp;nbsp; &amp;nbsp;return($text); # Returns a unicode-string
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;&lt;br&gt;And the Set-function:
&lt;br&gt;&lt;br&gt;sub SetText # prepares unicode-strings for the Text()-method of the richedit
&lt;br&gt;{
&lt;br&gt;my @input = @_;
&lt;br&gt;my $rtf_prolog &amp;nbsp;= '{\rtf1'; # Minimal-RTF-Header. Define Your own RTF-Header
&lt;br&gt;according the RTF-specs
&lt;br&gt;&amp;nbsp; &amp;nbsp; $input[0] =~ s/([^\x00-\x7F])/'\uc1\u'.((ord $1 &amp;lt; 32768)?ord $1 :
&lt;br&gt;ord($1)-65536).'?'/eg; # Converting unicode into 'escaped' RTF-format 
&lt;br&gt;&amp;nbsp; &amp;nbsp; $input[0] =~ s/(\r\n)/\\par\r\n/g; # Converting common newlines (\r\n) into
&lt;br&gt;RTF-newlines (\par\r\n)
&lt;br&gt;&amp;nbsp; &amp;nbsp; return $rtf_prolog . $input[0] . '}'; # Returns the string as RTF
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;&lt;br&gt;So if you want so get the text of the field, use:
&lt;br&gt;$SAVE = &amp;GetText($window,'richedit_field');
&lt;br&gt;&lt;br&gt;And to set it back, use:
&lt;br&gt;$window -&amp;gt; richdit_field -&amp;gt; Text(SetText($SAVE)); 
&lt;br&gt;&lt;br&gt;In this example, I made the function GetText variable, if you have more than one
&lt;br&gt;window or richedit-field.
&lt;br&gt;Honestly, I tested this not to much. Newlines, tabs and spaces works well. But i
&lt;br&gt;don't know what happens, if there is something totally unexpected in the richedit.
&lt;br&gt;&lt;br&gt;Feel free to ask, if anyone needs examples or further information to the
&lt;br&gt;functions above.
&lt;br&gt;Again, thanks to all.
&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;Raphael
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;On Wed 05/11/08 22:49 , &amp;quot;Octavian Rasnita&amp;quot; &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=20369623&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;orasnita@...&lt;/a&gt; sent:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; If I remember well, you need to use
&lt;br&gt;&amp;gt; \par
&lt;br&gt;&amp;gt; in the RTF document for specifying a new line.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Find and read the RTF specifications. It will help you to do more other
&lt;br&gt;&amp;gt; things.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Octavian
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; ----- Original Message ----- 
&lt;br&gt;&amp;gt; From: &amp;quot;Raphael Stoeckli&amp;quot; &amp;nbsp;rabanti.ch&amp;gt;To: Sent: Wednesday,
&lt;/div&gt;November 05, 2008 10:05 PM
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Subject: [perl-win32-gui-users] Newlines disappearing in 
&lt;br&gt;&amp;gt; richedit(unicode-content)
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; Hi @ all
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; I’m working on an program, that can handle
&lt;br&gt;&amp;gt; Unicode-text in &amp;gt; richedit-fields.
&lt;br&gt;&amp;gt; &amp;gt; The fields sets and gets the text using some
&lt;br&gt;&amp;gt; modifications of the &amp;gt; richedit-field. These mods are also from this
&lt;br&gt;&amp;gt; mailinglist.&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; The problem is, that Newlines (\r\n) in strings
&lt;br&gt;&amp;gt; (whether if it’s ASCII or &amp;gt; Unicode) seems to be wiped, when I put the
&lt;br&gt;&amp;gt; string into the modified &amp;gt; richedit-field.
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; I wrote a demo/test-program to show this
&lt;br&gt;&amp;gt; behavior. You can get it here: &amp;gt; &lt;a href=&quot;http://www.rabanti.ch/storage/rtf_utf_test.pl&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.rabanti.ch/storage/rtf_utf_test.pl&lt;/a&gt;&amp;nbsp;or
&lt;br&gt;&amp;gt; &amp;gt; &lt;a href=&quot;http://www.rabanti.ch/storage/rtf_utf_test.zip&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.rabanti.ch/storage/rtf_utf_test.zip&lt;/a&gt;&amp;nbsp;(if
&lt;br&gt;&amp;gt; there is a problem with &amp;gt; the encoding, while downloading)
&lt;br&gt;&amp;gt; &amp;gt; Anyhow I try to describe it abbreviated in this
&lt;br&gt;&amp;gt; post.&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; For saving Unicode-content into a string, I use
&lt;br&gt;&amp;gt; these functions:&amp;gt; -------------------------------------
&lt;br&gt;&amp;gt; &amp;gt; sub WM_USER() {1024};
&lt;br&gt;&amp;gt; &amp;gt; sub EM_GETTEXTEX() {+WM_USER+94};
&lt;br&gt;&amp;gt; &amp;gt; sub GT_DEFAULT() {0};
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; sub get_unicode # takes the text out of the
&lt;br&gt;&amp;gt; richedit-field&amp;gt; {
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; my $maxlen = 1024;
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; my $buffer = &amp;quot; &amp;quot; x
&lt;br&gt;&amp;gt; $maxlen;&amp;gt; &amp;nbsp; my $flags = GT_DEFAULT;
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; my $codepage = 1200;
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; my $struct = pack(&amp;quot;LLIpp&amp;quot;, $maxlen,
&lt;br&gt;&amp;gt; $flags, $codepage, undef, undef);&amp;gt; &amp;nbsp; my $address = pack(&amp;quot;P20&amp;quot;,
&lt;br&gt;&amp;gt; $struct);&amp;gt; &amp;nbsp; my $wparam = unpack(&amp;quot;L&amp;quot;,
&lt;br&gt;&amp;gt; $address);&amp;gt; &amp;nbsp; my $numTchar = $WIN -&amp;gt; re -&amp;gt;
&lt;br&gt;&amp;gt; SendMessage(EM_GETTEXTEX, $wparam, &amp;gt; $buffer); # re is the richedit-field, $WIN the
&lt;br&gt;&amp;gt; window-object&amp;gt; &amp;nbsp; my $octets = substr($buffer, 0,
&lt;br&gt;&amp;gt; ($numTchar*2));&amp;gt; &amp;nbsp; my $text = decode(&amp;quot;UCS-2LE&amp;quot;,
&lt;br&gt;&amp;gt; $octets);&amp;gt; &amp;nbsp; return($text);
&lt;br&gt;&amp;gt; &amp;gt; }
&lt;br&gt;&amp;gt; &amp;gt; -------------------------------------
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; This is the richedit-field
&lt;br&gt;&amp;gt; (simplified):&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; $RE = $WIN -&amp;gt; AddRichEdit(
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp;-name =&amp;gt; 're',
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp;-size =&amp;gt; [240, 80],
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp;-pushstyle =&amp;gt; WS_CHILD | WS_VISIBLE |
&lt;br&gt;&amp;gt; WS_VSCROLL | WS_HSCROLL | ES_LEFT &amp;gt; | ES_MULTILINE,
&lt;br&gt;&amp;gt; &amp;gt; );
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; -------------------------------------
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; I get the text out of the field like
&lt;br&gt;&amp;gt; that:&amp;gt; $SAVE = &amp;get_unicode;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; When I try to write the string back into the
&lt;br&gt;&amp;gt; field, I use this function &amp;gt; and definition:
&lt;br&gt;&amp;gt; &amp;gt; -------------------------------------
&lt;br&gt;&amp;gt; &amp;gt; our $RTF_PROLOG = '{\rtf1';
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; sub string2rtf # string-converter for
&lt;br&gt;&amp;gt; RTF-handling&amp;gt; {
&lt;br&gt;&amp;gt; &amp;gt; my @input = @_;
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp;$input[0] =~ s/([^\x00-\x7F])/'\uc1\u'.((ord
&lt;br&gt;&amp;gt; $1 &amp;lt; 32768)?ord $1 : &amp;gt; ord($1)-65536).'?'/eg;
&lt;br&gt;&amp;gt; &amp;gt; &amp;nbsp; &amp;nbsp;return $input[0];
&lt;br&gt;&amp;gt; &amp;gt; }
&lt;br&gt;&amp;gt; &amp;gt; -------------------------------------
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; I try to set the text like that:
&lt;br&gt;&amp;gt; &amp;gt; $WIN -&amp;gt; re -&amp;gt; Text($RTF_PROLOG .
&lt;br&gt;&amp;gt; string2rtf($SAVE) . '}');&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; The result is that all stored lines (in the
&lt;br&gt;&amp;gt; string) appear on one single &amp;gt; line, without newlines.
&lt;br&gt;&amp;gt; &amp;gt; The operation &amp;gt;&amp;gt; $input[0] =~
&lt;br&gt;&amp;gt; s/([^\x00-\x7F])/'\uc1\u'.((ord $1 &amp;lt; &amp;gt; 32768)?ord $1 : ord($1)-65536).'?'/eg; &amp;nbsp;seems to wipe the newlines. I &amp;gt; checked the converted strings. The newlines
&lt;br&gt;&amp;gt; (\r\n) are still there, &amp;gt; nonetheless the richedit-field do not recognize
&lt;br&gt;&amp;gt; them. If I use $WIN -&amp;gt; &amp;gt; re -&amp;gt; Text($SAVE), the Newlines are
&lt;br&gt;&amp;gt; appearing, but the unicode is broken.&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; I think it's something about a sent
&lt;br&gt;&amp;gt; (respectively not sent) system-signal. &amp;gt; But I have at this time no plan about
&lt;/div&gt;these
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; things.&amp;gt; I tested it on a Win2K (SP4)- System and a XP
&lt;br&gt;&amp;gt; (SP3)-System with win32::GUI &amp;gt; v1.06 and Activestate Perl v5.8.6.811
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Can someone explain me this behavior, and get me
&lt;br&gt;&amp;gt; a hint, how to correct &amp;gt; this?
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Many thanks in advance!... and much sorry for
&lt;br&gt;&amp;gt; the bad English.&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Regards,
&lt;br&gt;&amp;gt; &amp;gt; Raphael
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; -------------------------------------------------------------------------&amp;gt; This
&lt;/div&gt;SF.Net email is sponsored by the Moblin
&lt;br&gt;&amp;gt; Your Move Developer's &amp;gt; challenge
&lt;br&gt;&amp;gt; &amp;gt; Build the coolest Linux based applications with
&lt;br&gt;&amp;gt; Moblin SDK &amp; win great &amp;gt; prizes
&lt;br&gt;&amp;gt; &amp;gt; Grand prize is a trip for two to an Open Source
&lt;br&gt;&amp;gt; event anywhere in the &amp;gt; world
&lt;br&gt;&amp;gt; &amp;gt; &lt;a href=&quot;http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; _______________________________________________&amp;gt; Perl-Win32-GUI-Users mailing list
&lt;br&gt;&amp;gt; &amp;gt; &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=20369623&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Perl-Win32-GUI-Users@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-use&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-use&lt;/a&gt;&lt;br&gt;&amp;gt; rs&amp;gt; &lt;a href=&quot;http://perl-win32-gui.sourceforge.net/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://perl-win32-gui.sourceforge.net/&lt;/a&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&lt;br&gt;&lt;br&gt;-------------------------------------------------------------------------
&lt;br&gt;This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
&lt;br&gt;Build the coolest Linux based applications with Moblin SDK &amp; win great prizes
&lt;br&gt;Grand prize is a trip for two to an Open Source event anywhere in the world
&lt;br&gt;&lt;a href=&quot;http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Perl-Win32-GUI-Users mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=20369623&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Perl-Win32-GUI-Users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users&lt;/a&gt;&lt;br&gt;&lt;a href=&quot;http://perl-win32-gui.sourceforge.net/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://perl-win32-gui.sourceforge.net/&lt;/a&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/perl-win32-gui-users-f3462.html&quot; embed=&quot;fixTarget[3462]&quot; target=&quot;_top&quot; &gt;perl-win32-gui-users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Re%3A-SOLUTION---%3E-Newlines-disappearing-in-richedit%28unicode-content%29-tp20369623p20369623.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-20368627</id>
	<title>Re: Threads</title>
	<published>2008-11-06T11:58:10Z</published>
	<updated>2008-11-06T11:58:10Z</updated>
	<author>
		<name>Octavian Rasnita-2</name>
	</author>
	<content type="html">I thought only the main thread can be used to create GUI elements reliably. 
&lt;br&gt;Isn't that true?
&lt;br&gt;&lt;br&gt;Octavian
&lt;br&gt;&lt;br&gt;----- Original Message ----- 
&lt;br&gt;From: &amp;quot;Perl Rob&amp;quot; &amp;lt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=20368627&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;perlrob@...&lt;/a&gt;&amp;gt;
&lt;br&gt;To: &amp;lt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=20368627&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;perl-win32-gui-users@...&lt;/a&gt;&amp;gt;
&lt;br&gt;Sent: Thursday, November 06, 2008 6:52 PM
&lt;br&gt;Subject: [perl-win32-gui-users] Threads
&lt;br&gt;&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi all,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Am I susceptible to a crash if I create a Win32::GUI object (such as a
&lt;br&gt;&amp;gt; label) in one thread, then call methods on that object in another thread?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Following is an example of what I mean. Notice that I'm passing the label
&lt;br&gt;&amp;gt; object as an argument to the entry point function of the new thread. This
&lt;br&gt;&amp;gt; seems to work, but I don't know if I should be doing it just because it
&lt;br&gt;&amp;gt; works:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; use strict;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; use Win32::GUI();
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; use threads;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; my $main = Win32::GUI::Window-&amp;gt;new
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; (
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;-name =&amp;gt; 'Main',
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;-text =&amp;gt; 'Template Window',
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;-size =&amp;gt; [300,300],
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; );
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; my $label = $main-&amp;gt;AddLabel
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; (
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;-text =&amp;gt; 'I like the number 10',
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;-pos &amp;nbsp;=&amp;gt; [10,10],
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; );
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; threads-&amp;gt;create('countDown', $label);
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; $main-&amp;gt;Center();
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; $main-&amp;gt;Show();
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Win32::GUI::Dialog();
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; sub countDown
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; {
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;my $labelObject = shift;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;for (my $i=9; $i&amp;gt;0; $i--)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;{
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;$labelObject-&amp;gt;Text(&amp;quot;I like the number $i&amp;quot;);
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;sleep(1);
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; }
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Thanks,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Rob
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;--------------------------------------------------------------------------------
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;gt; -------------------------------------------------------------------------
&lt;br&gt;&amp;gt; This SF.Net email is sponsored by the Moblin Your Move Developer's 
&lt;br&gt;&amp;gt; challenge
&lt;br&gt;&amp;gt; Build the coolest Linux based applications with Moblin SDK &amp; win great 
&lt;br&gt;&amp;gt; prizes
&lt;br&gt;&amp;gt; Grand prize is a trip for two to an Open Source event anywhere in the 
&lt;br&gt;&amp;gt; world
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;--------------------------------------------------------------------------------
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt; Perl-Win32-GUI-Users mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=20368627&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Perl-Win32-GUI-Users@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users&lt;/a&gt;&lt;br&gt;&amp;gt; &lt;a href=&quot;http://perl-win32-gui.sourceforge.net/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://perl-win32-gui.sourceforge.net/&lt;/a&gt;&amp;nbsp;
&lt;br&gt;&lt;br&gt;&lt;br&gt;-------------------------------------------------------------------------
&lt;br&gt;This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
&lt;br&gt;Build the coolest Linux based applications with Moblin SDK &amp; win great prizes
&lt;br&gt;Grand prize is a trip for two to an Open Source event anywhere in the world
&lt;br&gt;&lt;a href=&quot;http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/&lt;/a&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Perl-Win32-GUI-Users mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=20368627&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Perl-Win32-GUI-Users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users&lt;/a&gt;&lt;br&gt;&lt;a href=&quot;http://perl-win32-gui.sourceforge.net/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://perl-win32-gui.sourceforge.net/&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/perl-win32-gui-users-f3462.html&quot; embed=&quot;fixTarget[3462]&quot; target=&quot;_top&quot; &gt;perl-win32-gui-users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Threads-tp20365052p20368627.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-20365052</id>
	<title>Threads</title>
	<published>2008-11-06T08:52:04Z</published>
	<updated>2008-11-06T08:52:04Z</updated>
	<author>
		<name>Perl Rob</name>
	</author>
	<content type="html">&lt;html xmlns:o=&quot;urn:schemas-microsoft-com:office:office&quot; xmlns:w=&quot;urn:schemas-microsoft-com:office:word&quot; xmlns:st1=&quot;urn:schemas-microsoft-com:office:smarttags&quot; xmlns=&quot;http://www.w3.org/TR/REC-html40&quot;&gt;

&lt;head&gt;
&lt;meta http-equiv=Content-Type content=&quot;text/html; charset=us-ascii&quot;&gt;
&lt;meta name=Generator content=&quot;Microsoft Word 11 (filtered medium)&quot;&gt;
&lt;o:SmartTagType namespaceuri=&quot;urn:schemas-microsoft-com:office:smarttags&quot; name=&quot;place&quot; /&gt;
&lt;!--[if !mso]&gt;
&lt;style&gt;
st1\:*{behavior:url(#default#ieooui) }
&lt;/style&gt;
&lt;![endif]--&gt;


&lt;/head&gt;

&lt;body lang=EN-US link=blue vlink=purple&gt;

&lt;div class=Section1&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=Arial&gt;&lt;span style='font-size:10.0pt;
font-family:Arial'&gt;Hi all,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=Arial&gt;&lt;span style='font-size:10.0pt;
font-family:Arial'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=Arial&gt;&lt;span style='font-size:10.0pt;
font-family:Arial'&gt;Am I susceptible to a crash if I create a Win32::GUI object
(such as a label) in one thread, then call methods on that object in another
thread?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=Arial&gt;&lt;span style='font-size:10.0pt;
font-family:Arial'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=Arial&gt;&lt;span style='font-size:10.0pt;
font-family:Arial'&gt;Following is an example of what I mean. Notice that I'm
passing the label object as an argument to the entry point function of the new
thread. This seems to work, but I don't know if I should be doing it just
because it works:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=Arial&gt;&lt;span style='font-size:10.0pt;
font-family:Arial'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;
font-family:&quot;Courier New&quot;'&gt;use strict;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;
font-family:&quot;Courier New&quot;'&gt;use Win32::GUI();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;
font-family:&quot;Courier New&quot;'&gt;use threads;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;
font-family:&quot;Courier New&quot;'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;
font-family:&quot;Courier New&quot;'&gt;my $main = Win32::GUI::Window-&amp;gt;new&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;
font-family:&quot;Courier New&quot;'&gt;(&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;
font-family:&quot;Courier New&quot;'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -name =&amp;gt; '&lt;st1:place w:st=&quot;on&quot;&gt;Main&lt;/st1:place&gt;',&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;
font-family:&quot;Courier New&quot;'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -text =&amp;gt; 'Template Window',&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;
font-family:&quot;Courier New&quot;'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -size =&amp;gt; [300,300],&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;
font-family:&quot;Courier New&quot;'&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;
font-family:&quot;Courier New&quot;'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;
font-family:&quot;Courier New&quot;'&gt;my $label = $main-&amp;gt;AddLabel&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;
font-family:&quot;Courier New&quot;'&gt;(&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;
font-family:&quot;Courier New&quot;'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -text =&amp;gt; 'I like the number
10',&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;
font-family:&quot;Courier New&quot;'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -pos&amp;nbsp; =&amp;gt; [10,10],&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;
font-family:&quot;Courier New&quot;'&gt;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;
font-family:&quot;Courier New&quot;'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;
font-family:&quot;Courier New&quot;'&gt;threads-&amp;gt;create('countDown', $label);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;
font-family:&quot;Courier New&quot;'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;
font-family:&quot;Courier New&quot;'&gt;$main-&amp;gt;Center();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;
font-family:&quot;Courier New&quot;'&gt;$main-&amp;gt;Show();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;
font-family:&quot;Courier New&quot;'&gt;Win32::GUI::Dialog();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;
font-family:&quot;Courier New&quot;'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;
font-family:&quot;Courier New&quot;'&gt;sub countDown&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;
font-family:&quot;Courier New&quot;'&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;
font-family:&quot;Courier New&quot;'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; my $labelObject = shift;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;
font-family:&quot;Courier New&quot;'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;
font-family:&quot;Courier New&quot;'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for (my $i=9; $i&amp;gt;0; $i--)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;
font-family:&quot;Courier New&quot;'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;
font-family:&quot;Courier New&quot;'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $labelObject-&amp;gt;Text(&amp;quot;I
like the number $i&amp;quot;);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;
font-family:&quot;Courier New&quot;'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sleep(1);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;
font-family:&quot;Courier New&quot;'&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=&quot;Courier New&quot;&gt;&lt;span style='font-size:10.0pt;
font-family:&quot;Courier New&quot;'&gt;}&lt;/span&gt;&lt;/font&gt;&lt;font face=Arial&gt;&lt;span style='font-family:Arial'&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=Arial&gt;&lt;span style='font-size:10.0pt;
font-family:Arial'&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=Arial&gt;&lt;span style='font-size:10.0pt;
font-family:Arial'&gt;Thanks,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p class=MsoNormal&gt;&lt;font size=2 face=Arial&gt;&lt;span style='font-size:10.0pt;
font-family:Arial'&gt;Rob&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;/body&gt;

&lt;/html&gt;
&lt;br /&gt;-------------------------------------------------------------------------
&lt;br&gt;This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
&lt;br&gt;Build the coolest Linux based applications with Moblin SDK &amp; win great prizes
&lt;br&gt;Grand prize is a trip for two to an Open Source event anywhere in the world
&lt;br&gt;&lt;a href=&quot;http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/&lt;/a&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;Perl-Win32-GUI-Users mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=20365052&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Perl-Win32-GUI-Users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users&lt;/a&gt;&lt;br&gt;&lt;a href=&quot;http://perl-win32-gui.sourceforge.net/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://perl-win32-gui.sourceforge.net/&lt;/a&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/perl-win32-gui-users-f3462.html&quot; embed=&quot;fixTarget[3462]&quot; target=&quot;_top&quot; &gt;perl-win32-gui-users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Threads-tp20365052p20365052.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-20357147</id>
	<title>Re: Win XP styles</title>
	<published>2008-11-06T00:44:47Z</published>
	<updated>2008-11-06T00:44:47Z</updated>
	<author>
		<name>Jeremy White-3</name>
	</author>
	<content type="html">&lt;html&gt;
&lt;head&gt;

&lt;/head&gt;
&lt;body class='hmmessage'&gt;
Hi,&lt;br&gt;&lt;br&gt;The way I do this is to create a child window that is the same size as the tab control (with the tab showing) and overlay it on the tab control. I then place the controls on this child window. &lt;br&gt;&lt;br&gt;Cheers,&lt;br&gt;&lt;br&gt;Jeremy.&lt;br&gt;&lt;br&gt;&lt;hr id=&quot;stopSpelling&quot;&gt;Date: Wed, 5 Nov 2008 10:26:41 +0300&lt;br&gt;From: &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=20357147&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Ilya.Bandorin@...&lt;/a&gt;&lt;br&gt;To: &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=20357147&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;tehmadcap@...&lt;/a&gt;; &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=20357147&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;perl-win32-gui-users@...&lt;/a&gt;&lt;br&gt;Subject: Re: [perl-win32-gui-users] Win XP styles&lt;br&gt;&lt;br&gt;












&lt;div class=&quot;EC_Section1&quot;&gt;

&lt;p class=&quot;EC_MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: 'Tahoma','sans-serif'; color: rgb(31, 73, 125);&quot;&gt;He&lt;/span&gt;&lt;span style=&quot;font-size: 10pt; font-family: 'Tahoma','sans-serif'; color: rgb(31, 73, 125);&quot; lang=&quot;EN-US&quot;&gt;llo Jaun,&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;EC_MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: 'Tahoma','sans-serif'; color: rgb(31, 73, 125);&quot; lang=&quot;EN-US&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;EC_MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: 'Tahoma','sans-serif'; color: rgb(31, 73, 125);&quot; lang=&quot;EN-US&quot;&gt;Sorry for offtopic question, but I’m very interested how do
you plan to deal with tabstrip controls with XP style activated? In XP style it
has white background but all controls that you put on it will have it default
(gray). Or you just don’t use tabstrips in your apps?&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;EC_MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: 'Tahoma','sans-serif'; color: rgb(31, 73, 125);&quot; lang=&quot;EN-US&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;EC_MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: 'Tahoma','sans-serif'; color: rgb(31, 73, 125);&quot; lang=&quot;EN-US&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;EC_MsoNormal&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: 'Tahoma','sans-serif'; color: rgb(31, 73, 125);&quot;&gt;Regards,&lt;br&gt;
_____&lt;br&gt;
&lt;b&gt;Ilya Bandorin&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;font-size: 11pt; font-family: 'Calibri','sans-serif'; color: rgb(31, 73, 125);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-size: 8pt; font-family: 'Tahoma','sans-serif'; color: rgb(31, 73, 125);&quot;&gt;&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;/span&gt;&lt;span style=&quot;font-size: 10pt; font-family: 'Tahoma','sans-serif'; color: rgb(31, 73, 125);&quot;&gt;&lt;/span&gt;&lt;/p&gt;

&lt;div style=&quot;border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; border-width: 1pt medium medium; padding: 3pt 0cm 0cm;&quot;&gt;

&lt;p class=&quot;EC_MsoNormal&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 10pt; font-family: 'Tahoma','sans-serif';&quot; lang=&quot;EN-US&quot;&gt;From:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-size: 10pt; font-family: 'Tahoma','sans-serif';&quot; lang=&quot;EN-US&quot;&gt; Jaun [mailto:&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=20357147&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;tehmadcap@...&lt;/a&gt;] &lt;br&gt;
&lt;b&gt;Sent:&lt;/b&gt; Tuesday, November 04, 2008 10:51 AM&lt;br&gt;
&lt;b&gt;To:&lt;/b&gt; &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=20357147&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;perl-win32-gui-users@...&lt;/a&gt;&lt;br&gt;
&lt;b&gt;Subject:&lt;/b&gt; [perl-win32-gui-users] Win XP styles&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;p class=&quot;EC_MsoNormal&quot;&gt;&lt;span lang=&quot;EN-US&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;

&lt;p class=&quot;EC_MsoNormal&quot;&gt;Hi,&lt;br&gt;
&lt;br&gt;
I've been trying to get a listview which looks like this: &lt;a href=&quot;http://delphitutorial.info/wp-content/uploads/2007/07/next-grid.jpg&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://delphitutorial.info/wp-content/uploads/2007/07/next-grid.jpg&lt;/a&gt;
as opposed to the old (and ugly) style: &lt;a href=&quot;http://www.knowdotnet.com/articles/PrintListViewDemoForm.jpg&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.knowdotnet.com/articles/PrintListViewDemoForm.jpg&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
Robert's perl.exe.manifest file did the trick only it doesn't work after
packing the script to an exe. Is there another way to use xp styles?&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
Also on the subject of Listview, how do you get row sorting functionality?
(with an arrow on the column which the rows are being sorted by)&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
Any help appreciated,&lt;br&gt;
&lt;br&gt;
-Jaun&lt;/p&gt;

&lt;/div&gt;

&lt;pre&gt;=========================================================&lt;br&gt;&lt;br&gt;Ce message et toutes les pieces jointes (ci-apres le &quot;message&quot;)&lt;br&gt;sont confidentiels et susceptibles de contenir des informations&lt;br&gt;couvertes par le secret professionnel. Ce message est etabli&lt;br&gt;a l'intention exclusive de ses destinataires. Toute utilisation&lt;br&gt;ou diffusion non autorisee interdite.&lt;br&gt;Tout message electronique est susceptible d'alteration. La SOCIETE GENERALE&lt;br&gt;et ses filiales declinent toute responsabilite au titre de ce message&lt;br&gt;s'il a ete altere, deforme falsifie.&lt;br&gt;&lt;br&gt;=========================================================&lt;br&gt;&lt;br&gt;This message and any attachments (the &quot;message&quot;) are confidential,&lt;br&gt;intended solely for the addressees, and may contain legally privileged&lt;br&gt;information. Any unauthorised use or dissemination is prohibited.&lt;br&gt;E-mails are susceptible to alteration. Neither SOCIETE GENERALE nor any&lt;br&gt;of its subsidiaries or affiliates shall be liable for the message&lt;br&gt;if altered, changed or falsified.&lt;br&gt;&lt;br&gt;=========================================================&lt;br&gt;&lt;/pre&gt;&lt;br /&gt;&lt;hr /&gt;Win £1000 John Lewis shopping sprees with BigSnapSearch.com &lt;a href='http://clk.atdmt.com/UKM/go/117442309/direct/01/' target='_new' rel=&quot;nofollow&quot;&gt;Search now&lt;/a&gt;&lt;/body&gt;
&lt;/html&gt;&lt;br /&gt;-------------------------------------------------------------------------
&lt;br&gt;This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
&lt;br&gt;Build the coolest Linux based applications with Moblin SDK &amp; win great prizes
&lt;br&gt;Grand prize is a trip for two to an Open Source event anywhere in the world
&lt;br&gt;&lt;a href=&quot;http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/&lt;/a&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;Perl-Win32-GUI-Users mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=20357147&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Perl-Win32-GUI-Users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users&lt;/a&gt;&lt;br&gt;&lt;a href=&quot;http://perl-win32-gui.sourceforge.net/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://perl-win32-gui.sourceforge.net/&lt;/a&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/perl-win32-gui-users-f3462.html&quot; embed=&quot;fixTarget[3462]&quot; target=&quot;_top&quot; &gt;perl-win32-gui-users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Win-XP-styles-tp20317613p20357147.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-20357093</id>
	<title>Re: Win XP styles</title>
	<published>2008-11-06T00:40:55Z</published>
	<updated>2008-11-06T00:40:55Z</updated>
	<author>
		<name>Jeremy White-3</name>
	</author>
	<content type="html">&lt;html&gt;
&lt;head&gt;

&lt;/head&gt;
&lt;body class='hmmessage'&gt;
You shouldn't have any issue with Reshacker and PP. I can recommend PerlApp with Win32GUI, it's a nice tool.&lt;br&gt;&lt;br&gt;As a side you can also use Reshacker to add icons, bitmaps, string tables and other objects to the exe. In the case of icons, bitmaps, string tables Win32::GUI automatically looks into the exe first so you dont need to change your code.&lt;br&gt;&lt;br&gt;Cheers,&lt;br&gt;&lt;br&gt;Jeremy.&lt;br&gt;&lt;br&gt;&lt;hr id=&quot;stopSpelling&quot;&gt;Date: Tue, 4 Nov 2008 20:32:02 +1100&lt;br&gt;From: &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=20357093&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;tehmadcap@...&lt;/a&gt;&lt;br&gt;To: &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=20357093&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jez_white@...&lt;/a&gt;; &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=20357093&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;perl-win32-gui-users@...&lt;/a&gt;&lt;br&gt;Subject: Re: [perl-win32-gui-users] Win XP styles&lt;br&gt;&lt;br&gt;I don't have an active license for perlapp so I've been using PP. Reshacker looks good, as long as the end result is the same it should do fine, thanks.&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;div class=&quot;EC_gmail_quote&quot;&gt;On Tue, Nov 4, 2008 at 8:12 PM, Jeremy White &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=20357093&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jez_white@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;
&lt;blockquote class=&quot;EC_gmail_quote&quot; style=&quot;padding-left: 1ex;&quot;&gt;&lt;br&gt;
Hi,&lt;br&gt;
&lt;br&gt;
When packing the script into an exe what tool are you using? If you are using PerlApp from activestate you may need to update to a later version as I think it adds a manifest to the exe which overrides any file based manifest. You can manually change the manifest with a tool such as reshacker to force it to use XP styles.&lt;br&gt;

&lt;br&gt;
As a side the manifest file should always match the name of the exe being run.&lt;br&gt;
&lt;br&gt;
Cheers,&lt;br&gt;
&lt;br&gt;
Jez.&lt;br&gt;
________________________________&lt;br&gt;
&amp;gt; Date: Tue, 4 Nov 2008 18:50:55 +1100&lt;br&gt;
&amp;gt; From: &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=20357093&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;tehmadcap@...&lt;/a&gt;&lt;br&gt;
&amp;gt; To: &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=20357093&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;perl-win32-gui-users@...&lt;/a&gt;&lt;br&gt;
&amp;gt; Subject: [perl-win32-gui-users] Win XP styles&lt;br&gt;
&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;div class=&quot;EC_Wj3C7c&quot;&gt;&amp;gt;&lt;br&gt;
&amp;gt; Hi,&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; I've been trying to get a listview which looks like this: &lt;a href=&quot;http://delphitutorial.info/wp-content/uploads/2007/07/next-grid.jpg&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://delphitutorial.info/wp-content/uploads/2007/07/next-grid.jpg&lt;/a&gt; as opposed to the old (and ugly) style: &lt;a href=&quot;http://www.knowdotnet.com/articles/PrintListViewDemoForm.jpg&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.knowdotnet.com/articles/PrintListViewDemoForm.jpg&lt;/a&gt;&lt;br&gt;

&amp;gt;&lt;br&gt;
&amp;gt; Robert's perl.exe.manifest file did the trick only it doesn't work after packing the script to an exe. Is there another way to use xp styles?&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Also on the subject of Listview, how do you get row sorting functionality? (with an arrow on the column which the rows are being sorted by)&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Any help appreciated,&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; -Jaun&lt;br&gt;
&lt;br&gt;
&lt;/div&gt;&lt;/div&gt;_________________________________________________________________&lt;br&gt;
X Factor: latest video, features and more. Click here!&lt;br&gt;
&lt;a href=&quot;http://clk.atdmt.com/GBL/go/115454063/direct/01/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://clk.atdmt.com/GBL/go/115454063/direct/01/&lt;/a&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;br /&gt;&lt;hr /&gt;BigSnapSearch.com - 24 prizes a day, every day.  &lt;a href='http://clk.atdmt.com/UKM/go/117442309/direct/01/' target='_new' rel=&quot;nofollow&quot;&gt;Search now&lt;/a&gt;&lt;/body&gt;
&lt;/html&gt;&lt;br /&gt;-------------------------------------------------------------------------
&lt;br&gt;This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
&lt;br&gt;Build the coolest Linux based applications with Moblin SDK &amp; win great prizes
&lt;br&gt;Grand prize is a trip for two to an Open Source event anywhere in the world
&lt;br&gt;&lt;a href=&quot;http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/&lt;/a&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;Perl-Win32-GUI-Users mailing list
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=20357093&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Perl-Win32-GUI-Users@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users&lt;/a&gt;&lt;br&gt;&lt;a href=&quot;http://perl-win32-gui.sourceforge.net/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://perl-win32-gui.sourceforge.net/&lt;/a&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://www.nabble.com/perl-win32-gui-users-f3462.html&quot; embed=&quot;fixTarget[3462]&quot; target=&quot;_top&quot; &gt;perl-win32-gui-users&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Win-XP-styles-tp20317613p20357093.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-20353373</id>
	<title>Re: Win XP styles</title>
	<published>2008-11-05T17:03:02Z</published>
	<updated>2008-11-05T17:03:02Z</updated>
	<author>
		<name>Jan Dubois</name>
	</author>
	<content type="html">On Wed, 05 Nov 2008, rpnoble wrote:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Use the &amp;quot;-a=filename&amp;quot; option when working with perlapp. This will pack the
&lt;br&gt;&amp;gt; filename and allow you to ship it with your application.
&lt;br&gt;&lt;br&gt;You cannot --add an arbitrary file; --add is for Perl code only. You could use
&lt;br&gt;--bind to add a data file, but this still won't work for manifests. &amp;nbsp;They need
&lt;br&gt;to be available to the Windows loader, which means they either need to be
&lt;br&gt;embedded as a resource section in the executable itself, or be placed as a
&lt;br&gt;separate file into the same directory as the executable (with the same name
&lt;br&gt;as the executable suffixed with &amp;quot;.manifest&amp;quot;).
&lt;br&gt;&lt;br&gt;None of this is relevant to PerlApp, which already contains a manifest to
&lt;br&gt;request the new style common controls. Note that the original poster
&lt;br&gt;was using PAR, not PerlApp.
&lt;br&gt;&lt;br&gt;Cheers,
&lt;br&gt;-Jan
&lt;br&gt;&lt;br&gt;&lt;br&gt;-------------------------------------------------------------------------
&lt;br&gt;This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
&lt;br&gt;Build the coolest Linux based applications with Moblin SDK &amp; win great prizes
&lt;br&gt;Grand 