From: Steve P. <st...@ba...> - 2003-12-02 18:53:51
|
Hello. I'm going to look into this list of bugs to see what I can fix, but I'm = quite sure none of them are to do with my patches :) and maybe you have = some answers: 1. Default DialogBox background is white on Windows 2000, rather than = the correct colour for a buttonface/3dface. I assume this is known = because it's blatantly obvious. 2. NEM event onResize seems to be called in the constructor for Windows = and possibly all other widgets. This is very frustrating because if you = use onResize to handle your scaling, then often it tries to scale = widgets that have not yet been defined, causing an error.=20 3. Timers no longer seem to work as documented. In fact they don't work = at all (for me). This could be something that only manifests itself when = the NEM is used, but I haven't tested that. 4. NEM events seem to be triggered tons of times. For example when I = click a mouse button I get about 60 onMouseDown calls. 5. There are times when -style is appropriate. I admit that -style = SHOULD be deprecated, but there should be a new argument such as = -forcestyle for when you know what you're doing. I can see that default = styles could be changed in future, and hardcoding -popstyle for each = default style seems rather crude to me. Steve ----- Original Message -----=20 From: Laurent ROCHER=20 To: Win32 GUI Hackers=20 Sent: Sunday, November 30, 2003 12:20 AM Subject: [perl-win32-gui-hackers] CVS Commit Hi all, I commit this : + [Glenn Linderman] Accelerator key patch, Correct NotifyIcon DESTROY, = add PM_* constants for use with TrackPopupMenu. + [Laurent Rocher] Fix some warnings, Remove unused variables, remove = constants.c file. + [Trevor Garside] Add new RichEdit methods. + [Steve Pick & Laurent Rocher] Add parameters for WM_KEYDOWN and = WM_KEYUP NEM events in NEM_ChildMsgLoop. + [Johan Lindstrom] Add WM_DROPFILES event in WindowMsgLoop. + [Laurent Rocher] Add new options for GetOpenFileName and = GetSaveFileName. I have more thing to add from Glenn patch. Laurent |
From: Laurent R. <ro...@cl...> - 2003-12-02 21:00:13
|
Hi, 1.=20 =20 Aldo make a change in GUI.pm for correct XP color but don't work for = me on Win98Se. In Win32::GUI::Class new # figure out the correct background color=20 # (to avoid the "white background" syndrome on XP) if(not exists $args{-color}) { my($undef, $major, $minor) =3D Win32::GetOSVersion(); if($major =3D=3D 5 && $minor > 0) { =20 $args{-color} =3D Win32::GUI::constant("COLOR_BTNFACE", 0)+1; } else { $args{-color} =3D Win32::GUI::constant("COLOR_WINDOW", 0)+1; } } I remove red +1 and now it's correct for me. 2. 3. 4. New bug to investigate ;o) 5.=20 If -style need to be deprecated, i don't think it's a good idea to a = add -forcestyle. We keep -style without deprecated warning message.=20 Or, we remove it and force people to use registered class for fix a = default style. For me, -style don't need to be deprecated. It's a programmer choice (and supposed know what he's doing ;o). -popstyle/-pushstyle for set/reset a specific control style. -style are usefull for set a fixed style.=20 Laurent. ----- Original Message -----=20 Hello. I'm going to look into this list of bugs to see what I can fix, but = I'm quite sure none of them are to do with my patches :) and maybe you = have some answers: 1. Default DialogBox background is white on Windows 2000, rather than = the correct colour for a buttonface/3dface. I assume this is known = because it's blatantly obvious. 2. NEM event onResize seems to be called in the constructor for = Windows and possibly all other widgets. This is very frustrating because = if you use onResize to handle your scaling, then often it tries to scale = widgets that have not yet been defined, causing an error.=20 3. Timers no longer seem to work as documented. In fact they don't = work at all (for me). This could be something that only manifests itself = when the NEM is used, but I haven't tested that. 4. NEM events seem to be triggered tons of times. For example when I = click a mouse button I get about 60 onMouseDown calls. 5. There are times when -style is appropriate. I admit that -style = SHOULD be deprecated, but there should be a new argument such as = -forcestyle for when you know what you're doing. I can see that default = styles could be changed in future, and hardcoding -popstyle for each = default style seems rather crude to me. Steve |
From: Glenn L. <pe...@ne...> - 2003-12-02 21:36:30
|
On approximately 12/2/2003 1:00 PM, came the following characters from the keyboard of Laurent ROCHER: > 5. > If -style need to be deprecated, i don't think it's a good idea to > a add -forcestyle. > We keep -style without deprecated warning message. > Or, we remove it and force people to use registered class for fix > a default style. > > For me, -style don't need to be deprecated. > It's a programmer choice (and supposed know what he's doing ;o). > -popstyle/-pushstyle for set/reset a specific control style. > -style are usefull for set a fixed style. There is also -addstyle and -remstyle, so really -style isn't that necessary. > > Laurent. > > ----- Original Message ----- > > Hello. > > I'm going to look into this list of bugs to see what I can fix, but > I'm quite sure none of them are to do with my patches :) and maybe > you have some answers: > > 1. Default DialogBox background is white on Windows 2000, rather > than the correct colour for a buttonface/3dface. I assume this is > known because it's blatantly obvious. > > 2. NEM event onResize seems to be called in the constructor for > Windows and possibly all other widgets. This is very frustrating > because if you use onResize to handle your scaling, then often it > tries to scale widgets that have not yet been defined, causing an > error. > > 3. Timers no longer seem to work as documented. In fact they don't > work at all (for me). This could be something that only manifests > itself when the NEM is used, but I haven't tested that. > > 4. NEM events seem to be triggered tons of times. For example when I > click a mouse button I get about 60 onMouseDown calls. > > 5. There are times when -style is appropriate. I admit that -style > SHOULD be deprecated, but there should be a new argument such as > -forcestyle for when you know what you're doing. I can see that > default styles could be changed in future, and hardcoding -popstyle > for each default style seems rather crude to me. > > Steve > -- 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. |
From: Laurent R. <ro...@cl...> - 2003-12-02 23:21:40
|
> > 5. > > If -style need to be deprecated, i don't think it's a good idea to > > a add -forcestyle. > > We keep -style without deprecated warning message. > > Or, we remove it and force people to use registered class for fix > > a default style. > > > > For me, -style don't need to be deprecated. > > It's a programmer choice (and supposed know what he's doing ;o). > > -popstyle/-pushstyle for set/reset a specific control style. > > -style are usefull for set a fixed style. > > There is also -addstyle and -remstyle, so really -style isn't that > necessary. It's do same job : -addstyle == -pushstyle -popstyle == -remstyle == -notstyle == -negstyle from GUI_Options : } else if(strcmp(option, "-style") == 0) { next_i = i + 1; perlcs->cs.style = (DWORD) SvIV(ST(next_i)); if(PL_dowarn) { warn("Win32::GUI: the -style option is deprecated!"); } } else if(strcmp(option, "-pushstyle") == 0 || strcmp(option, "-addstyle") == 0) { next_i = i + 1; perlcs->cs.style |= (DWORD) SvIV(ST(next_i)); } else if(strcmp(option, "-popstyle") == 0 || strcmp(option, "-remstyle") == 0 || strcmp(option, "-notstyle") == 0 || strcmp(option, "-negstyle") == 0) { next_i = i + 1; perlcs->cs.style ^= (DWORD) SvIV(ST(next_i)); I think we have a bug on -remstyle like options. If you remove a style not set, you push it !!!! #perl # remstyle on a set style $var = 1; $var ^= 1; print "$var\n"; # print 0 OK # remstyle on a not set style $var = 2; $var ^= 1; print "$var\n"; # print 3 Wrong !!! # correct remstyle $var = 3; $var &= $var ^ 1; print "$var\n"; # print 2 OK So if we correct this, and use a -remstyle => 0xFFFFFFFF and a -addstyle this work like -style option. $W->AddLabel( -text => 'Hello, world', -name => 'Hello', -left => 25, -top => 25, -remstyle => 0xFFFFFFFF, -addstyle => WS_VISIBLE | WS_CHILD | SS_CENTER; ); I don't know if it's possible to have an order parse options problem. But, it's not very nice. -style option is better. -style option have is avantage than others -*style options haven't (and reverse is true). It's why i think it's not need to be deprecated (actually warm message and probably remove in futur version). So, keep both and use as appropriate ;o) Laurent. |
From: Steve P. <st...@ba...> - 2003-12-02 23:13:30
|
I have fixed the following bugs: 1. Rehashed the way Win32::GUI::Class constructor detects xp or not. = Removed the whole ELSE condition of that part that checks the OS = version; it's not needed since if -color is not set, it's set to the = correct color later on in the constructor. 2. I was wrong about this one, I think. 3. Timers don't work with NEM. I fixed it like so: You add timers as = normal, but also create add an onTimer option to your window. When a = timer triggers, onTimer is called with the string argument of the timer = that triggered. Had to define a new NEM event in GUI.h to support this: #define PERLWIN32GUI_NEM_TIMER 0x08000000 4. Looked into this, and made one change: DoEvent_NEM was always = returning -2 (saying it hadnt handled the event) when it should have = returned 0. Now if it finds an appropriate event, it sets perlresult to = default to 0. Perlresult can still be overridden by an error or = something after this setting. 5. Exactly. My bugfixed version is available here: = http://baxpace.com/Win32-GUI-Fix.zip The changes are scattered everywhere. If you have some kind of = patch-generating program, that'd be a good idea. Patch relative to = current CVS. Steve ----- Original Message -----=20 From: Laurent ROCHER=20 To: Win32 GUI Hackers=20 Sent: Tuesday, December 02, 2003 9:00 PM Subject: Re: [perl-win32-gui-hackers] CVS Commit Hi, 1.=20 =20 Aldo make a change in GUI.pm for correct XP color but don't work = for me on Win98Se. In Win32::GUI::Class new # figure out the correct background color=20 # (to avoid the "white background" syndrome on XP) if(not exists $args{-color}) { my($undef, $major, $minor) =3D Win32::GetOSVersion(); if($major =3D=3D 5 && $minor > 0) { =20 $args{-color} =3D Win32::GUI::constant("COLOR_BTNFACE", 0)+1; } else { $args{-color} =3D Win32::GUI::constant("COLOR_WINDOW", 0)+1; } } I remove red +1 and now it's correct for me. 2. 3. 4. New bug to investigate ;o) 5.=20 If -style need to be deprecated, i don't think it's a good idea to = a add -forcestyle. We keep -style without deprecated warning message.=20 Or, we remove it and force people to use registered class for fix = a default style. For me, -style don't need to be deprecated. It's a programmer choice (and supposed know what he's doing ;o). -popstyle/-pushstyle for set/reset a specific control style. -style are usefull for set a fixed style.=20 Laurent. ----- Original Message -----=20 Hello. I'm going to look into this list of bugs to see what I can fix, but = I'm quite sure none of them are to do with my patches :) and maybe you = have some answers: 1. Default DialogBox background is white on Windows 2000, rather = than the correct colour for a buttonface/3dface. I assume this is known = because it's blatantly obvious. 2. NEM event onResize seems to be called in the constructor for = Windows and possibly all other widgets. This is very frustrating because = if you use onResize to handle your scaling, then often it tries to scale = widgets that have not yet been defined, causing an error.=20 3. Timers no longer seem to work as documented. In fact they don't = work at all (for me). This could be something that only manifests itself = when the NEM is used, but I haven't tested that. 4. NEM events seem to be triggered tons of times. For example when I = click a mouse button I get about 60 onMouseDown calls. 5. There are times when -style is appropriate. I admit that -style = SHOULD be deprecated, but there should be a new argument such as = -forcestyle for when you know what you're doing. I can see that default = styles could be changed in future, and hardcoding -popstyle for each = default style seems rather crude to me. Steve |
From: Laurent R. <ro...@cl...> - 2003-12-02 23:36:50
|
It's too late for me, i look this tomorrow ;o) For your patch, a zip file like this it's not a problem (I use = winmerge). If you want to have CVS commit access, register a user on Sourceforge = and send a mail to Aldo with your ID. He give you developper access to Win32::GUI project. Laurent. ----- Original Message -----=20 From: Steve Pick=20 To: Laurent ROCHER ; Win32 GUI Hackers=20 Sent: Wednesday, December 03, 2003 12:15 AM Subject: FIXES: [perl-win32-gui-hackers] CVS Commit I have fixed the following bugs: 1. Rehashed the way Win32::GUI::Class constructor detects xp or not. = Removed the whole ELSE condition of that part that checks the OS = version; it's not needed since if -color is not set, it's set to the = correct color later on in the constructor. 2. I was wrong about this one, I think. 3. Timers don't work with NEM. I fixed it like so: You add timers as = normal, but also create add an onTimer option to your window. When a = timer triggers, onTimer is called with the string argument of the timer = that triggered. Had to define a new NEM event in GUI.h to support this: #define PERLWIN32GUI_NEM_TIMER 0x08000000 4. Looked into this, and made one change: DoEvent_NEM was always = returning -2 (saying it hadnt handled the event) when it should have = returned 0. Now if it finds an appropriate event, it sets perlresult to = default to 0. Perlresult can still be overridden by an error or = something after this setting. 5. Exactly. My bugfixed version is available here: = http://baxpace.com/Win32-GUI-Fix.zip The changes are scattered everywhere. If you have some kind of = patch-generating program, that'd be a good idea. Patch relative to = current CVS. Steve |
From: Johan L. <jo...@ba...> - 2003-12-03 14:20:44
|
At 22:00 2003-12-02, Laurent ROCHER wrote: > # figure out the correct background color > # (to avoid the "white background" syndrome on XP) > if(not exists $args{-color}) { > my($undef, $major, $minor) = Win32::GetOSVersion(); > if($major == 5 && $minor > 0) { > $args{-color} = Win32::GUI::constant("COLOR_BTNFACE", 0)+1; > } else { Maybe it is just me, but the hardcoded $major == 5 (exactly 5) smells a little bit fragile. /J -------- ------ ---- --- -- -- -- - - - - - Johan Lindström Sourcerer @ Boss Casinos jo...@ba... Latest bookmark: "Oracle 101" http://www.rocket99.com/oracle/oracle12.html dmoz: /Computers/Software/Databases/Oracle/ 212 |
From: Aldo C. <da...@pe...> - 2003-12-03 14:45:26
|
Johan Lindstrom wrote: > Maybe it is just me, but the hardcoded $major == 5 (exactly 5) smells a > little bit fragile. heh. I don't know which COLOR_$@%!$# will be needed when $major will be 6 :-) but yes, maybe it is safer to assume $major >= 5, thank you. cheers, Aldo __END__ $_=q,just perl,,s, , another ,,s,$, hacker,,print; |
From: Glenn L. <pe...@ne...> - 2003-12-03 17:18:10
|
So then it really needs to read: if ( $major == 5 && $minor > 0 || $major > 5 ) since Win2k is 5.0 and WinXP is 5.1 and who knows whether the next incompatible upgrade to Windows will be called 5.2 or 6.0 or 8.3 ... On approximately 12/3/2003 6:42 AM, came the following characters from the keyboard of Aldo Calpini: > Johan Lindstrom wrote: > >>Maybe it is just me, but the hardcoded $major == 5 (exactly 5) smells a >>little bit fragile. > > > heh. I don't know which COLOR_$@%!$# will be needed when $major will > be 6 :-) > > but yes, maybe it is safer to assume $major >= 5, thank you. > > > cheers, > Aldo > > __END__ > $_=q,just perl,,s, , another ,,s,$, hacker,,print; > > > > ------------------------------------------------------- > This SF.net email is sponsored by: SF.net Giveback Program. > Does SourceForge.net help you be more productive? Does it > help you create better code? SHARE THE LOVE, and help us help > YOU! Click Here: http://sourceforge.net/donate/ > _______________________________________________ > Perl-Win32-GUI-Hackers mailing list > Per...@li... > https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-hackers > > -- 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. |
From: Steve P. <st...@ba...> - 2003-12-03 18:45:56
|
I will change this in the next commit. Steve ----- Original Message ----- From: "Glenn Linderman" <pe...@ne...> To: "Aldo Calpini" <da...@pe...> Cc: <per...@li...>; "Johan Lindstrom" <jo...@ba...>; <per...@li...> Sent: Wednesday, December 03, 2003 5:14 PM Subject: Re: [perl-win32-gui-hackers] CVS Commit > So then it really needs to read: > > if ( $major == 5 && $minor > 0 || $major > 5 ) > > since Win2k is 5.0 and WinXP is 5.1 and who knows whether the next > incompatible upgrade to Windows will be called 5.2 or 6.0 or 8.3 ... > > > On approximately 12/3/2003 6:42 AM, came the following characters from > the keyboard of Aldo Calpini: > > Johan Lindstrom wrote: > > > >>Maybe it is just me, but the hardcoded $major == 5 (exactly 5) smells a > >>little bit fragile. > > > > > > heh. I don't know which COLOR_$@%!$# will be needed when $major will > > be 6 :-) > > > > but yes, maybe it is safer to assume $major >= 5, thank you. > > > > > > cheers, > > Aldo > > > > __END__ > > $_=q,just perl,,s, , another ,,s,$, hacker,,print; > > > > > > > > ------------------------------------------------------- > > This SF.net email is sponsored by: SF.net Giveback Program. > > Does SourceForge.net help you be more productive? Does it > > help you create better code? SHARE THE LOVE, and help us help > > YOU! Click Here: http://sourceforge.net/donate/ > > _______________________________________________ > > Perl-Win32-GUI-Hackers mailing list > > Per...@li... > > https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-hackers > > > > > > -- > 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: SF.net Giveback Program. > Does SourceForge.net help you be more productive? Does it > help you create better code? SHARE THE LOVE, and help us help > YOU! Click Here: http://sourceforge.net/donate/ > _______________________________________________ > Perl-Win32-GUI-Hackers mailing list > Per...@li... > https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-hackers > |
From: Laurent R. <ro...@cl...> - 2003-12-03 20:22:10
|
On my Win98Se (major 4, minor 10). COLOR_BTNFACE+1 and COLOR_WINDOW look to work well. I have a grey background. Laurent > I will change this in the next commit. > > Steve > > > So then it really needs to read: > > > > if ( $major == 5 && $minor > 0 || $major > 5 ) > > > > since Win2k is 5.0 and WinXP is 5.1 and who knows whether the next > > incompatible upgrade to Windows will be called 5.2 or 6.0 or 8.3 ... > > |