Re: [perl-win32-gui-hackers] Success with flicker-free windows!
Humm - for some reason I'm not getting all messages to this list - anyone else have that problem? The archive is also not up to date... I missed the start of the thread - Anyway my 2 cents Garside Trevor say on win32::GUI Users list flicker problem when resize window can be remove by set default class style to 0. In GUI.xs, RegisterClassEx : wcx.style = 0; // CS_HREDRAW | CS_VREDRAW; // TODO (default class style...) It's look better when resize main window. I don't have samples whith lot of flicker problem. So, don't know if it's sufficient. This is the 'fix' that I have been using for a while, and works well in most simple cases. However you can get horrendous striping when reducing the size of a window - the GUI Loft being one example. In my case I had one window which suffered this problem, I just had to create a class with CS_HREDRAW | CS_VREDRAW and suffer the flickering. 4.Graphics objects no longer show up (DCs don't seem to support WM_PRINT). 5.Setting WS_CLIPCHILDREN results in massive flickering (the opposite of what it used to do) and causes no background to show. Well, I don't really understand a lot of what you said, and I don't have any applications that flicker with the current GUI, so I guess I'd have to say that if *anything* gets broken by this enhancement, that it should definitely be an extra cost option, rather than the default. All my application widgets flickered when I resized the windows, especially tree and listviews. This fix prevents the erase-redraw mentality of Windows, which is a stupid way of doing things in the 1st place. It would be easy to add an option -noflicker to all windows so that you can explicitly say I want to use the non-flicker drawing routines. I will do this. I like the idea of the -noflicker option (assuming you can turn it on and off during runtime). If it works with no cost, then perhaps it could become the default in future versions? Flicker free resizes are so *much* better. Looking forward to seeing this fix in action. Cheers. jez. _ Find a cheaper internet access deal - choose one to suit you. http://www.msn.co.uk/internetaccess
Re: [win32gui] Re: [perl-win32-gui-hackers] Any release soon? (was: CVS Commits - bug fixes and enhancements)
We need to agree a version number for the next release. I would propose 1.01 - I think that we should be using a 2-digit second part of the version number to be CPAN friendly (See perldoc perlmodstyle), and don't see that there's enough change to justify anything other than incrementing the minor version by the smallest increment. 1.01 sounds fine by me. If we can agree the version numbering issue,. I'd be happy to make a release candidate available from my website. Cool:) I'll also write up my notes on building the PPM, so others can do it. I've added a note to my TODO list to look at adding a PPM target to the makefile (so we can just do nmake ppm (or whatever). I've also noticed that many of the document links with a page are broken, but don't have time to explore this further right now. I've noticed these broken links before, and have tried to fix a few of them when updating documentation. I suspect that the document parser could be improved a little to cope with the differing styles of text - it's a rather manual process otherwise. Cheers, jez.
Re: [perl-win32-gui-hackers] Tests
Does anyone have any experience with any of the GUI test packages that actually allow you to interact with a GUI in test, and if so what would people recommend? I work professionally as tester. GUI testing is part of my job :) (AutoIt, Win32::GuiTest and Rational Robot) Testing GUI apps can be a pain to do correctly, so it's good that we've got someone who knows what they are doing:) I'll write down my ideas and which module would fit best. The module (e.g. Win32::GuiTest) should be optional. It would be nice if we could use Win32::GuiTest simply because it's free and open:) But I don't know enough about the options to contribute. Leaving aside GUI testing, there is still quite a bit that could be done via the command line - things like testing destruction of controls/windows, creating lots of controls, testing for memory leaks etc. Cheers, jez.
Re: [perl-win32-gui-hackers] more 1.1.03 patches
Hi, I'm sure if you ask Aldo for permissions to commit changes, he'll add you (or, indeed anyone else). Cheers (and good work BTW). jez.
RE: [perl-win32-gui-hackers] Web Presence
I've spent the last week or so struggling to come to terms with CSS and its non-standard implementations accros browsers. I have the outline of a site that I'd appreciate feedback on: http://www.robmay.me.uk/win32gui/website/ Nice, good job:) I tried with Opera and it looks fine. Suggestions, it would be nice if there was a screenshots link under Site navigation (perhaps users could submit screenshots of their applications built using Win32-GUI). Perhaps it would be nice if the examples also had their own link - with each example presented as a separate page (with HTMLerizied code, and perhaps a screenshot). I only mention these items as this is what I look for when evaluating a new tool:) Cheers, jez.
[perl-win32-gui-hackers] Using Windows as Objects
Hi, I've been putting together an example of several of the techniques I use when building a GUI. One of the things I do is to use lots of child windows to encapsulate many controls and functionality into one logical package. This works really well for me, but is still on the 'messy' side, so I've tried to encapsulate all functionality (event handling and method calls) into a single perl object that could be used throughout the application. The example below is rather simple, but should explain the concept. In a hypothetical application, the user needs to be able to select the Employee ID in lots of places in the application. As well as being able to type in the ID directly, the user might also want to search for the ID. Rather than create lots of individual controls, an object does all the work for you... Except for when you exit, and a crash occurs (perl 5.6 GUI 1.02 Attempt to free unreferenced scalar at C:/Perl/site/lib/Win32/GUI.pm line 3266). I do create a circular link, with a closure being used to 'remember the object (In my own application, the closure is of the window, not an object that contains it, and this doesn't crash). I'm not sure if this is a bug within win32-gui or my code? Or is there a better way to create a perl object that can handle both method calls and events? Thoughts? Cheers, jez. - use strict; use Win32::GUI; #We init the EmployeeSelector class EmployeeSelector::Init(); # Create the main window my $mainwindow = new Win32::GUI::Window( -name = Window, -title = Objects and Windows, -pos= [100,100], -size = [400,400], ); $mainwindow-Show(); #We now create several employee selector 'controls'. my $search1=EmployeeSelector-new($mainwindow,20,20); my $search2=EmployeeSelector-new($mainwindow,20,50); my $search3=EmployeeSelector-new($mainwindow,20,80); my $search4=EmployeeSelector-new($mainwindow,20,110); my $search5=EmployeeSelector-new($mainwindow,20,140); #Show all our controls $search1-Show(); $search2-Show(); $search3-Show(); $search4-Show(); $search5-Show(); $search2-Move(200,200); #Enter the message processing loop Win32::GUI::Dialog(); package EmployeeSelector; #Class spefic globals my $searchwindow; #The search window my $active; #The active object sub Init { #This is a class function, and is used to initilise all objects $searchwindow = new Win32::GUI::DialogBox( -name = EmployeeSelector, -title = Search for Employee, -size = [300,270], ); $searchwindow-AddListView( -name = 'ListView', -pos= [8,8], -size = [280,189], -fullrowselect= 1, ); $searchwindow-AddButton ( -name = 'OK', -text = 'OK', -pos= [164,208], -size = [60,21], #When we click ok, we populate the calling controls EmpID -onClick = sub {my $item=$searchwindow-ListView-SelectedItems(); my %hItem=$searchwindow-ListView-ItemInfo($item,0); $active-SetEmpID($hItem{-text}); return -1; }, ); $searchwindow-AddButton ( -name = 'Cancel', -text = 'Cancel', -pos= [228,208], -size = [60,21], -onClick = sub {return -1}, ); #populate the list view $searchwindow-ListView-InsertColumn(-width = 55,-text = 'Emp ID'); $searchwindow-ListView-InsertColumn(-width = 205,-text = 'Employee Name'); $searchwindow-ListView-InsertItem(-text = [1234, 'Bob Smith']); $searchwindow-ListView-InsertItem(-text = [4321, 'Peter Jones']); $searchwindow-ListView-InsertItem(-text = [7890, 'John Brown']); } #The constructor sub new { my $proto = shift; my $class = ref($proto) || $proto; my $self = {}; bless ($self, $class); my ($parent,$xcor,$ycor)[EMAIL PROTECTED]; #Create window my $childwin = new Win32::GUI::Window ( -parent = $parent, -name= ChildWin, -pos = [$xcor,$ycor], -size= [150, 24], -popstyle= Win32::GUI::WS_CAPTION | Win32::GUI::WS_SIZEBOX, -pushstyle = Win32::GUI::WS_CHILD | Win32::GUI::WS_CLIPCHILDREN, ); #add the window to the object $self-{win}=$childwin; #Create other controls $childwin-AddLabel( -name = 'Label', -text = 'ID#', -height = 20, -width = 20, -top= 6, -left = 0, ); $childwin-AddTextfield ( -name = 'EmpID', -height = 20, -width = 35, -top= 2, -left = 20, -tip= 'Employee ID', ); $childwin-AddButton ( -name = 'Search', -text = 'Search', -height = 20, -width = 60, -top= 2, -left = 60, -tip= 'Search for a Employee ID', #$self will become a closure -onClick = sub {Search($self)}, ); return $self; } sub Search { #Open the search window - can be called as a method or as an event handler my $self=shift; #Set the active object to be this object $active=$self; $searchwindow-Center; $searchwindow-DoModal(1); } sub SetEmpID { #Set the EmpID of the text box - can be called as a
Re: [perl-win32-gui-hackers] Using Windows as Objects
This is a known bug with win32-gui. It is fixed by using perl 5.7 or later or using the circular ref patch Ok - I've created a tracker item so this issue isn't lost:) https://sourceforge.net/tracker/index.php?func=detailaid=1248578group_id=16572atid=116572 I've just ran that example under 5.8.7 and it still crashed? I posted to the list during the 1.02 release cycle. A similar section was applied some years ago, but removed because older perl don't allow circular refs at all. I just searched the archive but it doesn't show any attachments - could you forward it again so I can see if it fixes the problem? Cheers, jez.
RE: [perl-win32-gui-hackers] Support of old Perl versions
Would anyone have an issue if I was to make a decision to only support 5.6 and 5.8 going forwards? Makes sense as far as I'm concerned. Cheers, jez.
[perl-win32-gui-hackers] Crash with Combobox GetLBText
Hi, perl.exe caused an Access Violation at location 7c93426d in module ntdll.dll Reading from location . Registers: eax= ebx=01a4 ecx=00230ef0 edx= esi=002301a8 edi=002301c8 eip=7c93426d esp=0140efdc ebp=0140f1fc iopl=0 nv up ei pl zr na po nc cs=001b ss=0023 ds=0023 es=0023 fs=003b gs= efl=0246 Call stack: 7C93426D ntdll.dll:7C93426D RtlInitializeContext 77C2C3C9 MSVCRT.dll:77C2C3C9 free 77C2C3E7 MSVCRT.dll:77C2C3E7 free 77C2C42E MSVCRT.dll:77C2C42E malloc 2808991F perl58.dll:2808991F Perl_my_socketpair 28066038 perl58.dll:28066038 Perl_sv_setpvn 280693EB perl58.dll:280693EB Perl_newSVpv 28013436 perl58.dll:28013436 Perl_despatch_signals 2801328D perl58.dll:2801328D Perl_despatch_signals 280131CF perl58.dll:280131CF Perl_despatch_signals 28063230 perl58.dll:28063230 Perl_sv_2iv 233D1B39 GUI.dll:233D1B39 XS_Win32__GUI__Combobox_GetLBText(interpreter*, cv*) Combobox.c:626 void XS_Win32__GUI__Combobox_GetLBText(interpreter*, cv*)( PerlInterpreter * my_perl = (indirect), CV * cv = (indirect) ) This one is a little harder to reproduce, but I think it's easy enough to solve: [from line 399 in Combobox.xs] cbString = SendMessage(handle, CB_GETLBTEXTLEN, index, 0); if(cbString != LB_ERR) { szString = (char *) safemalloc(cbString); It looks like we're not allocating enough space for the string - adding 1 to cbString stops the crash (another issue is that we're assuming 1 byte = 1 char which might not be the case...). Cheers, jez.
RE: [perl-win32-gui-hackers] Crash in CommonMsgLoop
I apologies for using this forum as a sounding board... This is going to be a pain to track down. I've got a case where I'm almost guaranteed to cause a crash on exit - it's not a simple case Ok - think I've got it - just not sure what the fix should be - or even if a fix is needed. In my app, I catch the terminate event and ask the user if they are sure they wish to exit. If they say yes, I perform logic to save various settings. Once the settings have been saved I return -1, which should exit. During this exit phase (for some reason) various WM_NCHITTEST message are sent, and I assume that the window has already been destroyed(? - or perhaps some kind of timing issue, which explains why adding the print statements and Perl 5.6 don't cause the crash) - the crash happens when the function CallWindowProc is called. The 'fix' in my case is to hide the main window as soon as the user clicks on the yes button... Cheers, jez.
[perl-win32-gui-hackers] Combobox_onEvent crash
perl.exe caused an Access Violation at location 7c910f29 in module ntdll.dll Reading from location . Registers: eax=0a4fc680 ebx=0023 ecx= edx= esi=0a4fc678 edi=0a4f8210 eip=7c910f29 esp=0140e000 ebp=0140e00c iopl=0 nv up ei pl zr na po nc cs=001b ss=0023 ds=0023 es=0023 fs=003b gs= efl=0246 Call stack: 7C910F29 ntdll.dll:7C910F29 wcsncpy 7C910D5C ntdll.dll:7C910D5C wcsncpy 77C2C2DE MSVCRT.dll:77C2C2DE free 28089A02 perl58.dll:28089A02 Perl_my_socketpair 2808DB12 perl58.dll:2808DB12 PerlIO_binmode 28041DCB perl58.dll:28041DCB Perl_sv_compile_2op 280602FE perl58.dll:280602FE Perl_runops_standard 2802587C perl58.dll:2802587C Perl_call_pv 233CE770 GUI.dll:233CE770 Combobox_onEvent(interpreter*, tagPERLWIN32GUI_USERDATA*, unsigned, unsigned, long) Combobox.xs:132 int32 Combobox_onEvent(interpreter*, tagPERLWIN32GUI_USERDATA*, unsigned, unsigned, long)( PerlInterpreter * my_perl = (indirect), LPPERLWIN32GUI_USERDATA perlud = (indirect), UINT uMsg = 273, WPARAM wParam = 65536, LPARAM lParam = 5702702 ) ... return PerlResult; } /* ... 233C6E4C GUI.dll:233C6E4C WindowMsgLoop(HWND__*, unsigned, unsigned, long) GUI_MessageLoops.cpp:252 LRESULT WindowMsgLoop(HWND__*, unsigned, unsigned, long)( HWND hwnd = (indirect), UINT uMsg = 273, WPARAM wParam = 65536, LPARAM lParam = 5702702 ) ... childud-forceResult = 0; PerlResult = OnEvent[childud-iClass](NOTXSCALL childud, uMsg, wParam, lParam); if (childud-avHooks != NULL) ... 77D48734 USER32.dll:77D48734 GetDC 77D48816 USER32.dll:77D48816 GetDC 77D4B4C0 USER32.dll:77D4B4C0 DefWindowProcW 77D4B50C USER32.dll:77D4B50C DefWindowProcW 7C90EAE3 ntdll.dll:7C90EAE3 KiUserCallbackDispatcher 77D4B903 USER32.dll:77D4B903 SendMessageW Dont know why - but have a test case... Cheers, jez.
[perl-win32-gui-hackers] GUI_Events.cpp/DoEvent correct behaviour?
While tracking various crashes down I found myself in the DoEvent function in GUI_Events.cpp, now I don't think there is a issue here - but I did notice something surprising. I would have through that if a control was using NEM events, the OEM logic wouldn't be called for that control. For example, a button has a NEM click handler, I wouldn't expect DoEvent to look for OEM events such as MouseMove for the same button - but it does. If this is correct, it would mean that to save doing a perl_get_cv call (which is really inefficient) you would have to define all possible events for all controls? Add this line: printf(EventName %s \n,EventName); After: // OEM name event char EventName[MAX_EVENT_NAME]; strcpy(EventName, main::); strcat(EventName, perlud-szWindowName); strcat(EventName, _); strcat(EventName, Name); To see the amount of needless calls made... Cheers, jez.
Re: [perl-win32-gui-hackers] Crash with Combobox GetLBText
This would lead to a more complex macro/function, but would, I think be worth it. [snip] It would be a more complicated macro/function - but I agree with you, it would be worth it. This works nicely for the ANSI versions of the call, which return th ANSI encoded string of bytes that is suitable for directly inserting into the PV, but this doesn't address the Unicode issue at all, where the string copied by CB_GETLBTEXT would have to be converted from UCS-2 to utf-8 and then copied into the SV, setting the SVf_utf8 flag appropriately. If we spend time on reworking some of the internals for Unicode is it worth us considering the implications of 64bit further down the road? Cheers, jez.
Re: [win32gui] RE: [perl-win32-gui-hackers] Crash in CommonMsgLoop
If you have some code that exhibits this, then I'd be interested to try to reproduce it. I though I could explain it, but then couldn't get an example together that validated my explanation. Not really - as when you reduce the size of the application, the issue disappears. I'll keep an eye on it and as soon as I have something solid I'll raise a bug. Cheers, jez.
Re: [win32gui] [perl-win32-gui-hackers] GUI_Events.cpp/DoEvent correct behaviour?
I haven't tried this yet, but it seems wrong. Can you raise a bug report and I'll dig further into this one. http://sourceforge.net/tracker/?func=detailatid=116572aid=1333060group_id=16572 Ok - it seems this is only an issue when SetEvent is used (see example below, also on tracker). What seems to happen is that the NEM event is called, and then it looks for an OEM event - if found that is ran too. Cheers, jez. - $|=1; use strict; use Win32::GUI; my $W = new Win32::GUI::Window( -name = TestWindow, -pos = [ 0, 0], -size = [210, 200], -text = TestWindow, ); $W-AddButton ( -name= Start, -pos = [65,5], -text= Start, -tabstop = 1, #-onClick = sub {print 'clicked'}, ); #add the events to the button $W-Start-SetEvent('Click',sub {print 'clicked'}); $W-Show; Win32::GUI::Dialog();
Re: [win32gui] [perl-win32-gui-hackers] Win32::GUI::Dialog() failure
Arthur I Schwarz wrote: I'm have partitioned my program into modules: name::GUI The program driver is in name: name.anonymous subroutine (the nameless thing at the end) StartWindows # name::GUI::StartWindows and name::GUI::StartWindows I do: $window-show(); Win32::GUI::Dialog(); The window displays correctly. All the pull down menus display correctly. Selecting any item in a pull down menu has no effect (the event seems to be unhandled). Selecting the big X in the window causes the window to close and control to return to the perl program. The GUI did work with the same code before partitioning, all code in a single .pl file. My suspicion is that you are letting the variable that holds your menu object go out of scope, but with no code posted it's hard to tell. Try using 'our $menu = ...' rather than 'my $menu = ...' when you create the menu object. Letting things go out of scope is very easy to do when you split code into modules. I split my code in the same way you do, so I doubt that there is problem with Win32::GUI::Dialog(); Another alternative might be that if you are using OEM events Win32-GUI can't see your handlers, as they have do be defined in the main package. For example, you might have had: sub Button_Click {}; now it would have to be sub ::Button_Click {}; Is this a perl implementation of an mph polynomial generator? I've already re-worked the whole constants support (see the archive for this list a couple of months back), and it currently uses a perl hash to hold the constants and do the lookup, but given the potential number of constants in the windows header files I was thinking of implementing a mph solution (and have been playing with Taj Khattra's mph-1.2, which I have ported to compile under MS VC++). A perl implementation that generates the polynomial values to stick in the C code would be a nice way to solve the problem that I have been struggling with of how to make a distribution that others can easily add constants to. Out of curiosity how much faster is a lookup using the mph-1.2 tool set V the perl hash? How much smaller is the mph structure V the perl hash structure? In terms of distribution, couldn't we assume that anyone wanting to add a constant would have (or need) the ability to build Win32-GUI from source? In which case, couldn't the hash be built as part of the build process? Cheers, jez.
Re: [perl-win32-gui-hackers] Re: DragDrop as xs
It's very easy to make terrible mistakes in the XS part. Devel::LeakTrace helps. I don't like leaks in MessageLoop events. I'll have a look at that module. No, more like: -onDragDrop = sub { my ($win, $drag) = @_; # dragged to win print Mouse: , join(, , $drag-MousePosition), \n; print Files: , join(, , $drag-Files), \n; } Looks good. Is there any chance that you could provide a simple working example that could also be added to CVS? Cheers, jez.
RE: [perl-win32-gui-hackers] Commit Win32::GUI::DropFiles
As always, any reports of success and/or failure are welcome. All ok under XP. Nice work. Cheers, jez.
RE: [perl-win32-gui-hackers] an introduction
Hi, I exported the cvs source and began to familiarize myself with it. Once I feel comfortable with that, I will try and work on either some low priority bugs or feature requests that no one has taken up yet. If anyone has any suggestions, tips, unstated best practices, advice, or whatever, I'd welcome and greatly appreciate it. If you haven't already done so, create a sourceforge ID, and drop an email to Rob May who will give you permissions to check in code. As for advice...For me the biggest learning curve was perl XS - the perl documentation isn't ideal (for a starting point see perlxs and perlapi) - the best resource I've found is the book Extending and Embedding Perl by Tim Jenness and Simon Conzens. Most of the XS code for win32-GUI is straightforward. Choosing a low priority bug or feature requests is a good way to start - if it's just about learning, just play and ask questions:) If you think you'll be checking it in at some point, ask the list first as someone else might be working on the same thing. Rob is working on some big chunks of functionality, and some coordination might be required. All the best, and welcome to the team. Regards, jez.
RE: [perl-win32-gui-hackers] CVS Commit - Win32::GUI::Constants added
I just added my code for the Win32::GUI::Constants module that we have discussed here recently. The build process is internally a bit convoluted, but should happen smoothly from the outside! As always comments on success and/or failures in your build environment are encouraged. No cup final for you eh?:) Ok - builds fine under my environment, with all tests passing. Cheers, jez.
Re: [perl-win32-gui-hackers] CVS Commit - Win32::GUI::Constants added
In the mean time, can anybody suggest why it might be a bad idea to remove 'Win32::GUI' from the @ISA of Win32::GUI::Class Win32::GUI::MenuButton or Win32::GUI::MenuItem? Not that I can think off. Cheers, jez.
Re: [win32-gui] RE: [perl-win32-gui-hackers] CVS Commit - More Win32::GUI::Constants changes
The only thing that concerns me is that the distribution is growing in size quite rapidly, and once things are in it's difficult to take them out. Is anyone concerned if the binary distribution doubles in size? How about if it trebles in size? I guess the real question is how do we decide what's in the core and what's not. Should we start separate distributions for some modules instead of having one large distribution? Personally I wouldn't mind if the binary distribution increased by 10 times - even then it would still be small compared to some toolkits!:) As long as the runtime sizes are kept the same (i.e., we're not loading modules if they aren't being used) and the exe generators (PAR, perl2exe perlapp) don't automatically include them - then there really isn't any issue other than bandwidth. There are other advantages of bundling them together - there is some shared code which could be removed, with other code simplified. Going forward, all these modules need to brought together anyway so we can support the NEM, improved class logic (via UserData type methods), Unicode and no doubt other things too:) We could always assume that the user will have these modules installed. Your win32-gui widget script for example, would show Perl code via Scintilla and link to the documentation (locally or on the web) via AxWindow (click on a method in the Scintilla window, and the documentation is shown). Cheers, jez.
[perl-win32-gui-hackers] Com in C, part 4 5
http://www.codeproject.com/com/com_in__c4.asp http://www.codeproject.com/useritems/com_in_c5.asp Cheers, jez.
RE: [perl-win32-gui-hackers] Constants, Scintilla, Grid, DIBitmap and AxWindow
Here's how I stand: Scintilla - no problems with this. I have the code ready to become Grid - I'm ready to make this part of core too. As it relies on the DIBitmap - Whilst this should technically be compilable (sp?) using AxWindow - relies on the MS ATL framework, so I doubt it can ever be Unless anyone want me to stop, I intend to raise a support request Sounds good to me. I assume that we'll end up with one PPM that will install all the modules? Cheers, jez.
Re: [perl-win32-gui-hackers] [win32-gui] Re: CVS Commit - More Win32::GUI::Constants changes
Right :) I don't pretend to speak for everyone, of course. I was a little concerned, though, about Jeremy's comment of sharing stuff that isn't presently shared, betweeen sub-modules... I don't know how much that is, or if it can be done without making more dependencies or bigger hunks of stuff. I think Jeremy's comment was about sharing GUI.h (and other headers etc.) during the build process - not about increasing dependencies between modules. Yeah, there are also some helper functions that could become common across modules - even if they just get defined as macros. Cheers, jez.
Re: [perl-win32-gui-hackers] AxWindow, DIBitmap, Grid and Scintilla [Was: CVS repository clean-up: perl-win32-gui]
See the 'Changes' file in each subdirectory for highlights of any significant changes. She builds fine for me. Good job. Cheers, jez.
Re: [perl-win32-gui-hackers] Commit: -wantreturn and $win-Animate()
I've added support for the Win32 AnimateWindow() API, as requested by tracker 1266930: https://sourceforge.net/tracker/index.php?func=detailaid=1266930group_id=16572atid=366572 Now, as well as $win-Show(), $win-Hide() you can use $win-Animate(). I had problems building under mingw - I had to set: #define WINVER 0x0501 in windef.h for it to build - after that, all tests pass, and the example runs (nice BTW!). Cheers, jez.
Re: [perl-win32-gui-hackers] [win32-gui] Re: Possible WinXP memory leak [Was:Commit]
As Rob said, this is primarily going to impact on an application that opens and closes many windows. At least the memory is more or less returned instantly on exit. Yeah - and as it looks like it's XP only we can assume that it's a windows thing rather than being a perl/win32-gui issue. Is there a Known Issues or limitations section somewhere in the documentation until this is eventually tracked down? Perhaps we should just update the tracker item, but leave it open for future reference? Cheers, jez.
[perl-win32-gui-hackers] Problems building with VC
Hi, I've got a box with VC6 on it and I'm trying to build Win32-GUI - I know I need to download the latest headers etc, but for the life of me (I've spent over an hour looking!) , I can't seem to find the correct place/right SDK? The errors below. Any suggestions? Cheers, jez. NOTE: WINVER has been defined as 0x0500 or greater which enables Windows NT 5.0 and Windows 98 features. When these headers were released, Windows NT 5.0 beta 1 and Windows 98 beta 2.1 were the current versions. For this release when WINVER is defined as 0x0500 or greater, you can only build beta or test applications. To build a retail application, set WINVER to 0x0400 or visit http://www.microsoft.com/msdn/sdk to see if retail Windows NT 5.0 or Windows 98 headers are available. See the SDK release notes for more information. *** Using Preserved Perl context. GUI_Options.cpp(934) : error C2039: 'uVersion' : is not a member of '_NOTIFYICON DATAA' C:\Program Files\Microsoft Visual Studio\VC98\include\shellapi.h(500) : see declaration of '_NOTIFYICONDATAA' GUI_Options.cpp(934) : error C2065: 'NOTIFYICON_VERSION' : undeclared identifier
[perl-win32-gui-hackers] Embedded HTML and COM part 7
All, Jeff Glatt has just updated his article Embed an HTML control in your own window using plain C http://www.codeproject.com/com/cwebpage.asp He has also released COM in plain C, Part 7 http://www.codeproject.com/useritems/com_in_c7.asp Both links are excellent sources of how to information when dealing with COM/C and the understanding of whole windows API event handling. Cheers, jez.
Re: [perl-win32-gui-hackers] Memory leaks
Tracker 1417288 https://sourceforge.net/tracker/index.php?func=detailaid=1417288group_id=16572atid=116572 This bug report claims that the following code leaks memory: #!perl -w I don't see any leak with Win32::GUI v1.05, perl 5.6.1, 5.8.7, 5.8.8, Win98 or Win2K. Can anyone reproduce this leak (I'm particularly interested if this is a WinXP thing) or can I close the report? I've just tried to reproduce it in an old Win32-GUI environment and it was leaking - upgrading to the latest code (via CVS) fixes the issue (that bug report might have come from me!) Cheers, Jez. _ MSN Hotmail is evolving check out the new Windows Live Mail http://ideas.live.com
Re: [perl-win32-gui-hackers] TODO for 1.06 release
On 31/01/2008, Jeremy White wrote: Just testing the latest Win32-GUI code line and I'm getting a few odd errors (mingw 5.8.8) ActiveState Perl 5.8.8 build 822? What gcc version? Vista, AS822, 3.4.5 (mingw special) It could be my environment and I haven't got time to dig deeper, but thought I'd report them just in case it's something simple. I hope it's your environment ... I can't get anything similar with WinXP, AS822, 3.4.5 (mingw special) Do the build test OK? Yeah - a few issues surounding pod and BitmapInLine (about closing files - probably a Vista thing). BTW - Installing V 1.5 back and the errors go away... I'd appreciate it if nothing else if you could send me a script exhibiting one (or more) of these problems so I can be sure whether I'm not seeing them too. I should have some more time to look at this over the weekend. Cheers, jez. _ Telly addicts unite! http://www.searchgamesbox.com/tvtown.shtml - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Perl-Win32-GUI-Hackers mailing list Perl-Win32-GUI-Hackers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-hackers http://perl-win32-gui.sourceforge.net/
Re: [perl-win32-gui-hackers] Win32::GUI 1.06 RC1 release candidate available for download
If you download it please feedback your experience (even if it is only 'OK so far') by replying to this thread (or directly to me) so that I can get a feel for whether there are any significant issues with the release. Was unable to do any testing over the weekend. Sorry. I uninstalled the previous version (via ppm) and installed the binary for 5.8 on my clean build machine: XP, 5.8.7 (813): Running any win32::GUI script I get: A windows error message box: The procedure entry point Perl_sv_2uv_flags could not be located in the dynamic link library perl58.dll Once you click on, you get the following on the command line. C:\DevelopmentVPN\Win32-GUI-1.05_90-PPM-5.8win32-gui-demos Can't load 'C:/Perl/site/lib/auto/Win32/GUI/GUI.dll' for module Win32::GUI: load _file:The specified procedure could not be found at C:/Perl/lib/DynaLoader.pm li ne 230. at C:\Perl\bin\win32-gui-demos.bat line 42 Compilation failed in require at C:\Perl\bin\win32-gui-demos.bat line 42. BEGIN failed--compilation aborted at C:\Perl\bin\win32-gui-demos.bat line 42. C:\DevelopmentVPN\Win32-GUI-1.05_90-PPM-5.8 In my main development environment (Vista, 5.8.8 (822)) I did the same (uninstalled and used the binary) and am getting the same issues (undefined value during destruction and Scintillia) I mentioned a few days ago. I am snowed under at the moment so I wont be able to create example showing the errors or to provide a fix. If you don't get anyone else reporting these issues - just release the version anyway - I am doing heavy things with Win32-GUI so it could even be my code. Sorry for the useless bug reports! Cheers, jez. _ Get Hotmail on your mobile, text MSN to 63463! http://mobile.uk.msn.com/pc/mail.aspx - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Perl-Win32-GUI-Hackers mailing list Perl-Win32-GUI-Hackers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-hackers http://perl-win32-gui.sourceforge.net/
Re: [perl-win32-gui-hackers] Win32::GUI 1.06 RC1 release candidate available for download
In my main development environment (Vista, 5.8.8 (822)) I did the same (uninstalled and used the binary) and am getting the same issues (undefined value during destruction and Scintillia) I mentioned a few days ago. Hmmm. I wonder what's causing that. I had really hoped that I had resolved those destruction warnings. Are these warnings that you don't get with Win32::GUI v1.05? Yes, I dont get them with v1.05. The only thing that I can think of is that I use a lot of child windows and for some reason they are getting destoryed twice somehow? Any thoughts on the scintilla issue? I'll try and find time to debug this week - although I need to test the latest version of PerlApp against Vista! Cheers, jez. _ Free games, great prizes - get gaming at Gamesbox. http://www.searchgamesbox.com - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Perl-Win32-GUI-Hackers mailing list Perl-Win32-GUI-Hackers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-hackers http://perl-win32-gui.sourceforge.net/
Re: [perl-win32-gui-hackers] Announce: v1.06 RC2 available for download.
Please could those who reported problems with RC1 download again, and confirm that their problems are resolved. New reports, successful or otherwise, are welcome from anyone - please reply to this thread. The following errors have been fixed: Can't call method FETCH on an undefined value during global destruction. Callback called exit during global destruction. Still have the scintilla issues - I should be able to do some debugging this weekend. Cheers, Jeremy. _ Telly addicts unite! http://www.searchgamesbox.com/tvtown.shtml - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Perl-Win32-GUI-Hackers mailing list Perl-Win32-GUI-Hackers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-hackers http://perl-win32-gui.sourceforge.net/
Re: [perl-win32-gui-hackers] Announce: v1.06 RC2 available for download.
Typo. That should be SendMessage rather SendMessageNN. Fix on its way to CVS now. Many thanks for taking the time to investigate this. Is that all your issues dealt with? Yep, should be. Once the fix is in I will have to do more testing as the scintillia issue was blocking some functionality - but it looks good:) Cheers, jez. _ Telly addicts unite! http://www.searchgamesbox.com/tvtown.shtml - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Perl-Win32-GUI-Hackers mailing list Perl-Win32-GUI-Hackers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-hackers http://perl-win32-gui.sourceforge.net/
Re: [perl-win32-gui-hackers] Announce: v1.06 RC2 available for download.
Yep, should be. Once the fix is in I will have to do more testing as the scintillia issue was blocking some functionality - but it looks good:) Fix is in CVS now. Thanks for your time. Rob. Done some more testing - had an issue where I was manually removing the linefeed characters after this method was called - this resulted in the text being truncated by two chars. Changed my code and it seems fine. Thanks for committing the fix. Cheers, jez. _ Share what Santa brought you https://www.mycooluncool.com - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Perl-Win32-GUI-Hackers mailing list Perl-Win32-GUI-Hackers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-hackers http://perl-win32-gui.sourceforge.net/
[perl-win32-gui-hackers] Crash with perl 5.10 and Win32::GUI 1.6
All, I am getting a crash when using Perl 5.10 and Win32::GUI 1.6. The same application doesn't crash under 5.8.7 or 5.8.8. I've tracked down the problem, but I'm not convinced it's the actual underlying issue. The crash was occurring at: GUI_Helpers.cpp line 757 proc WindowsHookMsgProc When I was selecting from the main menu of the application. The problem is the line: arrayref = av_fetch(perlud-avHooks, WM_TRACKPOPUP_MSGHOOK, 0); where: perlud-avHooks contains zero (NULL) Simply adding: if (perlud-avHooks !=NULL ) { before the call to the av_fetch stops the crash and the application runs normally. A potentially related issue is that I'm also getting: Can't call method STORE on an undefined value during global destruction. When the application exits. Again, this doesn't happen under 5.8.7 or 5.8.8. I am therefore suspecting a reference count issue somewhere? Any thoughts? I am going to try and create a simple test case. Cheers, jeremy. _ Amazing prizes every hour with Live Search Big Snap http://www.bigsnapsearch.com - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Register now and save $200. Hurry, offer ends at 11:59 p.m., Monday, April 7! Use priority code J8TLD2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ Perl-Win32-GUI-Hackers mailing list Perl-Win32-GUI-Hackers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-hackers http://perl-win32-gui.sourceforge.net/
Re: [perl-win32-gui-hackers] Crash with perl 5.10 and Win32::GUI 1.6
Ok: Found a simple way to reproduce the error: Can't call method STORE on an undefined value during global destruction. It doesn't seem related to the crash. The stripped down example below is odd as most of the code doesn't make sense (!) but if you comment out any of the lines it doesn't show the error. The error happens with the stock Win32::GUI 1.6 ppm and with the mingw built source under Perl 5.10 (activestate build 1002). I suspect the hook method - but I'm lost...Thoughts? Cheers, jeremy. use Win32::GUI(); use strict; my @rows; for (0..250) { push @rows,'abc'; } my $win = new Win32::GUI::Window (-name = win); $win-Hook(32768+3,sub {}); my $label = $win-AddLabel(-name = abc); #print $win $label\n; sub Message3 {$win-Hide();}; _ Get Hotmail on your mobile. Text MSN to 63463 now! http://mobile.uk.msn.com/pc/mail.aspx - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Register now and save $200. Hurry, offer ends at 11:59 p.m., Monday, April 7! Use priority code J8TLD2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ Perl-Win32-GUI-Hackers mailing list Perl-Win32-GUI-Hackers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-hackers http://perl-win32-gui.sourceforge.net/
Re: [perl-win32-gui-hackers] Crash with perl 5.10 and Win32::GUI 1.6
Hi, I've spent some more time on this. I've created a bug report on sourceforge so this isn't lost: http://sourceforge.net/tracker/index.php?func=detailaid=1941241group_id=16572atid=116572 Ok - it's not a hook issue, it looks like its just the normal destruction process which seems different under 5.10. Any changes to the code below (such as commenting out a line) changes the destruction order and thus the message isn't reproduced. Spent a while looking through the code, (Win32::GUI::WindowProps) and I admit I'm stumped:) Is all this functionality to support accessing the internals of an object? I thought that was deprecated functionality? As a side, I couldn't get Win32::GUI to crash because of this issue but it does mean that the script doesn't finish correctly - which in turn could have other issues (such as with PerlApp). Cheers, jez. From: [EMAIL PROTECTED] To: perl-win32-gui-hackers@lists.sourceforge.net Date: Sun, 6 Apr 2008 17:54:27 + Subject: Re: [perl-win32-gui-hackers] Crash with perl 5.10 and Win32::GUI 1.6 Ok: Found a simple way to reproduce the error: Can't call method STORE on an undefined value during global destruction. It doesn't seem related to the crash. The stripped down example below is odd as most of the code doesn't make sense (!) but if you comment out any of the lines it doesn't show the error. The error happens with the stock Win32::GUI 1.6 ppm and with the mingw built source under Perl 5.10 (activestate build 1002). I suspect the hook method - but I'm lost...Thoughts? Cheers, jeremy. use Win32::GUI(); use strict; my @rows; for (0..250) { push @rows,'abc'; } my $win = new Win32::GUI::Window (-name = win); $win-Hook(32768+3,sub {}); my $label = $win-AddLabel(-name = abc); #print $win $label\n; sub Message3 {$win-Hide();}; _ Get Hotmail on your mobile. Text MSN to 63463 now! http://mobile.uk.msn.com/pc/mail.aspx - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Register now and save $200. Hurry, offer ends at 11:59 p.m., Monday, April 7! Use priority code J8TLD2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ Perl-Win32-GUI-Hackers mailing list Perl-Win32-GUI-Hackers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-hackers http://perl-win32-gui.sourceforge.net/ _ The next generation of Windows Live is here http://www.windowslive.co.uk/get-live- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone___ Perl-Win32-GUI-Hackers mailing list Perl-Win32-GUI-Hackers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-hackers http://perl-win32-gui.sourceforge.net/
Re: [perl-win32-gui-hackers] Crash with perl 5.10 and Win32::GUI 1.6
Hi, I've created the following tracker item for this issue: http://sourceforge.net/tracker/index.php?func=detailaid=1941264group_id=16572atid=116572 I think the solution is straightforward but don't want to commit the code yet. As a side, I use the Win32::GUI::Coolbar module from Robs homepage: http://www.robmay.me.uk/win32gui and it needs updating to run under 1.6 (constants). I don't mind updating this module and would support it's move into the core. Cheers, jez. From: [EMAIL PROTECTED] To: perl-win32-gui-hackers@lists.sourceforge.net Date: Sun, 6 Apr 2008 11:21:53 + Subject: [perl-win32-gui-hackers] Crash with perl 5.10 and Win32::GUI 1.6 All, I am getting a crash when using Perl 5.10 and Win32::GUI 1.6. The same application doesn't crash under 5.8.7 or 5.8.8. I've tracked down the problem, but I'm not convinced it's the actual underlying issue. The crash was occurring at: GUI_Helpers.cpp line 757 proc WindowsHookMsgProc When I was selecting from the main menu of the application. The problem is the line: arrayref = av_fetch(perlud-avHooks, WM_TRACKPOPUP_MSGHOOK, 0); where: perlud-avHooks contains zero (NULL) Simply adding: if (perlud-avHooks !=NULL ) { before the call to the av_fetch stops the crash and the application runs normally. A potentially related issue is that I'm also getting: Can't call method STORE on an undefined value during global destruction. When the application exits. Again, this doesn't happen under 5.8.7 or 5.8.8. I am therefore suspecting a reference count issue somewhere? Any thoughts? I am going to try and create a simple test case. Cheers, jeremy. _ Amazing prizes every hour with Live Search Big Snap http://www.bigsnapsearch.com - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Register now and save $200. Hurry, offer ends at 11:59 p.m., Monday, April 7! Use priority code J8TLD2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ Perl-Win32-GUI-Hackers mailing list Perl-Win32-GUI-Hackers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-hackers http://perl-win32-gui.sourceforge.net/ _ The next generation of Windows Live is here http://www.windowslive.co.uk/get-live - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone ___ Perl-Win32-GUI-Hackers mailing list Perl-Win32-GUI-Hackers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-hackers http://perl-win32-gui.sourceforge.net/