[perl-win32-gui-users] Solution: flicker in Win32::GUI
Hi, I've recently been looking into the flickering resize in win32::gui. The most compatible solution to this I've found is extremely (and very annoyingly) simple. Just add the style WS_CLIPCHILDREN to your window or dialog box. I tried to implement double-buffering in GUI.xs (I was working with 0.0.558 at the time) but frankly I failed. Steve
[perl-win32-gui-users] Suggested addition to GUI.XS and some good news
Hi, Can anyone currently maintaining or debugging Win32::GUI add this to GUI.xs? It's a small change that lets you do SetParent() from Perl. I've written a dockable-windows routine (panes in your main window can be detached into windows) that works with my (very cool) packing grid object, which will be available to download soon. The docking routine needs to be able to change a window's parent (of course). This works with 665: ### # (@)METHOD:SetParent(VALUE) # Sets a windows parent handle # documentation. HWND SetParent(handle,value) HWND handle HWND value CODE: RETVAL = SetParent(handle, value); OUTPUT: RETVAL While I'm posting I might as well explain what the packing grid object does. It allows you to pack widgets into a grid. Heard that before? Well this does it with a difference. Each object you add to the grid can have properties assigned to it that dictate how it's aligned in the cell (left, center, right, top, middle, bottom) and whether it's stretched to fill the cell (vertically, horizontally or both). Each column or row in the grid can have a fixed width or a variable width. Variable-widthed columns or rows stretch to accommodate large widgets, and scale when the grid is resized (the entire grid can be given Width and Height). Still need more? Columns and rows can be resized. With my DragHandle object (which is a very simple label that can be dragged around the window using the mouse, and constrained horizontally and vertically, showing the appropriate cursors of course) you can implement mouse-dragable column/row sizes very easilly. These three modules are all almost complete, so you'll get them soon. They're all pure perl except for the one mod required for the dockable windows to work. Soon you'll be able to create slick apps *fast* :) Any questions, just ask. Steve
Re: [perl-win32-gui-users] Suggested addition to GUI.XS and some good news
Steve, I'd be glad to incorporate your routine into my code, which I hope someday to get on SourceForge. However, I have a question about it first. I'm not sure i is 100% complete, though... aren't there Win32::GUI data structures that need to be altered also? I think the tree of hashes that Win32::GUI creates during window creation includes a "-parent" field that sounds like it ought to be updated along with the theory that Windows's idea of the parent gets updated. Or maybe you've thought this through and have decided that it should be (for some reason, that maybe should be stated in the documentation for this function). Or maybe you've done that in your Perl code that calls this? Or maybe a lot of things. In spite of all that, if it seems to function correctly for you, adding it really wouldn't hurt anyone else even if it isn't 100% complete. And the other question, is where should it be added? I suppose to the main Win32::GUI package... Suggest a specific spot, though. On approximately 11/15/2003 5:14 PM, came the following characters from the keyboard of Steve Pick: Hi, Can anyone currently maintaining or debugging Win32::GUI add this to GUI.xs? It's a small change that lets you do SetParent() from Perl. I've written a dockable-windows routine (panes in your main window can be detached into windows) that works with my (very cool) packing grid object, which will be available to download soon. The docking routine needs to be able to change a window's parent (of course). This works with 665: ### # (@)METHOD:SetParent(VALUE) # Sets a windows parent handle # documentation. HWND SetParent(handle,value) HWND handle HWND value CODE: RETVAL = SetParent(handle, value); OUTPUT: RETVAL While I'm posting I might as well explain what the packing grid object does. It allows you to pack widgets into a grid. Heard that before? Well this does it with a difference. Each object you add to the grid can have properties assigned to it that dictate how it's aligned in the cell (left, center, right, top, middle, bottom) and whether it's stretched to fill the cell (vertically, horizontally or both). Each column or row in the grid can have a fixed width or a variable width. Variable-widthed columns or rows stretch to accommodate large widgets, and scale when the grid is resized (the entire grid can be given Width and Height). Still need more? Columns and rows can be resized. With my DragHandle object (which is a very simple label that can be dragged around the window using the mouse, and constrained horizontally and vertically, showing the appropriate cursors of course) you can implement mouse-dragable column/row sizes very easilly. These three modules are all almost complete, so you'll get them soon. They're all pure perl except for the one mod required for the dockable windows to work. Soon you'll be able to create slick apps *fast* :) Any questions, just ask. Steve --- This SF. Net email is sponsored by: GoToMyPC GoToMyPC is the fast, easy and secure way to access your computer from any Web browser or wireless device. Click here to Try it Free! https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl ___ Perl-Win32-GUI-Users mailing list Perl-Win32-GUI-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users -- Glenn -- http://nevcal.com/ === Like almost everyone, I receive a lot of spam every day, much of it offering to help me get out of debt or get rich quick. It's ridiculous. -- Bill Gates And here is why it is ridiculous: The division that includes Windows posted an operating profit of $2.26 billion on revenue of $2.81 billion. --from Reuters via http://biz.yahoo.com/rc/031113/tech_microsoft_msn_1.html So that's profit of over 400% of investment... with a bit more investment in Windows technology, particularly in the area of reliability, the profit percentage might go down, but so might the bugs and security problems? Seems like it would be a reasonable tradeoff. WalMart earnings are 3.4% of investment.
Re: [perl-win32-gui-users] Suggested addition to GUI.XS and some good news
Glenn, > I'd be glad to incorporate your routine into my code, which I hope > someday to get on SourceForge. However, I have a question about it > first. I'm not sure i is 100% complete, though... aren't there > Win32::GUI data structures that need to be altered also? Probably. I do know that there's no way I could find of extracting the parent using Win32::GUI's functions. There is no -parent field that can be retrieved with something like my $parent = $mainWin->{-parent}; but this works fine. > And the other question, is where should it be added? I suppose to the > main Win32::GUI package... Suggest a specific spot, though. I've just tagged it onto the end of GUI.xs. I suppose a sensible spot would be somewhere near wherever SetWindowLong() is, since the functions are related (you can SetWindowLong(-8,hWnd), to set a window's parent but that doesnt work properly and MSDN says "no! dont do this!! use SetParent!") > On approximately 11/15/2003 5:14 PM, came the following characters from > the keyboard of Steve Pick: > > Hi, > > > > Can anyone currently maintaining or debugging Win32::GUI add this to GUI.xs? > > It's a small change that lets you do SetParent() from Perl. > > > > I've written a dockable-windows routine (panes in your main window can be > > detached into > > windows) that works with my (very cool) packing grid object, which will be > > available to download soon. The docking routine needs to be able to change a > > window's parent (of course). > > > > This works with 665: > > > > ### > > # (@)METHOD:SetParent(VALUE) > > # Sets a windows parent handle > > # documentation. > > HWND > > SetParent(handle,value) > > HWND handle > > HWND value > > CODE: > > RETVAL = SetParent(handle, value); > > OUTPUT: > > RETVAL > > > > While I'm posting I might as well explain what the packing grid object does. > > It allows you to pack widgets into a grid. Heard that before? Well this does > > it with a difference. Each object you add to the grid can have properties > > assigned to it that dictate how it's aligned in the cell (left, center, > > right, top, middle, bottom) and whether it's stretched to fill the cell > > (vertically, horizontally or both). Each column or row in the grid can have > > a fixed width or a variable width. Variable-widthed columns or rows stretch > > to accommodate large widgets, and scale when the grid is resized (the entire > > grid can be given Width and Height). > > > > Still need more? Columns and rows can be resized. With my DragHandle object > > (which is a very simple label that can be dragged around the window using > > the mouse, and constrained horizontally and vertically, showing the > > appropriate cursors of course) you can implement mouse-dragable column/row > > sizes very easilly. > > > > These three modules are all almost complete, so you'll get them soon. > > They're all pure perl except for the one mod required for the dockable > > windows to work. Soon you'll be able to create slick apps *fast* :) > > > > Any questions, just ask. > > > > Steve > > > > > > > > --- > > This SF. Net email is sponsored by: GoToMyPC > > GoToMyPC is the fast, easy and secure way to access your computer from > > any Web browser or wireless device. Click here to Try it Free! > > https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl > > ___ > > Perl-Win32-GUI-Users mailing list > > Perl-Win32-GUI-Users@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users > > > > > > -- > Glenn -- http://nevcal.com/ > === > Like almost everyone, I receive a lot of spam every day, much of it > offering to help me get out of debt or get rich quick. It's ridiculous. > -- Bill Gates > > And here is why it is ridiculous: > The division that includes Windows posted an operating profit of $2.26 > billion on revenue of $2.81 billion. > --from Reuters via > http://biz.yahoo.com/rc/031113/tech_microsoft_msn_1.html > > So that's profit of over 400% of investment... with a bit more > investment in Windows technology, particularly in the area of > reliability, the profit percentage might go down, but so might the bugs > and security problems? Seems like it would be a reasonable tradeoff. > WalMart earnings are 3.4% of investment. > > > > --- > This SF. Net email is sponsored by: GoToMyPC > GoToMyPC is the fast, easy and secure way to access your computer from > any Web browser or wireless device. Click here to Try it Free! > https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl > ___ > Perl-Win32-GUI-Users mailing list > Perl-Win32-GUI-Users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/perl-win32-gui