1. RE: win32lib v0.59.1 released
- Posted by Robert Szalay <robsz1 at hotpop.com> Jun 09, 2003
- 426 views
WinZip wouldnt open it for me either. Robert Szalay schottgunt at netway.at wrote: > > > Derek Parnell wrote: > > > > Please find the latest release of the Win32Lib library at> > > http://www.users.bigpond.com/ddparnell/euphoria/euphoria.htm > > > > I downloaded it > > My Windows-XP said, it can not open the zip file > > maybe it has a failure? > > Guenther Schott >
2. RE: win32lib v0.59.1 released
- Posted by Jonas Temple <jtemple at yhti.net> Jun 09, 2003
- 419 views
Derek, Hey, GREAT job on the v0.59.1. I applied the new release and everything I've ever written worked fine. The only problem is in the setCheck() routine for tree views. This sample program has a tree view with TVS_CHECKBOXES style defined. Run the program, clicking between the two load buttons. You'll notice that when "Load with setCheck" is clicked the check boxes disappear and appear when the other button is pressed. I think I found the problem. When setting the checked state the "state" value needs to be: checked = (2 * power(2, 12)) unchecked = (1 * power(2, 12)) I changed the setting of "state" in setCheck() and the example program works fine. Also, at first glance it looks like you've got the printing issue taken care of. Thank you! Jonas -- code generated by Win32Lib IDE v0.17.0 include Win32Lib.ew without warning -------------------------------------------------------------------------------- -- Window Window1 global constant Window1 = createEx( Window, "Window1", 0, Default, Default, 515, 441, {WS_DLGFRAME, WS_SYSMENU}, {WS_EX_DLGMODALFRAME} ) global constant TreeView2 = createEx( TreeView, "", Window1, 32, 20, 432, 324, or_all({TVS_HASLINES,TVS_LINESATROOT,TVS_HASBUTTONS,TVS_SHOWSELALWAYS, TVS_CHECKBOXES}), 0 ) constant closefolder = addIcon( extractIcon("clsdfold.ico") ) constant openfolder = addIcon( extractIcon("openfold.ico") ) global constant LoadCheck = createEx( PushButton, "Load with setCheck", Window1, 32, 356, 152, 28, 0, 0 ) global constant LoadNoCheck = createEx( PushButton, "Load without setCheck", Window1, 192, 356, 176, 28, 0, 0 ) --------------------------------------------------------- -------------------------------------------------------------------------------- procedure LoadCheck_onClick (integer self, integer event, sequence params)--params is () atom void eraseItems(TreeView2) for i = 1 to 10 do void = addTVItem(TreeView2, closefolder, openfolder, sprintf("%d",i), 0) setCheck({{TreeView2, void}}, True) end for end procedure setHandler( LoadCheck, w32HClick, routine_id("LoadCheck_onClick")) -------------------------------------------------------------------------------- procedure LoadNoCheck_onClick (integer self, integer event, sequence params)--params is () atom void eraseItems(TreeView2) for i = 1 to 10 do void = addTVItem(TreeView2, closefolder, openfolder, sprintf("%d",i), 0) end for end procedure setHandler( LoadNoCheck, w32HClick, routine_id("LoadNoCheck_onClick")) WinMain( Window1,Normal ) Derek Parnell wrote: > > > Please find the latest release of the Win32Lib library at > > http://www.users.bigpond.com/ddparnell/euphoria.htm
3. RE: win32lib v0.59.1 released
- Posted by Jonas Temple <jtemple at yhti.net> Jun 09, 2003
- 412 views
Derek, In addition to the change I made to setCheck I also had to make the following change to isChecked in regards to tree views: In the tree view handling section of isChecked, I replaced: lRes = and_bits(state , TVIS_SELECTED ) with lRes = (state / power(2,12)) lRes = floor(lRes - 1) Jonas Jonas Temple wrote: > > > Derek, > > Hey, GREAT job on the v0.59.1. I applied the new release and everything > > I've ever written worked fine. The only problem is in the setCheck() > routine for tree views. This sample program has a tree view with > TVS_CHECKBOXES style defined. Run the program, clicking between the two > > load buttons. You'll notice that when "Load with setCheck" is clicked > the check boxes disappear and appear when the other button is pressed. > I think I found the problem. When setting the checked state the "state" > > value needs to be: > > checked = (2 * power(2, 12)) > unchecked = (1 * power(2, 12)) > > I changed the setting of "state" in setCheck() and the example program > works fine. > > Also, at first glance it looks like you've got the printing issue taken > care of. Thank you! > > Jonas