You can subscribe to this list here.
2001 |
Jan
(226) |
Feb
(139) |
Mar
(156) |
Apr
(95) |
May
(181) |
Jun
(166) |
Jul
(80) |
Aug
(59) |
Sep
(69) |
Oct
(83) |
Nov
(142) |
Dec
(33) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(42) |
Feb
(91) |
Mar
(76) |
Apr
(113) |
May
(67) |
Jun
(68) |
Jul
(37) |
Aug
(41) |
Sep
(16) |
Oct
(135) |
Nov
(51) |
Dec
(21) |
2003 |
Jan
(37) |
Feb
(36) |
Mar
(37) |
Apr
(103) |
May
(68) |
Jun
(70) |
Jul
(77) |
Aug
(12) |
Sep
(9) |
Oct
(53) |
Nov
(88) |
Dec
(63) |
2004 |
Jan
(263) |
Feb
(106) |
Mar
(36) |
Apr
(21) |
May
(21) |
Jun
(34) |
Jul
(33) |
Aug
(34) |
Sep
(35) |
Oct
(21) |
Nov
(43) |
Dec
(63) |
2005 |
Jan
(28) |
Feb
(42) |
Mar
(29) |
Apr
(14) |
May
(41) |
Jun
(20) |
Jul
(65) |
Aug
(136) |
Sep
(41) |
Oct
(74) |
Nov
(34) |
Dec
(94) |
2006 |
Jan
(85) |
Feb
(94) |
Mar
(68) |
Apr
(103) |
May
(66) |
Jun
(51) |
Jul
(24) |
Aug
(56) |
Sep
(57) |
Oct
(85) |
Nov
(73) |
Dec
(68) |
2007 |
Jan
(59) |
Feb
(32) |
Mar
(13) |
Apr
(32) |
May
(36) |
Jun
(36) |
Jul
(64) |
Aug
(35) |
Sep
(19) |
Oct
(10) |
Nov
(13) |
Dec
(20) |
2008 |
Jan
(26) |
Feb
(41) |
Mar
(19) |
Apr
(24) |
May
(16) |
Jun
(33) |
Jul
(34) |
Aug
(4) |
Sep
(11) |
Oct
|
Nov
(26) |
Dec
(23) |
2009 |
Jan
(5) |
Feb
(2) |
Mar
(21) |
Apr
(16) |
May
(13) |
Jun
(6) |
Jul
(34) |
Aug
(2) |
Sep
(1) |
Oct
(7) |
Nov
(5) |
Dec
(24) |
2010 |
Jan
(3) |
Feb
(5) |
Mar
(6) |
Apr
(6) |
May
(14) |
Jun
(6) |
Jul
(1) |
Aug
(12) |
Sep
(10) |
Oct
(9) |
Nov
|
Dec
(2) |
2011 |
Jan
(4) |
Feb
(5) |
Mar
(30) |
Apr
(1) |
May
(2) |
Jun
(5) |
Jul
(3) |
Aug
(2) |
Sep
(3) |
Oct
|
Nov
(6) |
Dec
|
2012 |
Jan
|
Feb
(10) |
Mar
|
Apr
|
May
(1) |
Jun
(3) |
Jul
(1) |
Aug
|
Sep
(2) |
Oct
|
Nov
(2) |
Dec
(4) |
2013 |
Jan
(5) |
Feb
(3) |
Mar
|
Apr
(3) |
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
(2) |
Feb
|
Mar
|
Apr
(1) |
May
(3) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(9) |
Nov
(7) |
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(4) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(5) |
Dec
|
2019 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
|
From: Robert M. <rob...@us...> - 2007-05-09 19:45:54
|
On 09/05/07, mikemc <mik...@bt...> wrote: > You are right it was a typo. I it is spelt wrong in the documentation, i just > cut and pasted it. Although that was not the cause of my problem Is that typo in Win32::GUI documentation? If so, can you let me know where, so I can fix it. Thanks, Rob. |
From: mikemc <mik...@bt...> - 2007-05-09 15:21:22
|
You are right it was a typo. I it is spelt wrong in the documentation, i just cut and pasted it. Although that was not the cause of my problem Jason Plum wrote: > > I have often used the Win32::GUI::Icon lib to load my images for my > buttons. > > > Also, and this may have only been a typo, but did you mean IDBITMAP and > not > IDBITAMP in the LoadImages call? > > -----Original Message----- > From: per...@li... > [mailto:per...@li...] On Behalf Of > mikemc > Sent: Wednesday, May 09, 2007 9:53 AM > To: per...@li... > Subject: [perl-win32-gui-users] Toolbar bitmaps > > > I am experimenting with toolbars now. Using an example from a previous > thread > i have set up the toolbar to display a bitmap inline graphic. > > I am now trying to see what default bitmaps are availiable i am using the > LoadImages method > > $TB->LoadImages(["IDBITAMP"=>IDB_HIST_LARGE_COLOR],["HINSTANCE"=>HINST_COMMC > TRL]); > > Then to create the buttons > > $TB->AddButtons(2, > (0, 0, TBSTATE_ENABLED ,TBSTYLE_BUTTON, 0), > (1, 1, TBSTATE_ENABLED, TBSTYLE_BUTTON, 1) > ); > > But i am not seeing any bitmap in the toolbar just a blank button and my > tooltip. I create the toolbar as follows > > my $TB = $main->AddToolbar( > -name => 'TB', > -height => 25, > -flat => 1, > -pushstyle => TBSTYLE_LIST, > -pushstyle => TBSTYLE_TOOLTIPS, > -onButtonClick => \&TB_Click); > > Has any one else tried this or should i stick to the bitmap in line > method. > > If I stick with the bitmap in line are there any good bitmap libraries out > there that can be recommended > > Thanks > Mike > -- > View this message in context: > http://www.nabble.com/Toolbar-bitmaps-tf3715894.html#a10394744 > Sent from the perl-win32-gui-users mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Perl-Win32-GUI-Users mailing list > Per...@li... > https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users > http://perl-win32-gui.sourceforge.net/ > > > > -- > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.5.467 / Virus Database: 269.6.6/794 - Release Date: 5/8/2007 > 2:23 > PM > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Perl-Win32-GUI-Users mailing list > Per...@li... > https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users > http://perl-win32-gui.sourceforge.net/ > > -- View this message in context: http://www.nabble.com/Toolbar-bitmaps-tf3715894.html#a10396449 Sent from the perl-win32-gui-users mailing list archive at Nabble.com. |
From: Jason P. <jp...@un...> - 2007-05-09 14:11:28
|
I have often used the Win32::GUI::Icon lib to load my images for my buttons. Also, and this may have only been a typo, but did you mean IDBITMAP and not IDBITAMP in the LoadImages call? -----Original Message----- From: per...@li... [mailto:per...@li...] On Behalf Of mikemc Sent: Wednesday, May 09, 2007 9:53 AM To: per...@li... Subject: [perl-win32-gui-users] Toolbar bitmaps I am experimenting with toolbars now. Using an example from a previous thread i have set up the toolbar to display a bitmap inline graphic. I am now trying to see what default bitmaps are availiable i am using the LoadImages method $TB->LoadImages(["IDBITAMP"=>IDB_HIST_LARGE_COLOR],["HINSTANCE"=>HINST_COMMC TRL]); Then to create the buttons $TB->AddButtons(2, (0, 0, TBSTATE_ENABLED ,TBSTYLE_BUTTON, 0), (1, 1, TBSTATE_ENABLED, TBSTYLE_BUTTON, 1) ); But i am not seeing any bitmap in the toolbar just a blank button and my tooltip. I create the toolbar as follows my $TB = $main->AddToolbar( -name => 'TB', -height => 25, -flat => 1, -pushstyle => TBSTYLE_LIST, -pushstyle => TBSTYLE_TOOLTIPS, -onButtonClick => \&TB_Click); Has any one else tried this or should i stick to the bitmap in line method. If I stick with the bitmap in line are there any good bitmap libraries out there that can be recommended Thanks Mike -- View this message in context: http://www.nabble.com/Toolbar-bitmaps-tf3715894.html#a10394744 Sent from the perl-win32-gui-users mailing list archive at Nabble.com. ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Perl-Win32-GUI-Users mailing list Per...@li... https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users http://perl-win32-gui.sourceforge.net/ -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.467 / Virus Database: 269.6.6/794 - Release Date: 5/8/2007 2:23 PM |
From: mikemc <mik...@bt...> - 2007-05-09 13:52:41
|
I am experimenting with toolbars now. Using an example from a previous thread i have set up the toolbar to display a bitmap inline graphic. I am now trying to see what default bitmaps are availiable i am using the LoadImages method $TB->LoadImages(["IDBITAMP"=>IDB_HIST_LARGE_COLOR],["HINSTANCE"=>HINST_COMMCTRL]); Then to create the buttons $TB->AddButtons(2, (0, 0, TBSTATE_ENABLED ,TBSTYLE_BUTTON, 0), (1, 1, TBSTATE_ENABLED, TBSTYLE_BUTTON, 1) ); But i am not seeing any bitmap in the toolbar just a blank button and my tooltip. I create the toolbar as follows my $TB = $main->AddToolbar( -name => 'TB', -height => 25, -flat => 1, -pushstyle => TBSTYLE_LIST, -pushstyle => TBSTYLE_TOOLTIPS, -onButtonClick => \&TB_Click); Has any one else tried this or should i stick to the bitmap in line method. If I stick with the bitmap in line are there any good bitmap libraries out there that can be recommended Thanks Mike -- View this message in context: http://www.nabble.com/Toolbar-bitmaps-tf3715894.html#a10394744 Sent from the perl-win32-gui-users mailing list archive at Nabble.com. |
From: Roode, E. <er...@ba...> - 2007-05-07 15:44:39
|
Okay, I've done pretty much what you said: I've loaded the DLL (successfully). I've created a class to represent my control. In that class's new() function, I invoke Win32::GUI->_new. In my main program, I position the control as usual. The control is not rendered properly. Its "text" attribute is displayed on the main window, just as a Label would appear. I get no errors, but no features either. Question: What is the "type" parameter to _new? All the controls in Win32::GUI.pm load constants from deep in the bowels of XS. What should it be for my custom control? For my test control, I used the RoundButton control at http://www.ondotnet.com/pub/a/dotnet/2002/03/18/customcontrols.html?page =3D2 . My perl code to wrap it is as follows: use strict; package RoundButton; use Win32::GUI; use Tie::Hash; our @ISA =3D ('Tie::StdHash'); my $dll =3D Win32::GUI::LoadLibrary('RoundButton.dll') or die "Cannot load dll file"; sub new { my $class =3D shift; my $const =3D Win32::GUI::constant("WIN32__GUI__STATIC", 0); my $self =3D Win32::GUI->_new($const, $class, @_); return $self; } Why did I load Tie::Hash? Because _new() ties its argument class. I don't know why, or what to implement with the tie. Why did I choose WIN32__GUI__STATIC? It's the constant that is used in the Scintilla control. <shrug> My main program is as follows: use strict; use Win32::GUI; use RoundButton; my $mw =3D Win32::GUI::Window->new(-name =3D> 'mainwin', -text =3D> 'RoundButton Test', -height =3D> 200, -width =3D> 300); my $lbl =3D $mw->AddLabel(-name=3D>'lbl', -top =3D> 30, -left =3D> 20, -width =3D> 100, -height =3D> 20, -text =3D> 'Ready.'); my $rb =3D RoundButton->new(-parent=3D>$mw, -left=3D>20, -top=3D>100, -height=3D>60, -width=3D>100, -text=3D>'Howdy'); $mw->Show; Win32::GUI::Dialog; exit; sub mainwin_Terminate { return -1; } Any illumination you can give would be much appreciated.=20 Eric =20 -----Original Message----- From: Robert May [mailto:rob...@us...]=20 Sent: Friday, May 04, 2007 4:45 PM To: Glenn Linderman; per...@li... Cc: Roode, Eric Subject: Re: [perl-win32-gui-users] Using custom controls/widgets Glenn Linderman wrote: > On approximately 5/4/2007 6:25 AM, came the following characters from=20 > the keyboard of Roode, Eric: >> Say I create a dll containing a library of custom controls (written=20 >> in >> C++, C#, whatever). How can I use these controls in a Win32::GUI >> program? >=20 > Or even say someone else creates such a dll, how can I use it/them? Assuming that this is a "standard" control library that registers the classes that it needs on loading etc., then off the top of my head (no code available right now). You need to (1) Use LoadLibrary to load the DLL (2) call the (internal) Win32::GUI::_new() function as a class constructor, passing in the (Win32) Class name take the control needs as one of the arguments - this in turn calls CreateWindow(). (3) Use SendMessage to send instructions to the control and get information back from it. The Win32::GUI::Scintilla class (Scintilla.pm) should have most of the detail that you need. Rob. -- Robert May Win32::GUI, a perl extension for native Win32 applications http://perl-win32-gui.sourceforge.net/ |
From: Robert M. <rob...@us...> - 2007-05-06 21:36:00
|
Waldemar Biernacki wrote: > Hi! > Now I've got another problem. Memory one. [ Please start a new eamil, with an appropriate subject line for a new problem ] {edited] > Here is an application ... > After I create 10 windows Windows Task Menager reads that perl > is using 6704K memory (I use WinXPHE sp2). > after a while then amount of used memory will rise. How long is a while? I see no problem (win98, win2k, perl 5.8.8 AS build 819, Win32::GUI v1.05) after 15 minutes. > Meantime I am writing the email after about 20 arrows I have 6752K > memory.... next - after running some other programs - I have 6800K now > (100K more and this a very simple application!). Now I have 6820K > hmmm... where is the end? > It seems to be connected with other processes/programs when they > startet or ended (6860K). > Could someone help me and answer the questions: > 1. has attached application errors (what) > 2. Is that memory problem normal feature in perl (maybe perl problems > with OO programming?) > 3. Maybe it's connected only with Perl/Windows? > 4. Or maybe Perl modules are dirty written? > any comments are very usefull! > ps.I'm finishing writing with the value of 2896K... 2896K is much less than the 6800K you reported earlier in this mail, so that doesn't look like a memory leak to me. My suspicion is that you are reading the 'Memory Usage' column in task manager? If so then that is the amount of your application that is currently in physical memory [1], and that value will vary depending on what memory demands other applications have. Typically it will go down if your application is not doing anything and other applications need memory, and then will go up again as you start to use your application again. If you want to look for leaks then a better metric is the 'Peak Mem Usage' column, which can be made visible from one of the menus in task manager. Finally, you don't say which version of Win32::GUI you are using, but if it is not 1.05, then there may well be leaks that have been fixed by later versions. Regards, Rob. [1] Actually the process' 'working set'. |
From: Robert M. <rob...@us...> - 2007-05-06 21:17:04
|
Sean Healy wrote: > I tracked down the extra spaces problem. It turned out to be a space at > the end of the line (after the EOL character(s)), not at the beginning, > which is why it doesn't show up on the first line. > > Here's the cause of the problem: > # How many characters are on a line, not including end of line characters? > sub LineLength { > my ($self, $line) = @_; > return $self->SendMessage (2350, $line, 0); > } > > Scintilla's documentation says: > SCI_LINELENGTH(int line) > This returns the length of the line, including any line end characters. If > line is negative or beyond the last line in the document, the result is 0. > If you want the length of the line not including any end of line > characters, use SCI_GETLINEENDPOSITION(line) - SCI_POSITIONFROMLINE(line). This confusion actually comes from the scintilla scintilla.iface document, from which the comment in the code is extracted. > Laurent's code makes an incorrect assumption about EOL markers and > SCI_LINELENGTH. (Although it may have been correct when it was coded, and > Scintilla later changed.) Everywhere Laurent has used LineLength to get > the text at a line, he has done the following: > my $lenght = $self->LineLength($line); > my $text = " " x ($lenght + 1); > $self->SendMessageNP (2153, $line, $text); Having had a look, I don't think it's an incorrect assumption about line lenghts, but an incorrect assumption about terminating NUL's. Often when calling SnedMessage to get a string it will be NUL terminated, and so you need to make the buffer large enough toinclude this NUL, but in this case SCI_GETLINE does not NUL terminate the string. > He has to create the buffer first, because SendMessage requires the memory > to be already allocated, so he creates a buffer of spaces. But he creates > it one byte too long, so there's a trailing space in the returned text. I agree that the buffer is allocated one byte too long, and this is the cause of the problems being seen. > The intermediate solution is to go to line 196 in Scintilla.pm (in the > GetLine() sub) and take out the '+1'. Then when SaveFile calls GetLine, > you won't get a trailing space. Fine short term fix for those who want a solution before the next release. > The long-term solution is to find every place Laurent has used LineLength, > and fix it. I am willing to do this and email the fixed file to someone > with CVS access, so it will be correct in the next version. I'll test it > via SaveFile, with differrent combinations of EOL markers in source and > destination files, to make sure it really works. (I'll also fix that > annoying little misspelling in the local variable while I'm at it.) Scintilla.pm is actually (mostly) autogenerated from scintilla.iface by a script called Scintilla.PL, which you'll find in the source distribution. I've patched up my local copy (there were 2 places that this was a problem), and while doing so found a couple of other buffer 'over allocation' problems. I'll make sure these fixes get into the next release. Many thanks for taking the time to track down the problem and letting us know. Regards, |
From: Robert M. <rob...@us...> - 2007-05-04 20:45:45
|
Glenn Linderman wrote: > On approximately 5/4/2007 6:25 AM, came the following characters from > the keyboard of Roode, Eric: >> Say I create a dll containing a library of custom controls (written in >> C++, C#, whatever). How can I use these controls in a Win32::GUI >> program? > > Or even say someone else creates such a dll, how can I use it/them? Assuming that this is a "standard" control library that registers the classes that it needs on loading etc., then off the top of my head (no code available right now). You need to (1) Use LoadLibrary to load the DLL (2) call the (internal) Win32::GUI::_new() function as a class constructor, passing in the (Win32) Class name take the control needs as one of the arguments - this in turn calls CreateWindow(). (3) Use SendMessage to send instructions to the control and get information back from it. The Win32::GUI::Scintilla class (Scintilla.pm) should have most of the detail that you need. Rob. -- Robert May Win32::GUI, a perl extension for native Win32 applications http://perl-win32-gui.sourceforge.net/ |
From: Roode, E. <er...@ba...> - 2007-05-04 13:27:24
|
Say I create a dll containing a library of custom controls (written in C++, C#, whatever). How can I use these controls in a Win32::GUI program? Thanks in advance, Eric |
From: mikemc <mik...@bt...> - 2007-05-04 08:09:50
|
Thanks Sean I see what you mean. I have done as you said and all is good now. Thanks Mike Sean Healy wrote: > > I tracked down the extra spaces problem. It turned out to be a space at > the end of the line (after the EOL character(s)), not at the beginning, > which is why it doesn't show up on the first line. > > Here's the cause of the problem: > # How many characters are on a line, not including end of line characters? > sub LineLength { > my ($self, $line) = @_; > return $self->SendMessage (2350, $line, 0); > } > > Scintilla's documentation says: > SCI_LINELENGTH(int line) > This returns the length of the line, including any line end characters. If > line is negative or beyond the last line in the document, the result is 0. > If you want the length of the line not including any end of line > characters, use SCI_GETLINEENDPOSITION(line) - SCI_POSITIONFROMLINE(line). > > Laurent's code makes an incorrect assumption about EOL markers and > SCI_LINELENGTH. (Although it may have been correct when it was coded, and > Scintilla later changed.) Everywhere Laurent has used LineLength to get > the text at a line, he has done the following: > my $lenght = $self->LineLength($line); > my $text = " " x ($lenght + 1); > $self->SendMessageNP (2153, $line, $text); > > He has to create the buffer first, because SendMessage requires the memory > to be already allocated, so he creates a buffer of spaces. But he creates > it one byte too long, so there's a trailing space in the returned text. > > (SendMessageNP is an alias for SendMessage with the second parameter as a > pointer. There is also SendMessage PN for the first parameter as a pointer > and SendMessagePP for both parameters as pointers. It would probably be > better to have a single SendMessage function, and use references when you > want a parameter to be a pointer, but I don't currently have a compiler, > so I can't mess with the C code. We'd have to leave the extra methods in > for a couple versions anyway, to prevent older code from breaking.) > > The intermediate solution is to go to line 196 in Scintilla.pm (in the > GetLine() sub) and take out the '+1'. Then when SaveFile calls GetLine, > you won't get a trailing space. > > The long-term solution is to find every place Laurent has used LineLength, > and fix it. I am willing to do this and email the fixed file to someone > with CVS access, so it will be correct in the next version. I'll test it > via SaveFile, with differrent combinations of EOL markers in source and > destination files, to make sure it really works. (I'll also fix that > annoying little misspelling in the local variable while I'm at it.) > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Perl-Win32-GUI-Users mailing list > Per...@li... > https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users > http://perl-win32-gui.sourceforge.net/ > > -- View this message in context: http://www.nabble.com/EOL-control-in-scintilla-tf3674386.html#a10318581 Sent from the perl-win32-gui-users mailing list archive at Nabble.com. |
From: Sean H. <jal...@ho...> - 2007-05-04 00:24:57
|
I tracked down the extra spaces problem. It turned out to be a space at = = the end of the line (after the EOL character(s)), not at the beginning, = = which is why it doesn't show up on the first line. Here's the cause of the problem: # How many characters are on a line, not including end of line character= s? sub LineLength { my ($self, $line) =3D @_; return $self->SendMessage (2350, $line, 0); } Scintilla's documentation says: SCI_LINELENGTH(int line) This returns the length of the line, including any line end characters. = If = line is negative or beyond the last line in the document, the result is = 0. = If you want the length of the line not including any end of line = characters, use SCI_GETLINEENDPOSITION(line) - SCI_POSITIONFROMLINE(line= ). Laurent's code makes an incorrect assumption about EOL markers and = SCI_LINELENGTH. (Although it may have been correct when it was coded, an= d = Scintilla later changed.) Everywhere Laurent has used LineLength to get = = the text at a line, he has done the following: my $lenght =3D $self->LineLength($line); my $text =3D " " x ($lenght + 1); $self->SendMessageNP (2153, $line, $text); He has to create the buffer first, because SendMessage requires the memo= ry = to be already allocated, so he creates a buffer of spaces. But he create= s = it one byte too long, so there's a trailing space in the returned text. (SendMessageNP is an alias for SendMessage with the second parameter as = a = pointer. There is also SendMessage PN for the first parameter as a point= er = and SendMessagePP for both parameters as pointers. It would probably be = = better to have a single SendMessage function, and use references when yo= u = want a parameter to be a pointer, but I don't currently have a compiler,= = so I can't mess with the C code. We'd have to leave the extra methods in= = for a couple versions anyway, to prevent older code from breaking.) The intermediate solution is to go to line 196 in Scintilla.pm (in the = GetLine() sub) and take out the '+1'. Then when SaveFile calls GetLine, = = you won't get a trailing space. The long-term solution is to find every place Laurent has used LineLengt= h, = and fix it. I am willing to do this and email the fixed file to someone = = with CVS access, so it will be correct in the next version. I'll test it= = via SaveFile, with differrent combinations of EOL markers in source and = = destination files, to make sure it really works. (I'll also fix that = annoying little misspelling in the local variable while I'm at it.) |
From: mikemc <mik...@bt...> - 2007-05-03 07:47:30
|
Sorry no joy. The getwrap indent reports 0 as well. Set the wrap indent to 5 to see what it did but still had the one indent second line and so on Will start trawing through the docs trying each command in turn Sean Healy wrote: > > On Wed, 02 May 2007 05:31:24 -0600, mikemc <mik...@bt...> > wrote: > >> I still get the indent see below >> one >> two >> three >> >> If you use editor.pl from the example files you get the same result, my >> code >> is based on this one anyway. >> >> I have tried >> $Editor->SetIndent (0); >> >> But no joy > > Try $Editor->SetWrapStartIndent(0) > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Perl-Win32-GUI-Users mailing list > Per...@li... > https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users > http://perl-win32-gui.sourceforge.net/ > > -- View this message in context: http://www.nabble.com/EOL-control-in-scintilla-tf3674386.html#a10300428 Sent from the perl-win32-gui-users mailing list archive at Nabble.com. |
From: Sean H. <jal...@ho...> - 2007-05-03 03:39:17
|
On Wed, 02 May 2007 05:31:24 -0600, mikemc <mik...@bt...> wrote: > I still get the indent see below > one > two > three > > If you use editor.pl from the example files you get the same result, my > code > is based on this one anyway. > > I have tried > $Editor->SetIndent (0); > > But no joy Try $Editor->SetWrapStartIndent(0) |
From: Waldemar B. <wb...@sa...> - 2007-05-02 21:41:19
|
Hi! Now I've got another problem. Memory one. Here is an application that make ten windows if you press right arrow key and destroy them if you press left arrow key. After I create 10 windows Windows Task Menager reads that perl is using 6704K memory (I use WinXPHE sp2). This is maximal number of windows, nothing more! But - after a while - if you try to press these arrows then amount of used memory will rise. Meantime I am writing the email after about 20 arrows I have 6752K memory.... next - after running some other programs - I have 6800K now (100K more and this a very simple application!). Now I have 6820K hmmm... where is the end? It seems to be connected with other processes/programs when they startet or ended (6860K). Could someone help me and answer the questions: 1. has attached application errors (what) 2. Is that memory problem normal feature in perl (maybe perl problems with OO programming?) 3. Maybe it's connected only with Perl/Windows? 4. Or maybe Perl modules are dirty written? any comments are very usefull! ps.I'm finishing writing with the value of 2896K... ######################################################## #! c:\Perl\bin\perl.exe -w use strict; use warnings; use Win32::GUI qw(); my @Window; my $which = 0; my $max = 10; my $last = -1; makewindow(); Win32::GUI::Dialog(); exit 0; sub makewindow { return 1 if $last > $max - 2; $last++; $Window[$last]{SCREEN} = new Win32::GUI::Window ( -title => "Window: ".($last+1), -pos => [20+$last*120, 200], -size => [100, 300], -name => "Window_$last", -onKeyDown => \&keydown, ); $Window[$last]->{SCREEN}->Show(1); print "window $last created\n"; $which = $last; } sub keydown { my ( $self, undef, $key ) = @_; return 0 unless $key; if ( $key == 39 ) { makewindow(); } elsif ( $key == 37 ) { if (( $which == $last )&&( $last>0)) { print "window $last deleted\n"; $Window[$which]{SCREEN}->DESTROY; $last--; $which--; $Window[$which]{SCREEN}->SetFocus(); } } return 1; } __END__ ######################################################## |
From: mikemc <mik...@bt...> - 2007-05-02 11:31:23
|
Thanks Sean I needed $Editor->SetEOLMode (2); or $Editor->SetEOLMode (1); depending upon final file destination I still get the indent see below one two three If you use editor.pl from the example files you get the same result, my code is based on this one anyway. I have tried $Editor->SetIndent (0); But no joy Thanks Mike Sean Healy wrote: > > On Tue, 01 May 2007 04:39:09 -0600, mikemc <mik...@bt...> > wrote: > >> I am struggling to get to grips with the EOL command. >> >> As standard I seem to output a file which when i read back in i see what >> appears to be double line spacing. If i open the file in vi i see ^M >> chars >> at the end of each line. >> >> How do i get rid of this to give me a regular file? > > You are getting a regular file; it's just that vi reads in Unix format > (EOL = LF). So you need to set your EOL mode. > > EOL constant > SC_EOL_CRLF, SC_EOL_CR, SC_EOL_LF. > > ConvertEOLs (eolMode) > Convert all line endings in the document to one mode. > > GetEOLMode > Retrieve the current end of line mode - one of CRLF, CR, or LF. > > SetEOLMode (eolMode) > Set the current end of line mode. > > This might also solve your other problem; if not send a small amount of > code that reproduces the problem. > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Perl-Win32-GUI-Users mailing list > Per...@li... > https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users > http://perl-win32-gui.sourceforge.net/ > > -- View this message in context: http://www.nabble.com/EOL-control-in-scintilla-tf3674386.html#a10284218 Sent from the perl-win32-gui-users mailing list archive at Nabble.com. |
From: Sean H. <jal...@ho...> - 2007-05-01 22:56:10
|
On Tue, 01 May 2007 04:39:09 -0600, mikemc <mik...@bt...= m> = wrote: > I am struggling to get to grips with the EOL command. > > As standard I seem to output a file which when i read back in i see wh= at > appears to be double line spacing. If i open the file in vi i see ^M = > chars > at the end of each line. > > How do i get rid of this to give me a regular file? You are getting a regular file; it's just that vi reads in Unix format = (EOL =3D LF). So you need to set your EOL mode. EOL constant SC_EOL_CRLF, SC_EOL_CR, SC_EOL_LF. ConvertEOLs (eolMode) Convert all line endings in the document to one mode. GetEOLMode Retrieve the current end of line mode - one of CRLF, CR, or LF. SetEOLMode (eolMode) Set the current end of line mode. This might also solve your other problem; if not send a small amount of = = code that reproduces the problem. |
From: mikemc <mik...@bt...> - 2007-05-01 10:39:08
|
Hi I have just started work on a project. It is based around a text editor so i decided to look at the scintilla control in win32 gui ver 1.05 I am struggling to get to grips with the EOL command. As standard I seem to output a file which when i read back in i see what appears to be double line spacing. If i open the file in vi i see ^M chars at the end of each line. How do i get rid of this to give me a regular file? Also i notice that the first line starts off at char 1 then the next line is indented one char in, all the rest follow this. Again how do i control it so all chars that should be at position 1 stay there? Thanks in advance Mike -- View this message in context: http://www.nabble.com/EOL-control-in-scintilla-tf3674386.html#a10267219 Sent from the perl-win32-gui-users mailing list archive at Nabble.com. |
From: Robert M. <rob...@us...> - 2007-04-27 23:46:32
|
On 27/04/07, Tim Hansell <han...@gm...> wrote: [edited] > While playing around with the AnimateWindow.pl program > discovered error saying that "bltr" was an unrecognized direction. > line 441 (GUI.pm) the regex that is used to recognize directions has 'blrt' > instead of 'bltr'. (also the comment line on 404 has the same thing) > > I'm not sure WHO needs to know about this error/fix, but I figured this list > was a good place to start. Tim, You found exactly the right place. Thank you for the report. I have applied your 2 changes to my local copy (along with a change that generates a warning but still allows 'blrt' for a deprecation cycle). The change will make it's way into CVS soon, and into the next release. Regards, Rob. |
From: Tim H. <han...@gm...> - 2007-04-27 22:28:44
|
I was running the "win32-gui-demos" after installing version 1.05 of Win32-GUI. While playing around with the AnimateWindow.pl program I noticed that if you clicked on the bottom left checkbox, and tried to hide/show the animated window, it generated and error saying that "bltr" was an unrecognized direction. First I did a google search for some report of this error, and then I joined this list, and searched the list for some report of the problem. Since I didn't turn up anything, I started poking around in the GUI.pm code and discovered that there was a type there (or at least it appears to me to be a typo). On line 441 the regex that is used to recognize directions has 'blrt' instead of 'bltr'. (also the comment line on 404 has the same thing) >From look of the way the rest of the directions were listed, it seemd to me that it OUGHT to read 'bltr' which is what the AnimateWindow.pl program uses. When I changed the regex to bltr, then the AnimateWindow.pl worked correctly (and animated correctly). I'm not sure WHO needs to know about this error/fix, but I figured this list was a good place to start. -- -tim Tim Hansell han...@gm... |
From: Robert M. <rob...@us...> - 2007-04-27 19:40:10
|
Glenn Linderman wrote: > So I have a menu that has dynamic entries, that can grow quite long. > There seem to be no particular limits on how many entries a menu can > have, but when it exceeds the size of the screen, you get these > annoying up and down arrows at the top and bottom. They can be used > to scroll the contents of the menu. That is not as annoying as not > being able to access the menu entries at all, of course, but the >scrolling behavior is relatively slow. I've not seen it before, and here on my win98 box it looks horrible, as well as being slow. > I'm aware (I've used this feature for fixed size menus) that I can > add columns to a menu explicitly by doing stuff like: > > $m_config->{'sUpdate'}->Change( -menubarbreak => 1 ); Right. > but I was wondering if there is a way to get Windows to figure out > how many entries will fit vertically, and add the breaks >automatically? Not that I'm aware of. > If not, then I am wondering how to do the size calculations... I can > get the screen size, I can get the position of the mouse when the menu > is invoked, but I'm not sure how to get the vertical or horizontal > size of a menu item... Windows seems to calculate those automatically > when displaying them, so I'm sure there is a way, somewhere... but I > haven't found it. I haven't even found documentation for the > existence of the scrolled menus... I was expecting there to be a GetSystemMetrics() call to get the vertical size of a menu, but it appears there is not. I found a very likely looking API call - GetMenuItemRect (see code at end) - but having played with it I can't make it give me the correct dimensions until after the menu has been displayed at least once, and you really want the dimensions *before* the menu is displayed :-( It also sees to give the location (in window co-ordinates), as if the menu was to be drawn in it's 'normal' position, although this wouldn't be a problem for you, as you only want the height, not the absolute position. Note, also, that although I haven't checked I'm pretty sure that separators have a smaller height than regular menu items, so you would need to take this into account. > The Windows Start / Programs menu is an example of where Windows > uses one type or the other (scrolled, or multi-column). From what I've read the start menu isn't a real menu at all, and when it's in it's scrolling mode it's actually a custom drawn pager control. > Here's a related question that might not be related at all... is > there any way to use a real vertical scrollbar, instead of the up/down > arrows, when displaying a large menu list? Some way to constrain the > overall height, but add a scrollbar to scroll the items, kind of like > the way a list box does it? I'm pretty sure there's not. > [OK, one solution would be to dynamically choose whether to use a menu > or a list box based on the size of the list, I suppose... but that > would require quite different code for the two cases, especially if > one has to deal with submenus....[I don't have a reference where > Windows uses a scrollbar for menus, which makes me doubt the existence > of this type of solution.]] You could always uses a Listbox - You'd only need one set of code. As an alternative, you could look at the code in my CoolBar module (http://www.robmay.me.uk/win32gui), simulate your menu bar using a toolbar, and have a real listbox that you position and size as a result of a click on one of the buttons. In general the UI experience of having to pick one item from a very long, flat, list needs re-thinking - but without knowing more about what you are trying to get the use to do, it's hard to know if the general rules apply here. Regards, Rob. #!perl -w use strict; use warnings; use Win32::GUI qw(CW_USEDEFAULT WM_ENTERMENULOOP); use Win32::API(); Win32::API->Import('user32', 'GetMenuItemRect', 'LLLP','L') or die; my @array = map { +">Item$_" => "Item$_" } (1 .. 60); my $menu = Win32::GUI::Menu->new( "File" => "File", @array, ); my $mw = Win32::GUI::Window->new( -left => CW_USEDEFAULT, -size => [400,300], -menu => $menu, ); $mw->Hook(WM_ENTERMENULOOP, \&show); $mw->AddButton( -text => 'Show Size', -pos => [10,10], -onClick => \&show, ); $mw->Show(); Win32::GUI::Dialog(); $mw->Hide(); exit(0); sub show { my $rect = pack("LLLL", 0,0,0,0); my $result = GetMenuItemRect( $mw->{-handle}, $menu->{File}->{-handle}, 11, $rect, ); if (! $result) { print "Result: $result ($^E)\n"; } else { print "Result: $result\n"; my ($l, $t, $r, $b) = unpack("LLLL", $rect); print "$l, $t, $r, $b\n"; } return 1; } __END__ |
From: Waldemar B. <wb...@sa...> - 2007-04-25 21:31:40
|
Robert May napisał: Thank you Rob! I'll can control my screens much more now. Waldemar > Waldemar Biernacki wrote: >> I have two input fields (in html/css dialect): >> >> 1. <input style="border:groved #ff0000 2px;" value="groved field" /> >> 2. <input style="border:solid #ff0000 2px;" value="solid border >> field" /> >> >> The first one is a normal textfield in Win32::GUI. I would be very, >> very pleased I someone could give me a way how to get textfield which >> looks like the second input. Maybe it is outside the possibilities of >> MS Win32::GUI library. Such information is also very vary precious. > > Remove the WS_EX_CLIENTEDGE extended style: > > #!perl -w > use strict; > use warnings; > > use Win32::GUI qw(CW_USEDEFAULT WS_EX_CLIENTEDGE); > > my $mw = Win32::GUI::Window->new( > -left => CW_USEDEFAULT, > -size => [400,300], > ); > > $mw->AddTextfield( > -pos => [10,10], > -size => [100,20], > ); > > $mw->AddTextfield( > -pos => [10,35], > -size => [100,18], > -remexstyle => WS_EX_CLIENTEDGE, > ); > > $mw->Show(); > Win32::GUI::Dialog(); > $mw->Hide(); > exit(0); > __END__ > > Making the border 2 pixels wide and red (as per your html/css) is > (much) harder. > > Regards, > Rob. > |
From: Robert M. <rob...@us...> - 2007-04-25 20:54:28
|
Waldemar Biernacki wrote: > I have two input fields (in html/css dialect): > > 1. <input style="border:groved #ff0000 2px;" value="groved field" /> > 2. <input style="border:solid #ff0000 2px;" value="solid border field" /> > > The first one is a normal textfield in Win32::GUI. I would be very, very > pleased I someone could give me a way how to get textfield which looks > like the second input. Maybe it is outside the possibilities of MS > Win32::GUI library. Such information is also very vary precious. Remove the WS_EX_CLIENTEDGE extended style: #!perl -w use strict; use warnings; use Win32::GUI qw(CW_USEDEFAULT WS_EX_CLIENTEDGE); my $mw = Win32::GUI::Window->new( -left => CW_USEDEFAULT, -size => [400,300], ); $mw->AddTextfield( -pos => [10,10], -size => [100,20], ); $mw->AddTextfield( -pos => [10,35], -size => [100,18], -remexstyle => WS_EX_CLIENTEDGE, ); $mw->Show(); Win32::GUI::Dialog(); $mw->Hide(); exit(0); __END__ Making the border 2 pixels wide and red (as per your html/css) is (much) harder. Regards, Rob. |
From: Waldemar B. <wb...@sa...> - 2007-04-25 18:56:11
|
Hi! I have already asked about the problem earlier but no one could answered me. I am doing it again reformulating the question. The answer (positive or negative) is very important for me. I have two input fields (in html/css dialect): 1. <input style="border:groved #ff0000 2px;" value="groved field" /> 2. <input style="border:solid #ff0000 2px;" value="solid border field" /> The first one is a normal textfield in Win32::GUI. I would be very, very pleased I someone could give me a way how to get textfield which looks like the second input. Maybe it is outside the possibilities of MS Win32::GUI library. Such information is also very vary precious. Anyway! I would be happy getting any help! |
From: Robert M. <rob...@us...> - 2007-04-25 01:18:56
|
Glenn Linderman wrote: > Speaking of history, I see I also have... > > -menu => 1 > > in the list of "standard options for listbox and combobox widgets". > Generally speaking -menu takes a menu handle/object parameter. But I'm > quite sure I used this option to make something work... any chance you'd > know what? I'll experiment with taking it out, but it'll make me > nervous until I retest all my old programs... I've not opened the source this time, but if I remember correctly the CreatWindowEx() API call overloads its HMENU parameter, because only a top level (main) window can have a menu. For a child window the field becomes a 'control id' - when working with windows resources this is the number that the programmer uses to refer to a child window, as window handles are only assigned at run time. In Win32::GUI we refer to everything by window name (-name), which we map internally to window handles, so the control ID (which I believe is what you're setting here) should be unnecessary. I've come across a couple of place where it matters not to have a control ID of zero, but, again, if I remember correctly this was related to custom-draw and owner-draw functionality. If you find anywhere else that it matter, then please let me know. > Thanks. For this and a few other multi-bit fields, I wonder if it is > really best to have > > -variation1 => 1, -variation2 => 1, -variation3 => 1 > > types of options, or if it would be better to have > > -variations => 1 > -variations => 2 > -variations => 3 > > Of course then one would rather have > > -combostyle => simple > -combostyle => dropdown > -combostyle => dropdownlist If I had a clean sheet to start from the last option you give would be my prefered option (although using strings rather than constants). > It would be simpler to document, and "mutual exclusion" would be easier > to explain... From the current starting point, yes. I have a few folder full of experiments that I have been doing, whilst wondering if a Win32::GUI V2, re-starting from scratch is the way to go. That was the approach I took. However, microsoft don't make it easy - it takes a lot of reading between the lines, experimenting and reeading of the header files to work out what's mulually exclusive and what's not! Regards, Rob. |
From: Robert M. <rob...@us...> - 2007-04-25 01:06:09
|
Glenn Linderman wrote: >>> -remstyle => BS_AUTOCHECKBOX, >>> -addstyle => BS_CHECKBOX, > > Is there a better way to do this operation? There are no 'options' to do this, if that's what you mean. > Not only does it require > BS_ constants, the order matters... the code shown works in the test > program, but not in my "real" program which runs the parameters through > a hash, which reorders the parameters :( Causing the checkboxes to > actually come out as buttons! The button's 'type' is the bottom 4 bits of the style (see BS_TYPEMASK). A Win32::GUI::Checkbox is type BS_AUTOCHECKBOX (=3) and you want BS_CHECKBOX (=2). (3 & ~3) | 2 = 2 (BS_CHECKBOX) but (3 | 2) & ~3 = 0 (0 = BS_PUSHBUTTON) -remstyle => 1 should do what you want: 3 & ~1 = 2 but it'll need a good comment to make it maintainable :-( As an alternative you might be able to use a button, and add BS_CHECKBOX, and then re-bless the resulting object into the checkbox class. Something like this (untested): my $cb = $mw->AddButton( -addstyle => BS_CHECKBOX, ... ); bless $cb, "Win32::GUI::Checkbox"; The bless may be unnecessary, depending on which class methods you need to be able to call. Regards, Rob. |