Re: [perl-win32-gui-users] Displaying multiple lines in window
On 10/11/17 07:55, Oshri Shomrony wrote: Hello, I'm using perl 5.24 with win32::GUI. I would like to open a window and display on it multiple lines taken from an array. I would also like it to be scrollable in case the window is smaller than the text size. for some reason, using "\n" doesn't work in AddLabel at all - the text after the \n is not displayed. How can I display multiple lines in a window? hi, what you want is a Textfield (not Label) object, with -multiline => 1. and note, newline is "\r\n". documentation is here: http://perl-win32-gui.sourceforge.net/cgi-bin/docs.cgi?doc=textfield hope this helps. cheers, Aldo -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Perl-Win32-GUI-Users mailing list Perl-Win32-GUI-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users http://perl-win32-gui.sourceforge.net/
Re: [perl-win32-gui-users] Win32-GUI-1.09
On 07/11/14 12:49, kmx wrote: Win32-GUI-1.09 is available on CPAN Build logs seems to be all green: http://matrix.cpantesters.org/?dist=Win32-GUI%201.09 https://code.activestate.com/ppm/Win32-GUI/ nice job, kmx! thanks a lot :-) cheers, Aldo -- ___ Perl-Win32-GUI-Users mailing list Perl-Win32-GUI-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users http://perl-win32-gui.sourceforge.net/
Re: [perl-win32-gui-users] Perl-Win32-GUI support query
On 01/14/2014 03:53 PM, Trebilcock, Richard wrote: Good afternoon, I am an ILS Engineer working for CGI IT UK Limited. At the present time I am looking at software obsolescence issues that relate to the project I am working on. On this project we use Perl-Win32-GUI hello Richard. looks like your software obsolescence template is more suited for commercial products or big projects. Perl-Win32-GUI is Open Source software written and maintained by individuals. the only official support given is through this mailing list, and as such there is no applicable end of product (eg. as long as SourceForge hosts it, it will continue to exist). new versions, if any, will be available on CPAN, which is an archival network mirrored all over the world. the most practical link to look for a new version is, and will probably be for the foreseeable future: http://search.cpan.org/dist/Win32-GUI/ hope this helps... cheers, Aldo -- CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk ___ Perl-Win32-GUI-Users mailing list Perl-Win32-GUI-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users http://perl-win32-gui.sourceforge.net/
Re: [perl-win32-gui-users] Window doesn't redraw
On Mon, April 1, 2013 11:24 am, Soren Hein wrote: I'm drawing stuff in a window, then minimizing the window to the bottom part of the screen using the Windows underscore symbol. When my mouse hovers over the minimized icon, the content is still there. When I click on the icon to reopen the window, the content is gone. that's how it is supposed to work. paint operations in a window are non-persistent. what you want is a custom Paint event. eg. instead of make_example, add this sub in your program: sub win_Paint { my($dc) = @_; # your drawing code from make_example $dc-Validate(); } cheers, Aldo -- Minimize network downtime and maximize team effectiveness. Reduce network management and security costs.Learn how to hire the most talented Cisco Certified professionals. Visit the Employer Resources Portal http://www.cisco.com/web/learning/employer_resources/index.html ___ Perl-Win32-GUI-Users mailing list Perl-Win32-GUI-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users http://perl-win32-gui.sourceforge.net/
Re: [perl-win32-gui-users] problem of reusing memory
On 24.03.2011 10:36, Jeremy White wrote: Hi, Cool - do some major testing with your app, and if things are still OK, the fix (well, a version of it) will get committed to CVS. I committed the changes to fix the -background option GDI object leak. I also added a -backgroundbrush option, which can be used instead of -background if you are creating a huge number of windows with the same background. eg. instead of: $window-AddLabel( -background = 0xff00ff, ... ); you can do this: use Win32::GUI::Constants; my $brush = Win32::GUI::Brush-new( -style = BS_SOLID, -color = 0xff00ff, ); $window-AddLabel( -backgroundbrush = $brush, ... ); this way you can effectively use the same $brush for several windows and avoid creating too much GDI objects. (of course you have to take care that $brush remains in scope, otherwise you may get errors or funny looking windows). the changes will be available with the next release of Win32::GUI. cheers, Aldo -- AppSumo Presents a FREE Video for the SourceForge Community by Eric Ries, the creator of the Lean Startup Methodology on Lean Startup Secrets Revealed. This video shows you how to validate your ideas, optimize your ideas and identify your business strategy. http://p.sf.net/sfu/appsumosfdev2dev ___ Perl-Win32-GUI-Users mailing list Perl-Win32-GUI-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users http://perl-win32-gui.sourceforge.net/
Re: [perl-win32-gui-users] New folder option on Browse for folder
On 31.08.2010 01:12, Hulley, Rob (APJ GCC Storage TPM) wrote: Hi Everyone, I am using “Win32::GUI::BrowseForFolder” . I cannot work out how to add the “create new” option as seen on other “browse for folder” windows. Is this feature available? hi, I just added two options to the BrowseForFolder function: -newui = 0/1 (default 0) use the new user interface (which has a New folder button) -nonewfolder = 0/1 (default 0) hides the New folder button (only meaningful with -newui = 1) those will be available with the next release of Win32::GUI. or if you don't want to wait, you can checkout the cvs and build Win32::GUI yourself :-) cheers, Aldo -- AppSumo Presents a FREE Video for the SourceForge Community by Eric Ries, the creator of the Lean Startup Methodology on Lean Startup Secrets Revealed. This video shows you how to validate your ideas, optimize your ideas and identify your business strategy. http://p.sf.net/sfu/appsumosfdev2dev ___ Perl-Win32-GUI-Users mailing list Perl-Win32-GUI-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users http://perl-win32-gui.sourceforge.net/
Re: [perl-win32-gui-users] problem of reusing memory
On 25.03.2011 11:07, Waldemar Biernacki wrote: Until now I rewrote my application to use the fix and first tests are really promising. By the way, this tremendous GDI object number was due to the fact that each label and textfield had its own font which in turn is just GDI object and the same with background. as I just wrote in another mail, there should be no problem with fonts, because you create them explicitly. this means the same GDI object is used for all controls. only the brush is created on-demand for background. Syntax of background color in Win32::GUI is little misleading (-background = 0xff) as it suggests that it is simple attribute of a widget. But it is not the case: each background is full GDI object too! Maybe - I am just speculating - that was the fundamental reason why the background color error raised? Who - at first sight - could see that there is a such big difference between -background and -foreground? the difference is in the Win32 API. they allow a plain COLORREF for foreground, but only a HBRUSH for background (even if you just want a solid color, you have to create a solid brush for this). I thought it was user friendlier to automatically create a brush of the given color. it's just that I forgot to clean it up afterwards :-) maybe it would be a good idea to add a -backgroundbrush option, so you can pass a Win32::GUI::Brush object to it and the same GDI object will be used for all controls, as with fonts. cheers, Aldo -- Enable your software for Intel(R) Active Management Technology to meet the growing manageability and security demands of your customers. Businesses are taking advantage of Intel(R) vPro (TM) technology - will your software be a part of the solution? Download the Intel(R) Manageability Checker today! http://p.sf.net/sfu/intel-dev2devmar ___ Perl-Win32-GUI-Users mailing list Perl-Win32-GUI-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users http://perl-win32-gui.sourceforge.net/
Re: [perl-win32-gui-users] problem of reusing memory
On 23.03.2011 15:42, Jeremy White wrote: I'm not sure the approach I use would help you as I draw the whole screen (fonts, graphics, backgrounds etc). I've looked at this again, and I think I've fixed the bug within Win32::GUI. You mentioned that you built Win32::GUI from scratch, so if you replace the DestroyWindow method in GUI.xs (around line 2231) with the code below it should fix things for you... I think this would be better placed in the Perlud_free() function found in GUI_Helpers.cpp. this is automatically called upon WM_QUIT message for all windows created by Win32::GUI, so you don't even need to relay on Perl calling DESTROY on objects. if you want, I can commit this to CVS as soon as I get to setup my dev. environment :-) cheers, Aldo -- Enable your software for Intel(R) Active Management Technology to meet the growing manageability and security demands of your customers. Businesses are taking advantage of Intel(R) vPro (TM) technology - will your software be a part of the solution? Download the Intel(R) Manageability Checker today! http://p.sf.net/sfu/intel-dev2devmar ___ Perl-Win32-GUI-Users mailing list Perl-Win32-GUI-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users http://perl-win32-gui.sourceforge.net/
Re: [perl-win32-gui-users] problem of reusing memory
On 19.03.2011 22:40, Waldemar Biernacki wrote: My question: Does anybode can show me how I could use the memory of deleted objects again? see http://sourceforge.net/mailarchive/message.php?msg_id=24270723, it should help with your issue. cheers, Aldo -- Colocation vs. Managed Hosting A question and answer guide to determining the best fit for your organization - today and in the future. http://p.sf.net/sfu/internap-sfd2d ___ Perl-Win32-GUI-Users mailing list Perl-Win32-GUI-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users http://perl-win32-gui.sourceforge.net/
Re: [perl-win32-gui-users] updating the window/screen
merryxmas wrote: i have tried many plans but failed. there is Update, and restore functions but it seems it is not working. after the wingui code i present a TK code to the same problem and it is working well. comparison with Tk is not fair, you are creating Labels with text . there, which will work with Win32::GUI too. but it's a pretty ugly approach :-) $DC-SetPixel($x,$y); change this line to: $DC-Line(0, 0, $x,$y); and you will have no overlapping redraw problems. still, however, a somewhat tricky approach :-) cheers, Aldo -- Throughout its 18-year history, RSA Conference consistently attracts the world's best and brightest in the field, creating opportunities for Conference attendees to learn about information security's most important issues through interactions with peers, luminaries and emerging and established companies. http://p.sf.net/sfu/rsaconf-dev2dev ___ Perl-Win32-GUI-Users mailing list Perl-Win32-GUI-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users http://perl-win32-gui.sourceforge.net/
Re: [perl-win32-gui-users] Save icon from Exe file
Alain Morillon wrote: Hi, Is there a solution in order to save into a file some Icons which has been extracted from Exe file ? there is an undocumented write_iconfile method in Win32::Exe::IconFile. so I guess this (untested!) is what you want: $icon-write_iconfile(foo.ico); cheers, Aldo -- This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev ___ Perl-Win32-GUI-Users mailing list Perl-Win32-GUI-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users http://perl-win32-gui.sourceforge.net/
Re: [perl-win32-gui-users] memory leak problem
Andrey wrote: Memory leak cannot be normal for any program. So, it is either Perl bug or Win32::GUI bug I don't know exactly where (or what) the bug is, but I found a workaround. problem is, the Win32 heap is not freed (or garbage collected, or whatever) while the window is active. if you minimize the window, you will see that the memory load goes down to less than 1MB. this is a well known issue Win32::GUI has, that can be observed also in several other Windows programs. now the good news: I've found a microsoft page (http://support.microsoft.com/kb/293215) that explains how to force the freeing of RAM. so this is the non-leaking code, using Win32::API: === use strict; use Win32::GUI(); use Win32::API; Win32::API-Import('kernel32', 'HANDLE GetCurrentProcess()' ); Win32::API-Import('kernel32', 'BOOL SetProcessWorkingSetSize(HANDLE hProcess, SIZE_T dwMinimumWorkingSetSize, SIZE_T dwMaximumWorkingSetSize)' ); my $main = Win32::GUI::Window-new(-name = 'Main', -text = 'Perl', -width = 200, -height = 200); my $label = $main-AddLabel(-name = Label, -text = Hello, world, -left = 20, -top = 20, -notify = 1); sub Label_Click { for (1..1) { $label = $main-AddLabel(-name = Label, -text = rand(), -left = 20, -top = 20, -notify = 1); } # trim RAM usage SetProcessWorkingSetSize(GetCurrentProcess(), -1, -1); } $main-Show(); Win32::GUI::Dialog(); sub Main_Terminate { -1; } === you will notice that the RAM goes up to several MB then, when the loop ends, it goes down to ~1MB. I guess Windows does this to speed things up, and the KB page seems to suggest that trimming RAM is probably making your program run slower. so it's your choice, basically, to favour speed over RAM allocation or vice versa. at least, that's my understanding of it :-) for normal GUI applications, speed should not be so crucial (unless you're developing a videogame :-), so it's probably safe to call SetProcessWorkingSetSize() once in a while in your program if you're afraid of sucking up too much RAM. maybe the very same call could be added directly somewhere in the Win32::GUI code... happy 2010 to all! cheers, Aldo -- This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev ___ Perl-Win32-GUI-Users mailing list Perl-Win32-GUI-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users http://perl-win32-gui.sourceforge.net/
Re: [perl-win32-gui-users] I'm here
Erick Bourgeois wrote: Great to see you back. I installed and played with CGI::Kwiki. The main problem I have with this module/application is that users need to learn the wiki language. (For example, to make a the H4 tag, you must put 4 = before and after the word(s).) I am planning to use plain POD for the Kwiki, there will be no need for wiki markup itself. The benefit of the content manager I use is that it uses HTML and thus it has no learning curve in this respect. May I ask what you found to be difficult? I've used it very little, but for example I seem to remember that making a link from a page to another one was a little messy (since the pages seem to be dinamically generated). but above all, the main problem is that I don't want HTML documentation, but rather POD that can be translated to HTML. translating from HTML to anything else is more painful (not impossible, but painful). and having the documentation in POD is unarguably a benefit (think about perldoc, search.cpan.org, etc.) Aldo, I really do believe this should help, otherwise it would be a bit cumbersome to completly move away from this and transfer over to CGI::Kwiki. But, like I said in an earlier post, if people really don't like it, then I guess I could switch over to CGI::Kwiki. so let's ask people what they prefer. I, personally, would go with CGI::Kwiki with native POD format for editing. let's vote this and decide :-) cheers, Aldo __END__ $_=q,just perl,,s, , another ,,s,$, hacker,,print;
[perl-win32-gui-users] I'm here
hello Win32::GUI people I'm here, I'm here! I'm very, very sorry for my latitance. I know I have promised a lot of things, a lot of times, and never respected what I said. please accept my excuse for this. and I'm very, very happy to see things moving and people willing to help. as it is clear at this point, I'm not in the position to continue developing Win32::GUI all alone. but I'm not going to give up the project. if there is something useful for the community I can do acting as a coordinator (sort of pumpking, in Perl terms), I'll be very happy to coordinate. if someone feels like taking over the whole stuff, I'll be very happy to be just a member of a team of developers. my current development version of Win32::GUI has many bugfixes, but the internals are being heavily reworked (to support NEM more natively) and there are many non-working features. as an open question to anyone interested, I ask: do you think it is better to keep the rewrite off for a while and work on bugfixing the current release, or do you prefer working with me on the new internals? I can give all the tech help (eg. about XS and about how Win32::GUI works) to people who want to be part of the dev team. there's a mailing list (perl-win32-gui-hackers) that I set up just for this task. so, if you want CVS commit access on SourceForge, just give me your SourceForge user name and I will set it up. the -hackers mailing list can also be used to ask questions about how SourceForge and/or CVS works. regarding the documentation, I appreciate what Erick did, but I found it a little difficult to work with. I think a wiki (with CGI::Kwiki, for example) would be a better start. we could also write in POD so that the documentation could be more easily integrated in the CPAN distribution. I'm still backlogging all the messages on the list, so I will have more to elaborate on later. for now, please accept my most sincere and humble apologies for being such a non-existant person for so much time :-( cheers, Aldo __END__ $_=q,just perl,,s, , another ,,s,$, hacker,,print;
Re: [perl-win32-gui-users] Problems formatting text box - Favour! !
Ounsted, Toby wrote: Hi, Would someone be able to test the below and confirm whether it's just me? Specifically I can't get coloured text if the 'align' is in place for the text field, but commented out the colours come back. What am I doing wrong?! Toby, it doesn't show this behaviour for me. the colors are always correct. but nonetheless: -align = center, should be: -align = center, hope this helps. cheers, Aldo __END__ $_=q,just perl,,s, , another ,,s,$, hacker,,print;
Re: [perl-win32-gui-users] Dynamic entrys
Peter Eisengrein wrote: for ($x=1; $x = $mechs; ++$x) { $main-MECH$x-Text($MECH{$x}{'name'}\'s best Strength setting is $MECH{$x}{'best'}.); } you can access sub-windows (eg. controls) as hash keys of the main window. change your code to: $main-{MECH$x}-Text( blah blah blah... ); cheers, Aldo __END__ $_=q,just perl,,s, , another ,,s,$, hacker,,print;
Re: [perl-win32-gui-users] [Win32::GUI] List of missing desired widgets
Fred P. wrote: So here's my wish list: =) [ Some of them already exist ] hi Fred, I've commented your list giving the (probable) Win32::GUI equivalents to the widgets you mention. if you, or somebody else, has some comments, feel free to share :-) Standard: = TMainMenu: Main Menu(top window menu) Win32::GUI::Menu TPopupMenu: Pop up Menu (right-click menu) Win32::GUI::Menu (sub-menus can be used with the TrackPopupMenu function) TLabel: Label Win32::GUI::Label TEdit: Textbox Win32::GUI::Textfield TPassword: Textbox for password Win32::GUI::Textfield (with -password = 1) TMemo: MultiLine TextBox area Win32::GUI::Textfield (with -multiline = 1) TButton:Button Win32::GUI::Button TCheckBox: Check Box Win32::GUI::Checkbox TRadioButton: Radio button (element of a group) Win32::GUI::RadioButton TListBox: List box Win32::GUI::Listbox TComboBox: Combo box Win32::GUI::Combobox TScrollBar: Scroll bar vertical or horizontal missing, but do we need one? TRadioGroup:Panel Box container for radio buttons set missing, and we need one :-) Additional: { Custom widget adjacement } === TBitBtn:Image with a bitmap on it left hand side with text don't know what it is. TMaskEdit: TEdit with RegExp input validation mask should be easy with a few lines of code? TStringGrid:Excel like Grid widget for text only TDrawGrid: Excel like Grid widget for text or image see Win32::GUI::Grid by Laurent Rocher TImage: Image container Win32::GUI::Label (with -bitmap = $Bitmap) TShape: Shape object: Rectangle, oval, square, circle, rounded box Win32::GUI::Graphic (or InteractiveGraphic) (mostly) TBevel: 3D Line seperator for visual grouping Win32::GUI::Groupbox (maybe?) TScrollBox: ListBox with horizontal scrolling Win32::GUI::Listbox TCheckListBox: ListBox with check marks Win32::GUI::ListView (with -checkboxes = 1) Win32: {COMCTL32.DLL version 4.70 or later} == TTabControl:Tab page TPageControl: Tab page controller actually only Win32::GUI::Tabstrip TRichEdit: WordPad like Memo container area with font and images Win32::GUI::RichEdit TTrackBar: Sound slider don't know what it is TProgressBar: Installation like progress bar Win32::GUI::ProgressBar TUpDown:Up/Down button THotKey:HotKey tracking visible container missing. TMonthCalendar: Microsoft Calendar missing. TDateTimePicker:Microsoft Calendar inside a combo box Win32::GUI::DateTime TTreeView: Tree view component Win32::GUI::TreeView TListView: List view component Win32::GUI::ListView TStatusBar: Status bar component Win32::GUI::StatusBar TToolBar: MS Office Tool Bar container Win32::GUI::Toolbar TCoolBar: MS Office Tool Bar with scroll container see Win32::GUI::Rebar TPageScroller: MS Office Tool Bar with scroll and moveable container Win32::GUI::Rebar System: === TTimer: Auto-restart count-down Timer event driven {SetTimer and KillTimer, and to simplify processing the WM_TIMER messages} Win32::GUI::Timer TMediaPlayer: Media Player button (play, pause, stop, ff, rew, prev, next, rec, eject) {Custom bitmap button with predefined callback} Win32::GUI::Animation (very limited, tho) TOleContainer: Interface to OLE 2.0 object container {InsertObjectDialog can be called to embed or link to an OLE 2.0 object} see Win32::GUI::AxWindow by Laurent Rocher Internet: (Internet Explorer SDK documented on MSDN) = TCppWebBrowser: Internet Explorer Embedded DCOM Container see Win32::GUI::AxWindow by Laurent Rocher Samples: (bunch of widget hook-up together) TCSpinEdit: TextBox with up/down button embedded missing. Dialogs: (Windows SDK documented on MSDN) TOpenDialog:Windows Open dialog Win32::GUI::GetOpenFileName TSaveDialog:Windows Save dialog Win32::GUI::GetSaveFileName TOpenPictureDialog: Windows Open dialog with picture preview TSavePictureDialog: Windows Save dialog with picture preview missing. TFontDialog:Windows Font picker dialog Win32::GUI::ChooseFont TColorDialog: Windows Color picker dialog Win32::GUI::ChooseColor TPrintDialog: Windows Print dialog TPrintSetupDialog: Windows Print setup dialog TFindDialog:Windows Find dialog TReplaceDialog: Windows Replace dialog missing. Homemade dialogs: (Windows SDK documented on MSDN) = TOpenWebDialog: Windows Open dialog with Internet Explorer preview TSaveWebDialog: Windows Save dialog with Internet Explorer preview missing. cheers, Aldo __END__ $_=q,just perl,,s, , another ,,s,$,
Re: [perl-win32-gui-users] CALL FOR BUGS (was: The status of win32::gui)
Jeremy White wrote: Aldo, How do you want them submitted - via this list or via sourceforge? if you have access to SourceForge, this is certainly the preferred way. but a quick note on this list will help, too :-) cheers, Aldo __END__ $_=q,just perl,,s, , another ,,s,$, hacker,,print;
Re: [perl-win32-gui-users] CALL FOR BUGS (was: The status of win32::gui)
Maksim Golunov wrote: Provide support for WinXP: - WinXP control look what do you mean by this? - Window color (just run some window with labels on WinXP with standard theme and you'll see) I know, the white background. this is fixed now (I *really* do hate Microsoft technical documentation writers, y'know :-). cheers, Aldo __END__ $_=q,just perl,,s, , another ,,s,$, hacker,,print;
Re: [perl-win32-gui-users] CALL FOR BUGS (was: The status of win32::gui)
Jeremy White wrote: I assume he means that buttons and other controls in the standard XP theme have different colours, curved edges etc. Also, under XP, the window is a physically a different size than the one specified (due to the larger boarders of the window I guess), which means the controls are slight off in their positions in the window. yes, is correct. but I have absolutely no idea how to go about this. if someone has some relevant pointer in the Microsoft SDK documentation (or evsome ready-made code :-), please let me know! cheers, Aldo __END__ $_=q,just perl,,s, , another ,,s,$, hacker,,print;
Re: [perl-win32-gui-users] CALL FOR BUGS (was: The status of win32::gui)
Maksim Golunov wrote: Perhaps, this may be of interest for you: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwxp/h tml/winxpintro.asp http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwxp/h tml/xptheming.asp interesting, but don't work for me. I've added a .manifest file, added the resource identifier line to GUI.rc, added #define SIDEBYSIDE_COMMONCONTROLS 1 in the header file, but the look doesn't change. I presume all this works with the Visual Studio 7 compiler, which I don't own. if anybody can test this, I will send him the Win32::GUI current source (off-list). cheers, Aldo __END__ $_=q,just perl,,s, , another ,,s,$, hacker,,print;
Re: [perl-win32-gui-users] The status of win32::gui
Jeremy White wrote: What is the status of win32::gui - is it being actively developed? I emailed httptech a couple of days ago and just go lots of undeliverable messages. yes, it is being actively developed. I'm currently working on the internals and I expect to have version 1.00 ready for Easter (but don't hold your breath on it). It seems a few people in the last few days (Laurent Rocher and Trevor Garside) could actually move the project on if they had access to the site. that's perfectly fine for me. please, anybody who want full access to the project on SourceForge (including CVS, file release, etc.) drop me a line with your SF username and I'll do it. Is Aldo still reading this list? yes, I'm reading :-) cheers, Aldo __END__ $_=q,just perl,,s, , another ,,s,$, hacker,,print;
[perl-win32-gui-users] CALL FOR BUGS (was: The status of win32::gui)
Garside, Trevor wrote: Aldo, that's great news! Along those lines, yes, I would love to be able to see the changes you've been working on for the next release. I will release it on CVS so you can download it before the release. there aren't really big changes, just a huge cleanup and some subtle changes in the event model. and bugfixes, of course (see also below). And, for fun, here's a list of problems I've found, just in case you don't know about them: this is a great idea indeed. I would really appreciate if someone could summarize all the problems that popped up recently (or not so recently, but still need a fixation) so that I can build a bugs list and try to correct everything. so, if you found any bug, please submit them *now*! cheers, Aldo __END__ $_=q,just perl,,s, , another ,,s,$, hacker,,print;
[perl-win32-gui-users] Win32::GUI Release 0.0.665
hello people, finally, an update! this release of Win32::GUI introduces many new features, the most important being: - the NEM (New Event Model), which allows for something like: $Window-AddButton( -text = 'say hello', -onClick = sub { print hello, world!\n; }, ); *** editor's note *** there are actually many gotchas with NEM, I'll elaborate more on this in a separate post. - tooltips are now supported on most controls with the -tip = STRING option. - ListView checkboxes can now be managed with the ItemCheck() method; there's also a new ItemCheck event for ListViews that gets fired when you toggle an item's checkbox. the biggest changes are in the codebase, which is now splitted in several files. please note that something - particularly the NEM - may be broken in this release (you already knew it, huh? ;-) source code is available at my site (http://dada.perl.it, which is up and running again :-) and at SourceForge. PPM binaries will follow ASAP -- if someone wants to pack the binaries for us, please do it (you'll certainly be faster than me ;-) and send me the files so that I can put it online. cheers, Aldo __END__ $_=q,just perl,,s, , another ,,s,$, hacker,,print;
Re: [perl-win32-gui-users] printer support
Borus, Gabor wrote: Here you are: The first section is an API call to show the standard printer dialog, the second section is an example from the Win32::NPRG module. It detects your installed printers, you can select a printer, and it prints a little example to the selected printer. looks fine, but what are Win32::NPRG and Win32::Wingraph? they can't be found on CPAN. the last one, in particular, seems to me like a lot of duplication of efforts. most of the DC functions are already implemented in Win32::GUI, and those which aren't could be implemented there. another Typical Open Source nonsense, as someone said ;-) cheers, Aldo __END__ $_=q,just perl,,s, , another ,,s,$, hacker,,print;
Re: [perl-win32-gui-users] Method Combobox-ChangeItem(-top = 100, -left = 150) not working?
Eric Hansen wrote: I get an error message when I try to dynamically change the position of a combobox widget. I have successfully used the ChangeItem method for ListView controls. Is this not a valid method for comboboxes? no, it is not valid. if you want to change the position of the combobox, use this: Combobox-Change(-top = 100, -left = 150); or this: Combobox-Move(100, 150); cheers, Aldo __END__ $_=q,just perl,,s, , another ,,s,$, hacker,,print;
Re: [perl-win32-gui-users] Latest Documentation?
Gossett, Malachy wrote: Not a lot out there. Typical Open Source nonsense. go program in Visual Basic, quick, it will make a lot of sense for you. Dada's site really isn't worth much. Don't know why it is still there. because is MY site and I like it, ok? Sourceforge.net is good, since they maintane it THEY? what did you said again? THEY maintain??? I don't know did put all this b**t in your head, but SOURCEFORGE is not mantaining my module at all. heck, they're not maintaining anything except SourceForge itself! it is *ME* that is maintaining the project there, got it? next time, please think twice before spreading such nonsense. to the list: sorry if I sounded too rude, but this guy really did upset me. cheers, Aldo __END__ $_=q,just perl,,s, , another ,,s,$, hacker,,print;
Re: [perl-win32-gui-users] RichEdit's, I-Beams, and Cursor Not Updating?
Morbus Iff wrote: Any ideas? The latest code I'm using is here: this is a bug. it will be solved with the next release. cheers, Aldo __END__ $_=q,just perl,,s, , another ,,s,$, hacker,,print;
Re: [perl-win32-gui-users] Systray Double Clicks Not Working?
Morbus Iff wrote: How come this will work: sub _Systray_Click { $window-Enable; $window-Show; } but this won't: sub _Systray_DblClick { $window-Enable; $window-Show; } next version will have a _DblClick event for NotifyIcons. don't know why I didn't put it there before, but I'm doing it now :-) cheers, Aldo __END__ $_=q,just perl,,s, , another ,,s,$, hacker,,print;
Re: [perl-win32-gui-users] HOWTO: Modal windows
Johan Lindstrom wrote: At 10:08 2002-10-22 +1000, Rogers, John wrote: note that this function must be called without ANY parameter or instantiation (eg. don't call it as method of a created object): Win32::GUI::Dialog(); # correct $Window-Dialog();# !!!WRONG!!! So, it's not an un-documented feature, it's a documented un-feature. I'll go get that Doh! now :) well, this is a very tricky point. in fact, you can do $Window-Dialog() (there is very little that you can't do), but it's just that *usually*, *most of the times*, this is not what you want. I was using $Window-Dialog() and it seemed to work fine, until I implemented Comboboxes. drop-down Comboboxes use their own windows, so if you have a drop-down Combobox in your $Window and you called $Window-Dialog, the drop-down box will not show at all (it will be blank and unresponsive to user input). so I stated that doing $Window-Dialog is wrong, because it produces undesiderable effects. however, if you are not using drop-down Comboboxes, this may be just what you want ;-) cheers, Aldo __END__ $_=q,just perl,,s, , another ,,s,$, hacker,,print;
[perl-win32-gui-users] I'M BACK!!!
hello people! finally I'm back on this list (I had lost any hope it would happen again :-). to make a long story short, this is what happened: 1. at some point, SourceForge decided to refuse receiving mail from servers that didn't allow null sender (don't ask me why, it's some SMTP stuff that I don't grok). 2. my mail server was not allowing this, so I could not post anymore. 3. I also have a job email access, so I setup an address there just to be on this list. 4. at some point, my job's ISP decided to disallow null sender, so I was out with that address too :-( 5. some days ago, a friend of mine pointed me at a misconfiguration on my own mailserver (and I said: doh! :-) 6. I have fixed this and now everything rocks again! this gives me new thrust to keep on developing Win32::GUI. this, and the quantity of mail and messages (on IRC, PerlMonks, etc.) of people that just love this module :-) I will try to backlog the mailing list and reply to unanswered questions, a new version is in development and will be out soon. happy to be with you again, Aldo __END__ $_=q,just perl,,s, , another ,,s,$, hacker,,print;
Re: [perl-win32-gui-users] Extracting and displaying Icon
Alex Lee wrote: Hi all, Iam trying to extract an icon from a dll file like such: code my $A = 0; my $B = 'shimgvw.dll'; ## I want icon 1 in this dll file my $apiExecute = new Win32::API(Shell32, ExtractIcon, ['P','P','N'], 'N'); my $hIcon= $apiExecute-Call($A,$B,1); The problem is that the above method returns a handle (whatever that means) to the icon. I need a way to either convert the handle into an actual icon or just display it. you can already treat the handle as an actual icon. each GUI object that has an handle can be passed to Win32::GUI functions as it were a regular Win32::GUI object. the only difference is that it's not blessed, so you can't call methods on it. so you can do for example: $Window-ChangeIcon( $hIcon ); the same applies to windows too, so you can do the following: my $hWnd = Win32::GUI::GetDesktopWindow(); print Win32::GUI::Height($hWnd); but not $hWnd-Height(); the trick is that Win32 APIs *always* want handles as their parameters, so Win32::GUI does the following: if the value is a reference (eg. a blessed perl var), it fetches the {-handle} key from the underlying hash, otherwise it uses the value as a numeric (eg. the handle itself). cheers, Aldo __END__ $_=q,just perl,,s, , another ,,s,$, hacker,,print;
Re: [perl-win32-gui-users] Testing fork() , because I want to download with lwp
Guillem Cunillera Wefers wrote: I include this simple program because I want to download some web pages without losing the user interaction. How I have to change this code in order to avoid the error in the second click ? which is the error in the second click? I ran your program and everything seems fine. this is the output after clicking on 'OBTENIR DADES' three times (the button stays disabled for approx. 1 second then I can click on it again): A acabo click B A acabo click B A acabo click B adeu! no error as far I can see... cheers, Aldo __END__ $_=q,just perl,,s, , another ,,s,$, hacker,,print;
Re: [perl-win32-gui-users] Dinamic windows...
Guillem Cunillera Wefers wrote: [...] $b_guardar{$est_alu-{Nom}} = $w_analisi{$est_alu-{Nom}}-AddButton( -text = GUARDAR, # Text al botó -font = $Mailtool::mevesfonts::fo_normal, -left = 520, -top = 85, -height = 25, -name = Mailtool::tutor::b_${est_alu-{Nom}}, # the line above should read: -name = Mailtool::tutor::b_$est_alu-{Nom}, How I can receive the event for every instance of button ?? do something like: eval qq{ sub Mailtool::tutor::b_$est_alu-{Nom}_Click { Mailtool::tutor::b_Click( $est_alu-{Nom} ); } }; this will call the generic Mailtool::tutor::b_Click subroutine, passing $est_alu-{Nom} as its first parameter. you can then perform appropriate actions for your instance. cheers, Aldo __END__ $_=q,just perl,,s, , another ,,s,$, hacker,,print;
Re: [perl-win32-gui-users] -style = WS_VISIBLE | 2 | WS_NOTIFY,
NAHUM Marc wrote: hye, where can i find a doc on the stlyle like this one : -style = WS_VISIBLE | 2 | WS_NOTIFY, http://msdn.microsoft.com/library cheers, Aldo __END__ $_=q,just perl,,s, , another ,,s,$, hacker,,print;
Re: [perl-win32-gui-users] problems with combobox
[EMAIL PROTECTED] wrote: problem is when i click on the comboxbox it will only list 1 entry (there are 2) InsertItem() can insert only one item at a time. use this instead: $dunlist-Add(@dunentries); and both $Window and $Window2 will freeze. what am i doing wrong? you should not call $Window2-Dialog(), because it will intercept messages from $Window2 *only*. Comboboxes fire their own messages, so you need a Dialog() call that intercepts everything: Win32::GUI::Dialog(); also is there a way to stop a window from being resized? use -resizable = 0 when building the window. is there a way to open a window maximized. call $Window2-Show(3); # 3 == SW_SHOWMAXIMIZED and (i think this is the last one) is it possible to make the widgets sticky like in tk? dunno what it means... cheers, Aldo __END__ $_=q,just perl,,s, , another ,,s,$, hacker,,print;
Re: [perl-win32-gui-users] Win32-GUI Applications causing ILLEGAL OPERATION
Piske, Harald wrote: I know that previous versions of GUI were fault-tolerant towards missing -name parameters, which 558 is NOT. BTW, release 0.0.665 is fault-tolerant towards missing -name parameters. this bug was introduced in release 0.0.558 and is now gone away. cheers, Aldo __END__ $_=q,just perl,,s, , another ,,s,$, hacker,,print;
Re: [perl-win32-gui-users] Win32::GUI Release 0.0.665
Frazier, Joe Jr wrote: but I still don't know what to do when you just say use Win32::GUI ;-) vote type=my opinionUse old style by default. This avoids users having to change thier code until they are ready to totally update thier code./vote yes, this is sure. by default the old style is used, the problem is when you don't use it and put an -events option on something. maybe I should process -events options *only* if you said: use Win32::GUI Event_Model = 'byref'; otherwise they're simply ignored. I would probably do something simular to the way XML::SAX::* works and do this [...] -events = { Terminate = $gui-myhandler(); not quite... should be something like: Terminate = \{ $gui-myhandler }; arguments to -events can be: - a subroutine name (string) - a reference (eg. \) - an anonymous sub (eg. sub { .. }) BTW, I didn't understand the use of My::Package ... but maybe it's just me. Now, the question is, how does it work to pass in stuff such as the listview passing the row clicked? or do we have to handle all that ourselves? If this is covered in the docs(are the docs more fleshed out?), let me know and I will check there. ops, sorry, I forgot to mention this :-) for your joy (and many other's too), all NEM events pass the object they're referring to as their first argument, while subsequent arguments are the same as their non-NEM counterparts. so you can do this: $Window-AddButton( # ... -name = Button1, -onClick = sub { my($self) = @_; print you clicked button: $self-{-name}\n; }, ); and this will print out: you clicked button: Button1 an ItemClick event for a ListView would look like: -onItemClick = sub { my($self, $item) = @_; # do something with $item }, Sorry to be a pain, but i am so excited to check this out and have a few questions on gotchas I have ran into in the past before migrating. don't worry, this kind of pain is welcome :-) cheers, Aldo __END__ $_=q,just perl,,s, , another ,,s,$, hacker,,print;
[perl-win32-gui-users] Win32::GUI Release 0.0.665
hello people, finally, an update! this release of Win32::GUI introduces many new features, the most important being: - the NEM (New Event Model), which allows for something like: $Window-AddButton( -text = 'say hello', -onClick = sub { print hello, world!\n; }, ); *** editor's note *** there are actually many gotchas with NEM, I'll elaborate more on this in a separate post. - tooltips are now supported on most controls with the -tip = STRING option. - ListView checkboxes can now be managed with the ItemCheck() method; there's also a new ItemCheck event for ListViews that gets fired when you toggle an item's checkbox. the biggest changes are in the codebase, which is now splitted in several files. please note that something - particularly the NEM - may be broken in this release (you already knew it, huh? ;-) source code is available at my site (http://dada.perl.it, which is up and running again :-) and at SourceForge. PPM binaries will follow ASAP -- if someone wants to pack the binaries for us, please do it (you'll certainly be faster than me ;-) and send me the files so that I can put it online. cheers, Aldo __END__ $_=q,just perl,,s, , another ,,s,$, hacker,,print;
[perl-win32-gui-users] test
just testing. it seems that for some reason my messages do not reach the mailing list... I receive others just fine, but not my own messages, so I'm not sure you receive them as well. if you read this, please can you reply to my mail ([EMAIL PROTECTED]) to ensure that everything is fine? thankyou and cheers, Aldo __END__ $_=q,just perl,,s, , another ,,s,$, hacker,,print;
Re: [perl-win32-gui-users] Win32-API version 0.20
Jeremy Blonde wrote: ...I can't seem to get to his site anymore... sorry people, I'm having problems with the DNS people at my ISP, should be solved in a couple of days (I *really* hope :-). in the mean time, you can access my site at this address: http://www.perl.it/dada/ the regular, official address still remains: http://dada.perl.it cheers, Aldo __END__ $_=q,just perl,,s, , another ,,s,$, hacker,,print;
Re: [perl-win32-gui-users] bug_or_feature [1]
Renat Araslanow wrote: thanks a lot! but dont u think that this can be documented? of course it could, if only I had time to do it. and then, I never needed vertical text on a label, so who ever imagined this? :-) and who maintain documentation. unfortunately, it's me :-( as I said several times already, if you (or anybody else) want to take over this task, I'll be very, very, very glad. PS% and how about buttons valign bug? possibly my fault, I'll look into it. cheers, Aldo __END__ $_=q,just perl,,s, , another ,,s,$, hacker,,print;
Re: [perl-win32-gui-users] bug_or_feature [1]
Renat Araslanow wrote: Subject: Can't see label with user defined font Reason: '-escapement' tag in font definition this is a (rather unpleasant) feature :-) the label is there, and the text is even rotated 90╟, but it falls outside of the label area. the reference point for the text is the upper left corner of the label, so when you rotate it, the text is above the label area. the following ASCII art should (hopefully) explain what's happening: T X E T +--++--+ |TEXT || | +--++--+ normal rotated I did some research and found that, in order to see at least some of the text inside the label, you need this: $W-AddLabel( -name=ok, -left=0,-top=100, -width=500,-height=500, -align = 'center', # center horizontally -addstyle = 0x200, # SS_CENTERIMAGE (center vertically) -font=$font1, -text=ooo, ); the only drawback to this is that SS_CENTERIMAGE works only for a single-line text. if you try it with more than one line, it just doesn't wrap. another pretty ugly workaround to fit the text in the label area is to add some newline before the text (eg. -text = \r\n\r\noo). when i write in C and use it - it working pretty good. you should've been writing something else, because in C it works exactly the same way as Win32::GUI. cheers, Aldo __END__ $_=q,just perl,,s, , another ,,s,$, hacker,,print;
Re**8: [perl-win32-gui-users] Kill event?
Amit Singh wrote: Hello, This account closes on 31st July 01. Kindly mail me at [EMAIL PROTECTED] this address has been unsubscribed, sorry for the inconvenience :-) cheers, Aldo __END__ $_=q,just perl,,s, , another ,,s,$, hacker,,print;
Re: [perl-win32-gui-users] Win32::GUI::Timer memory leak?
Peter Eisengrein wrote: 0.0.502 -- I actually just pulled it off your site maybe two weeks ago. Is there an even newer version? Thanks for your help -- I love this module! uhm... my site contains version 0.0.558, it was uploaded on 22 Jan 2001. you probably have a (way too much) caching proxy :-) cheers, Aldo __END__ $_=q,just perl,,s, , another ,,s,$, hacker,,print;
Re: [perl-win32-gui-users] Win32::GUI::Timer memory leak?
Peter Eisengrein wrote: Is there a known memory problem with the GUI module and/or the Timer object? I have a script that runs through a _Timer sub once per second and increments a var (like $count++) and writes it to a Label. Just sitting there quietly doing nothing more than that adds 4k to the process' memory every second or two (or three -- it's not very exact). I would expect a *little* more memory to be used but these 4k's add up over time. Just curious. yes, there was a memory leak but it should have been fixed is one of the last releases. which version of Win32::GUI are you using right now? cheers, Aldo __END__ $_=q,just perl,,s, , another ,,s,$, hacker,,print;
Re: [perl-win32-gui-users] Show In Taskbar
Glenn Linderman wrote: Perhaps the desktop could be used, if there was a way to get its handle into a Win32::GUI::Window object. my $desktop = Win32::GUI::GetDesktopWindow(); cheers, Aldo __END__ $_=q,just perl,,s, , another ,,s,$, hacker,,print;
Re: [perl-win32-gui-users] Win32::GUI::Icon and Win32::Console - an icon for a console
Johan Lindstrom wrote: Untested, but try something like this: my $icoDOS = ... create your icon object here ...; my $hwindDOS = Win32::GUI::GetPerlWindow(); Win32::GUI::SetIcon($hwindDOS, $icoDOS, 0); it works, but it's only a temporary change; when the icon needs to be repainted (eg. if you minimize the window or move the upper left corner out of sight), the icon reverts to the default one. SetIcon (as SetCursor, BTW) only draws its content one time, it does not change it permanently. AFAIK, there's no way to permanently change the DOS window icon with Win32::GUI. cheers, Aldo __END__ $_=q,just perl,,s, , another ,,s,$, hacker,,print;
Re: [perl-win32-gui-users] Windows freezing
[EMAIL PROTECTED] wrote: I do not think it is a problem of LWP but Win32::GUI. because when I used to run very similar procedure as a CGI script under Apache web server, that is without Win32::GUI ,there were not such problems. woah! this is, perhaps, the most pure nonsense since the epoch ;-) CGI programming and GUI (or even 'proper') programming are two very different beasts. you just can't compare them. your CGI script did indeed 'freeze' just as your Win32::GUI script does, but you were on the other side of an HTTP connection, so you didn't noticed this (in fact, staring at the browser waiting for data to come is the CGI equivalent of 'freezing' :-). but in this case, there is no 'other side', so your whole program is blocking (thus no UI -- user interaction) while LWP is working. this is not a problem of LWP, neither a Win32::GUI one. the real 'problem' here is in the programming approach. you need to perform two tasks in parallel (UI and LWP fetching its stuff), so guess what you need? multithreading! try this: perldoc -f fork perldoc perlfork not the easiest thing in the world, but this is the right way. cheers, Aldo __END__ $_=q,just perl,,s, , another ,,s,$, hacker,,print;
Re: [perl-win32-gui-users] Perl Oasis
Lam, Nhat-Hung wrote: Johan, The binary also did not work for me (Windows NT 4 - SP6). I tried to install all related modules in order to be able to run from the source code, one still missing is WIN32::API 0.20. I don't have the C compiler, I then installed it via ActiveState PPM but the only version available is API 0.01 and the Perl Oasis does not work as expected. I would appreciate if someone could send a compiled version of Win32-API 0.20 to me? I am using Perl ActiveState 5.6 build 623. get it from http://dada.perl.it/PPM/ :-) cheers, Aldo __END__ $_=q,just perl,,s, , another ,,s,$, hacker,,print;
Re: [perl-win32-gui-users] Win32::GUI FAQ
[EMAIL PROTECTED] wrote: Hello Aldo in order to get started, where can I find the most up-to-date WIN32::GUI documentation version? I probably have a very outdated one on my PC. I'll send it to you. And a second question, is there any model FAQ document you recommend as a basis? Otherwise, I would just take the perlfaq.html document of the core perl documentation as a basis and adopt it. Is that fine for you? completely fine. cheers, Aldo __END__ $_=q,just perl,,s, , another ,,s,$, hacker,,print;
Re: [perl-win32-gui-users] .plan
Laurent ROCHER wrote: hello hi Laurent! -onClick = \DoSomething Good. yup :-) Not obscure at all ;-) but a very difficult point. I have think a little about this and i have notice 2 things. * With only one event fonction (actual NEM) it's possible to call the DoSomethingElse function in the DoSomething function. yes, I know, but in your example the 'implementer' is responsible for calling the package event (eg. $self-OnClick), which is not a good way to create subpackages... so I don't like this approach. * With event queue Problem for the new package method. For example : - the package need to add a click event function - the user create an object with a click event function How create the click event array ? yes, that's the problem. I haven't figured yet a 'package-writers' API... I should think of a real world example of this and try to model in pseudocode first :-) - order problem between user event and package event. package event should always come first and decide what to do (eg. do some stuff, then cal user event, then do some other stuff... or don't call the user event at all, if it so decides). - If user don't want default package click event. this should be left as an option to the package writer. for example, s?he could relay on the user event's return value. 0 == don't process default (package) event, 1 == process it. this is the way Win32::GUI actually works with DefWindowProc() after all. Win32::GUI::JPEG allow *read* support for JPEG images, using libjpeg (see ftp://ftp.uu.net/graphics/jpeg). JPEG files can be converted to in-memory bitmaps and then used as regular Bitmap objects. (NOTE: I'm *not going* to develop Win32::GUI::GIF. GIF is absolutely deprecated, I'll look into PNG support eventually). After some search about this point, I found a free open source code project named FreeImage. way cool, I will implement this. seems lot easier than libjpeg (even the installation is much easier and it comes with binaries too). BTW, I will also try to release a standalone Perl module for this library (eg. Image::Free :-). I can help you for this point. you're welcome! let's discuss it on Perl-Win32-GUI-hackers. cheers, Aldo __END__ $_=q,just perl,,s, , another ,,s,$, hacker,,print;
Re: [perl-win32-gui-users] Re: How to keep my window not hidden
Hirosi Taguti wrote: Thank you but may I continue more? This -topmost option cann't be changed after creation? Below code works fine on re-sizing, but not on -topmost. no, it doesn't work (yet); changing -topmost requires an additional bit of code that I wasn't afare of until recently :-) I'll fix this in the next release. cheers, Aldo __END__ $_=q,just perl,,s, , another ,,s,$, hacker,,print;
[perl-win32-gui-users] .plan
hello perl-win32-gui-users, this is my dot plan about Win32::GUI, what I'm doing and what I plan to do. please note that everything here may change (without further notice) depending on my other activities (namely job and 'real life' :-). it would be kewl if you could 'prioritize' the list based on what you find more useful (or funny :-), and above all (pardon the caps): IF YOU CAN HELP ME WITH SOMETHING, PLEASE DO! that said, this is the list: NEM (New Event Model) I'm almost done with this, but there are still some flaws. I will also define the API to manage events (eg. AddEvent or BindEvent or ResetEvent or something like this...). I'm also adding the possibility of 'shortcut' options a la Javascript, like: -onClick = \DoSomething Event Queues this is something I didn't really explored yet, but I would like to process a list of events. should look somehow like this: -events = { Click = [ \DoSomething, \DoSomethingElse ] } in other words, when a Click events occur first DoSomething is executed, then DoSomethingElse. the main purpose for this is to allow subpackages to define their own event handlers which can be 'overriden' by the implementation in the program. (if it doesn't sound clear, don't worry, is still mainly obscure to me too :-) Win32::GUI::JPEG allow *read* support for JPEG images, using libjpeg (see ftp://ftp.uu.net/graphics/jpeg). JPEG files can be converted to in-memory bitmaps and then used as regular Bitmap objects. (NOTE: I'm *not going* to develop Win32::GUI::GIF. GIF is absolutely deprecated, I'll look into PNG support eventually). Win32::GUI::Scintilla (see http://www.scintilla.org); to revive pride.pl! :-) these are the main points... for now, I will post a followup if I forgot something :-) cheers, Aldo __END__ $_=q,just perl,,s, , another ,,s,$, hacker,,print;
Re: [perl-win32-gui-users] default GUI installed by PPM (was RE: Bug in Textfield scrolling)
Piske, Harald wrote: same here. When you do PPM QUERY it states version 0.99, which is 0.0.558, so it refuses to install the older version. ActiveState should store the latest versions on their site. ActiveState should had never invented the 0.99 version number (at least not without contacting me first). blame ActiveState for this, and no, I'm not going to release 1.00 just because they were too creative ;-). when in doubt, it's always safer to do a 'ppm remove' before the install. cheers, Aldo __END__ $_=q,just perl,,s, , another ,,s,$, hacker,,print;
Re: [perl-win32-gui-users] Re: how to set ?
christopher sagayam wrote: This doesnt work $ModuleWindow-text2_tab1-Change(-readonly = 1); what is the correct way ? this will work in the next release. I've found that you need to send a message to change the ES_READONLY style *after* control creation. this is the 'workaround' message if you're in a hurry: # set -readonly = 1 $ModuleWindow-text2_tab1-SendMessage(0x00CF, 1, 0); # set -readonly = 0 $ModuleWindow-text2_tab1-SendMessage(0x00CF, 0, 0); cheers, Aldo __END__ $_=q,just perl,,s, , another ,,s,$, hacker,,print;
Re: [perl-win32-gui-users] event handlers
Eric Bennett wrote: This would be very helpful. The feature which would make this complete for me is if each control had a tag value which could hold a scalar reference. a scalar reference to what? Then it would be simple to segue into an OO approach: sub CommonButtonName_Clicked { my ( $source_button ) = @_; $source_button-Tag-execute_command_and_log_undo(); } this is completely unclear to me. what is 'execute_command_and_log_undo'? a method in some package? what is supposed $source_button-Tag to report? maybe you mean it to act like: execute_command_and_log_undo( $source_button ); but, if this is what you mean, I don't see why you should want it (it's just that you like the '-'? :-) and I don't see any precedent in a Perl module for such things. I don't think you want to patch *any* Perl module to be able to write: my $OBJECT = Something-new; $OBJECT-execute_command_and_log_undo(); when 'execute_command_and_log_undo' is a sub in your script. Tags would also be handy for things like radiobutton data values. please elaborate something more on your example, there may be something I'm missing. I know very little about Win32::GUI internals so I have no idea how feasable this would be to implement. I need to understand first *what* to implement and *why* implement it. then it should be a breeze ;-) cheers, Aldo __END__ $_=q,just perl,,s, , another ,,s,$, hacker,,print;
Re: [perl-win32-gui-users] event handlers
Dave Moore wrote: hey. do event handler routines (ie. sub Button1_Click) have to be in the main namespace or in the namespace in which they were created? no, they can be anywhere: just add the namespace to your control's name and the event will be searched in that namespace. example: $Window-AddButton( -name = Buttons::Button1, # etc. ); package Buttons; sub Button1_Click { # etc. } can objects be assigned and event handler? (ie. $myButton-Event(Click = \coderef);). if not, twould be nice. id be willing to do the work if it didnt involve too much serious XS stuff. I'm working on it, it's basically done (the version is on CVS) but there are still some issues to solve. and yes, it involves serious XS stuff ;-) it seems to me that this module wasnt really meant to be used in an OO application? can anyone out there tell me otherwise? I maybe be ignorant, but what the heck do you mean by 'an OO application'? :-) cheers, Aldo __END__ $_=q,just perl,,s, , another ,,s,$, hacker,,print;
Re: [perl-win32-gui-users] event handlers
Eric Bennett wrote: He probably means being able to open multiple instances of a window or being able to subclass window or control behavior. I'm afraid I still don't get the exact point (I'm tired, sorry :-). Right now the only connection a control has to the rest of the program is through the control name. This means that to open two identical windows where the controls on each window refer to the right window's values you have to use app-unique names for controls and then dynamically define subs with lexical references to those values. this is more clear. the New Event Model I'm trying to build will pass a reference to the object that fired the event as its first parameter, so this issue will be solved. cheers, Aldo __END__ $_=q,just perl,,s, , another ,,s,$, hacker,,print;
Re: [perl-win32-gui-users] SelectedItems method
Erick J. Bourgeois wrote: [...] When Button is pressed it always falls through the if statement. Even in the case of no selection it falls through because @index[0], in this case, is undef. I know undef is the same as 0, but how could I get around this? UNDEF IS NOT THE SAME AS 0! this is, speaking in perl terms, an heresy and you shall be punished with eternal fire ;-) undef is *evaluated* as 0 in numerical context and as in string context, but is not 'the same'. perl has a defined() function to check if something is 'not undef', including 0 and . your if statement should look like this: if( defined( $index[0] ) ) { cheers, Aldo __END__ $_=q,just perl,,s, , another ,,s,$, hacker,,print;
Re: [perl-win32-gui-users] SelectedItems method
Erick J. Bourgeois wrote: Sorry to bother the list again, but Aldo, checking it's undefness with defined does not work either, it falls through not matter what. I tried putting print $index[0]\n; to see it's value and indeed it is undef (ie. it did not print anything), so why does it pass the if statement? that's true, there's a bug in the XS code: it doesn't really returns undef, but a false value (eg. 0). will be corrected in the next release :-) cheers, Aldo __END__ $_=q,just perl,,s, , another ,,s,$, hacker,,print;
Re: [perl-win32-gui-users] SelectedItems method
Erick J. Bourgeois wrote: Aldo, can I correct it myself and compile it with DJGCC? I hope so :-) I could not compile it with cygwin's gcc, but I'll be very happy to know how it goes with djgcc. but please post build reports and pleas for help on the Perl-Win32-GUI-Hackers mailing list, since this is a topic that doesn't interest general Win32::GUI usage. cheers, Aldo __END__ $_=q,just perl,,s, , another ,,s,$, hacker,,print;
Re: [perl-win32-gui-users] SelectedItems method
Erick J. Bourgeois wrote: XSRETURN_NO; #Is the problem here?# exxxactly, should be XSRETURN_UNDEF; instead. cheers, Aldo __END__ $_=q,just perl,,s, , another ,,s,$, hacker,,print;
Re: [perl-win32-gui-users] looping in win32 GUI
christopher sagayam wrote: I might be slow to learn but Actually what Im concerned about is the while loop How do I get out of the while loop ? while ( ($status, $status_text) = RasGetConnectStatus($hrasconn) ) { } once the control goes into this loop how it is going to get out ? Or are these kinds of daemons possible in Win32::GUI ? as I already said, it depends on your application. and I also add, it depends on your Perl programming style :-) a possible way could be: $stay_in_loop = 1; while ( $stay_in_loop ) { ($status, $status_text) = RasGetConnectStatus($hrasconn) or $stay_in_loop = 0; # ...body of the loop... $MainWindow-DoEvents(); } at this point, you could have for example a 'Stop' button which can control the loop like this: sub Stop_Click { $stay_in_loop = 0; } but you may prefer a different approach... cheers, Aldo __END__ $_=q,just perl,,s, , another ,,s,$, hacker,,print;
Re: [perl-win32-gui-users] The cancel cross (upper right) in GUI
Nahum Marc wrote: How to manage the the cancel cross (upper right) in GUI to do an exit ? , not a window exit , but a script exit ... pick a sample script, anyone will do, from the samples directory and study it. HINT supposing your window is named Window, add this line to your script: sub Window_Terminate { -1 } /HINT cheers, Aldo __END__ $_=q,just perl,,s, , another ,,s,$, hacker,,print;
Re: [perl-win32-gui-users] looping in win32 GUI
christopher sagayam wrote: Here is what Im trying to do I am trying to write a win32 gui perl client which when started will check whether the computer is connected to internet continuously indefinety in the meantime other actions should proceed also So based on your previous example actually there wont be a STOP button at all since this loop is going to be continuouly executed as along as the win32 gui script is running now the catch is during the time the loop is running I need to catch key presses , button presses , tab presses etc too and do it efficiently I see. in this case, the best thing to do is to setup a Timer object with a small interval and do your connectivity test once inside its Timer event, no loop, no sleep :-) cheers, Aldo __END__ $_=q,just perl,,s, , another ,,s,$, hacker,,print;
Re: [perl-win32-gui-users] The cancel cross (upper right) in GUI
Nahum Marc wrote: I do this too ... but it's close the window , and not all the script ... I can see the process yet in task manager (under NT4) off course , i hide the dos box so , i need kill the process there must be some error in your script. can you post a piece of your code that includes at least the window creation, the Win32::GUI::Dialog() call and the Terminate event? also, please report which version of Win32::GUI and Perl and operating system you're using. cheers, Aldo __END__ $_=q,just perl,,s, , another ,,s,$, hacker,,print;
Re: [perl-win32-gui-users] The cancel cross (upper right) in GUI
Nahum Marc wrote: Win32::GUI version 0.0.502 perl version Binary build 522 OS : Windows NT4 wks , SP5 c'est tres simple :-) your window is called 'Win' (-name = Win), but your event is called Window_Terminate. should be Win_Terminate instead! BTW, you have an horrible use of goto in your script. I haven't investigated much, but I've seen a lot of possible problems here and there (for example, returning to 'debut' will create another copy of your windows, which is something you should not do!). cheers, Aldo __END__ $_=q,just perl,,s, , another ,,s,$, hacker,,print;
Re: [perl-win32-gui-users] ListView_ItemClick
Erick J. Bourgeois wrote: I wish to prevent the user from choosing more than one item in a Listview and since I didn't find an option for -multisel, like in a ListBox, I have attempted to achieve this through the ItemClick event for a ListView. sub ListView_ItemClick { if ($Win-ListView-SelectCount() 1) { Win32::MsgBox(You can not pick more than one item!, 48, Choose Only One); $Win-ListView-Select(0); return; } } This displays the MsgBox great the first time, however it then loops back and displays it again, it fact, I believe it displays the MsgBox 2**(amount of selected items) times (ie. 2 to the power of). As you may see I tried Selecting the first item so the sub won't be called again. Any ideas? yes, doing a: $Win-ListView-Select(0); really fires an ItemClick event on the ListView, so you're in a loop. you can use the -singlesel option on the ListView to achieve what you want. cheers, Aldo __END__ $_=q,just perl,,s, , another ,,s,$, hacker,,print;
Re: [perl-win32-gui-users] SaveAsDialog
Erick J. Bourgeois wrote: Has anyone had success using the SaveAsDialog? I'm using the SaveAsDialog in the following way: my %param = (title = SaveAs, filters={'Filter 1' = '*.txt;*.doc', 'Filter 2' ='*.pl;*.pm'}); my $file = SaveAsDialog %param, foo.txt; sorry, but where did you got this syntax? try this: my $file = Win32::GUI::GetSaveFileName( -title = SaveAs, -filter = [ Filter 1 = *.txt;*.doc, Filter 2 = *.pl;*.pm, ], -file = foo.txt, ); cheers, Aldo __END__ $_=q,just perl,,s, , another ,,s,$, hacker,,print;
Re: [perl-win32-gui-users] SaveAsDialog
Erick J. Bourgeois wrote: sorry, but where did you got this syntax? From the documentation in FileOp module. oh, well, FileOp != Win32::GUI :-) cheers, Aldo __END__ $_=q,just perl,,s, , another ,,s,$, hacker,,print;
Re: [perl-win32-gui-users] Run-time Exception using Win32-GUI-0.0.558 and Visual Studio 6.0
gary gauthier wrote: I've built the 558 version of Win32-GUI for ActiveState v522, but get a Run-time Exception when I try to run anything. I've seen this before, but can't remmber why it happens. Has anyone any ideas? The 502 version of Win32-GUI builds and runs programs just fine on the same machine/configuration. I've introduced some bugs in build 558 expecially for the PERL_OBJECT build :-) please grab the latest GUI.xs from CVS and try building it with this file: (note that the URL is on one line) http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/Win32-GUI/GUI.xs?cvsroot=perl-win32-gui cheers, Aldo __END__ $_=q,just perl,,s, , another ,,s,$, hacker,,print;
Re: [perl-win32-gui-users] Event routines
[EMAIL PROTECTED] wrote: Is Win32::GUI designed to support something like this: $subtxt = Simple_Click; eval qq ( sub main::$subtxt { print button clicked\n; $W-SimpleLabel-Text(Got a click); } ); (Actually this piece of code does not work...) yes, Win32::GUI supports things like these (it's really Perl that supports it :-), but your code is wrong. $W is interpreted as a variable in your eval string, you need to escape it: eval qq ( sub main::$subtxt { print button clicked\n; \$W-SimpleLabel-Text(Got a click); } ); ...and always check for $@ after an eval! cheers, Aldo __END__ $_=q,just perl,,s, , another ,,s,$, hacker,,print;
Re: [perl-win32-gui-users] Progress Bar question
Peter Eisengrein wrote: Anyone know what the maximum allowed value is for the -SetRange($min,$max) on Win32::GUI::AddProgressBar? I am trying to have it be set dynamically based upon a file size and it would appear that if a file is too big the $max gets set to some default. the storage is actually 16 bit. I've just found that there is a way to store values up to 32 bits. I'll add this functionality in the next release. thanks for pointing this out :-) cheers, Aldo __END__ $_=q,just perl,,s, , another ,,s,$, hacker,,print;
Re: [perl-win32-gui-users] wishlist :)
Danny Zak wrote: Dear perl-win32-gui-users, hm.. again .. i'm really happy with the win32 development.. i got some simple questions (or more like a wishlist :) ) * is there a spreadsheet (grid) look-a-like solution or component ? no, but I'm thinking about implementing one (just thinking for now :-). * is there a inline webbrowser somewhere ? or a HTML or XML parser ? no, and I don't think I will try to implement one :-) you should instead look at Win32::OLE, to see if you can embed an InternetExplorer instance in a window. that said, it seems that RichEdit 3.0 (available in Windows 2000) has a lot of nice features, that I'll try to implement if time permits. * is there support for JPG or common image formats like .PNG or .GIF? since i only found how to open a BITMAP image (i assume this is a .BMP file) yes, support is for .BMP files only. there is something in the Win32 API about JPGs, but I have not yet investigated it thoroughly. what about licensing ? if i develop a product in perl with usage of the win32::gui module, and I spread (well lets asume for FREE) to the public.. is it still under GNU license or do we have to pay the win32::gui team something ? no, you don't have to pay anything. I'm not a lawyer and I don't want to pay a lawyer :-) Win32::GUI is released under the Artistic License, eg. you can redistribute it under the same terms of Perl itself. cheers, Aldo __END__ $_=q,just perl,,s, , another ,,s,$, hacker,,print;
Re: [perl-win32-gui-users] win32::gui
Danny Zak wrote: Dear perl-win32-gui-users, i first want to send a real big package of congrats to the developers of this fasinating module.. thanks :-) It is great.. i already have some nice ideas of using the module, but as for now it is still in test or development phase ? it's a beta version, but it's almost mature. there's always (there will always be?) a lot of space for improvement, but it can be considered 'robust' enough. In the docs i can find lots of TBD (to be dones), is this refering only to the documentation or also the total concept of development ? TBD really stands for 'to be documented' :-) what you'll find in the documentation is developed, but not yet documented. cheers, Aldo __END__ $_=q,just perl,,s, , another ,,s,$, hacker,,print;
Re: Recall: [perl-win32-gui-users] Win32-GUI Installation
[EMAIL PROTECTED] wrote: Butler, Eoin would like to recall the message, [perl-win32-gui-users] Win32-GUI Installation. I hate this. please stop 'recalling' messages. cheers, Aldo __END__ $_=q,just perl,,s, , another ,,s,$, hacker,,print;
Re: [perl-win32-gui-users] Win32-GUI 0.0.558 Installation
[EMAIL PROTECTED] wrote: Hello, I installed Win32-GUI 0.0.502 via PPM successfully but would like to use 0.0.558. Running make failed with both Borland's and Dev-C++'s make: C:\Perl\Win32-GUI-0.0.558\borland\bcc55\bin\make MAKE Version 5.2 Copyright (c) 1987, 2000 Borland Fatal makefile 799: No terminator specified for in-line file operator C:\Perl\Win32-GUI-0.0.558\dev-c++\bin\make Makefile:303: *** missing separator. Stop. to correctly build a module, most of the times (if not always) you should have built the Perl executable with the same compiler you want to use to build the module. this is because ExtUtils::MakeMaker uses a lot of information from the Config module, which is built together with Perl. your Perl binary is probably instructed to build a Makefile which is not suitable for either Borland's or Dev-C++'s needs. you can try to manually patch Config.pm and specify your compiler, libraries, include paths, and so on, but it's probably simpler if recompile Perl instead :-) cheers, Aldo __END__ $_=q,just perl,,s, , another ,,s,$, hacker,,print;
[perl-win32-gui-users] Win32::GUI version 0.0.558
hello perl-win32-gui-users, version 0.0.558 is out! this is primarily a bugfix version, and also please note that I'm not sure how stable it is (read on for more details). bugs fixed: - the infamous memory leak problem is now gone (everybody say: thank you Sam!!! :-) - fixed the -filter option to Get(Open|Save)FileName (again, thank you Sam :-) - the warnings from Win32::GUI::Dialog are now gone new features: - colors can now be given in the HTML notation too (eg. #E3E2CC) - the module is generally a lot faster and now the bad news :-) I've rearranged most of the module internals so that it uses more C and less Perl to do its job (hence the speed increase). I'm not sure now that everything works correctly yet (pride.pl in the samples directory seems to freeze, but I haven't noticed any other disturbs). please make all the tests that you can, and report anything that used to work and doesn't anymore, so that I know where to look :-) BTW, the module is available on: - SourceForge - dada's perl lab (http://www.dada.it) - CPAN hey, releasing this beast it's becoming a lot of work :-) cheers, Aldo __END__ $_=q,just perl,,s, , another ,,s,$, hacker,,print;
Re: [perl-win32-gui-users] 0.0.502 on PPM
[EMAIL PROTECTED] wrote: Aldo, Is it possible to get a copy of 502 as a ppd. as I am behind a firewall and have been unable to install it from http://dada.perl.it I've made the PPM distribution available on SourceForge. there is a ZIP file (be sure to choose the correct one for your Perl, 5.005 or 5.6) which contains the PPD and the TAR.GZ, as well as a README.txt which explains how to install it. cheers, Aldo __END__ $_=q,just perl,,s, , another ,,s,$, hacker,,print;
Re: [perl-win32-gui-users] Memory leak (not really a leak at all)
Sam wrote: Hi, I found many references to the 'memory leak' in the archived messages at http://www.mail-archive.com/perl-win32- [EMAIL PROTECTED]/. I believe there isn't a memory leak at all, it appears that the memory usage reported by windows task manager includes a portion of a windows cache allocated to the program, and that it's the cache usage that changes, not the amount of memory that the perl interpreter has allocated. oh well, I'm really confused now :-) This is based on these observations: 1) As the memory usage reported by the task manager increases the total memory usage does not increase. If you run a compiler or something that will allocate memory a bit at a time for a long period of time you'll notice that as the compiler's memory usage goes up, and so does the total memory usage. yes, this is true. 2) If you minimize the perl-win32-gui app's window the reported memory usage goes down to a base value (120K with my perl), and every time you minimize the window it goes down to the same value. This is _not_ indicative of a memory leak. this is true too. 3) If you play with other applications in a similar way you can make them exhibit similar behaviour. The reported memory usage on other applications (my test was EditPlus) doesn't increase to the same extent, but it does increase (more on this difference later). and this is true, but there are other applications (for example, the NT Task Manager) which does not exhibit this behaviour, even if they're left running for a large amount of time. and the Task Manager updates its contect each second, so is doing something. but its cache memory never grows up. damn :-( During the above I looked over the code involved, and attempted to isolate a memory leak. So far as I can tell the code is rock solid. way cool ;-) I believe that the difference between a perl-win32-gui application, and other pure win32 applications is in the DefWindowProc handling. The perl-win32-gui module does call DefWindowProc when either you don't have a handler installed, or you return 1, however through BoundsChecker I believe that this may not always be the case. I'm really interested in this: can you elaborate more on this point? do I call DefWindowProc too much, or it is not called when it should be? I would be interested if someone finds anything else out about this problem. Unfortunately I can't spend any more time on this, as it appears to me that this isn't a serious bug, at least not something that will stop a program from working correctly. well, a 4k increment for each mouse movement is quite too much, so something should be corrected (if it's not totally wrong, it's surely at least poorly coded :-) cheers, Aldo __END__ $_=q,just perl,,s, , another ,,s,$, hacker,,print;
Re: [perl-win32-gui-users] Re: [perl-win32-gui] newbie query
Reini Urban wrote: Aldo, i'm still trying to fool around with cygwin and mingw, but at first have to build a new mingw-perl 5.6.1, because with this it will be much easier. (it can use the msvc headers and libs, and not the cygwin/w32api) but at first I have the solve the current cygwin perl-5.6.1-1 problem with gdbm. I am also trying to fool around with cygwin, but I didn't even could produce a working Perl build :-( I'm trying to build the Perl 5.6.0 source tree under a precompiled cygwin install, and it seems everything goes well, I have a perl.exe but everytime it is launched it says that the application failed to initialize properly (0xc005). should be something stupid like access denied to some shared library, but I can't track it down. BTW, I gave libmsvcrt.a to Configure when it was asking for my C library, dunno if it's correct... PS. this thread should probably be moved to the Perl-Win32-GUI-Hackers mailing list ;-) cheers, Aldo __END__ $_=q,just perl,,s, , another ,,s,$, hacker,,print;