From: Jeremy W. <jez...@ho...> - 2003-12-23 20:58:37
|
>From: Jonathan Southwick <jon...@al...> >I have been wanting to do this forever myself but never was able to ... >until today!!! > >I figured out a way to do it and its rather simple. You need to use >SendMessage though but it works. > >Here is the answer: > >$result = SendMessage($hWndControl, PBM_SETBARCOLOR, 0, $color); Nice work. This may be a little cheeky but could you turn this into a method (SetColor?) so it could be added to the next build of win32::gui? Might as well try and get all these enhancements into the core as they are solved. Cheers, jez. _________________________________________________________________ Send a funky Messenger Christmas card http://www.msn.co.uk/christmascard |
From: <ar...@ko...> - 2003-12-23 23:52:35
|
> >$result = SendMessage($hWndControl, PBM_SETBARCOLOR, 0, $color); GOOD! But now, please: PBM_SETBARCOLOR ( 0x400 + 9 ) PBM_SETBKCOLOR ( ? ) PBM_SETSTEP ( ? ) ................ It is a question silly ;) : How I can find itself continuation? Where to read about it? |
From: Jonathan S. <jon...@al...> - 2003-12-24 02:14:01
|
At 12/24/2003 02:51 AM, =?koi8-r?B?7MXXyc4=?= wrote: > > >$result = SendMessage($hWndControl, PBM_SETBARCOLOR, 0, $color); > GOOD! >But now, please: > >PBM_SETBARCOLOR ( 0x400 + 9 ) >PBM_SETBKCOLOR ( ? ) >PBM_SETSTEP ( ? ) PBM_SETBKCOLOR = 0x2000 + 1 PBM_SETSTEP = 0x400 + 4 >................ >It is a question silly ;) : >How I can find itself continuation? I don't understand what you mean by this. >Where to read about it? Try here: http://www.mvps.org/vbnet/index.html Jonathan ======================== Jonathan Southwick jon...@al... Technical & Network Services Allegheny College Meadville, PA 16335 (814) 332-2755 |
From: <ar...@ko...> - 2003-12-24 09:21:48
|
Thanks >>PBM_SETBARCOLOR ( 0x400 + 9 ) >>PBM_SETBKCOLOR ( ? ) >>PBM_SETSTEP ( ? ) >PBM_SETBKCOLOR = 0x2000 + 1 >PBM_SETSTEP = 0x400 + 4 ;) Jonathan, where you have taken these figures? How I can find these conformity itself and answer my question itself? I want to know as to use: IPM_GETADDRESS, SB_SETBKCOLOR, SB_GETTEXT, LVM_SETTEXTCOLOR, bla,bla,bla... MSDN does not comprise these conformity :-( |
From: Frazier, J. J. <Joe.Frazier@Peopleclick.com> - 2003-12-24 14:07:28
|
> -----Original Message----- > From: Jeremy White [mailto:jez...@ho...] > Sent: Tuesday, December 23, 2003 3:59 PM > To: jon...@al...; > per...@li... > Subject: Re: [perl-win32-gui-users] Progress bar's [coloring] >=20 >=20 > >From: Jonathan Southwick <jon...@al...> > >I have been wanting to do this forever myself but never was=20 > able to ...=20 > >until today!!! > > > >I figured out a way to do it and its rather simple. You need to use=20 > >SendMessage though but it works. > > > >Here is the answer: > > > >$result =3D SendMessage($hWndControl, PBM_SETBARCOLOR, 0, $color); >=20 > Nice work. This may be a little cheeky but could you turn=20 > this into a method=20 > (SetColor?) so it could be added to the next build of=20 > win32::gui? Might as=20 > well try and get all these enhancements into the core as they=20 > are solved. >=20 > Cheers, >=20 > jez. >=20 I would have to agree. Can this be added to the next Dev Branch of the = app as both compile time properties and also as methods? Johan, is there any way these can also be added as properties to TGL? = Depending on how long it will be before the next release will come out, = you may want to do it yourself if the code, or wait for the whole thing = in the next version of Win32::GUI and call the native functions. My hope now that we have several very committed users to developing = this, we will see releases at least once a month or so... In the meantime, what I do is something like this: package Win32::GUI; sub CenterOnScreen{ my ($window) =3D shift; #my $desk =3D $window->GetDesktopWindow(); #my(undef, undef, $d_width, $d_height)=3D = Win32::GUI::GetWindowRect($desk); my ($win_width)=3D $window->ScaleWidth(); my ($win_height) =3D $window->ScaleHeight(); my $delta_w =3D ($d_width /2) - ($win_width/ 2); my $delta_h =3D ($d_height / 2) - ($win_height / 2); $window->Move($delta_w, $delta_h); return 1; } package somethingelse my $Window =3D new Win32::GUI::Window ( #set everything here. I left out for brevity... ) $Window->CenterOnScreen(); $Window->Enable(); $Window->Show(); Win32::GUI::Dialog(); so that I can have a single method for doing centered window placement. = You could just as easily have other methods which do things simular and = be called as native object methods. Of course, this is not a complete = working example, but it gives you the idea. I do not know if this is a = "good" practice, but it works. If someone would like to translate this = into a proper Win32::GUI method, I would expect this would be more = efficient in xs with a perl method calling the xs function. |
From: Johan L. <jo...@ba...> - 2004-01-03 20:19:37
|
At 15:08 2003-12-24, Frazier, Joe Jr wrote: >Johan, is there any way these can also be added as properties to=20 >TGL? Depending on how long it will be before the next release will come= =20 >out, you may want to do it yourself if the code, or wait for the whole=20 >thing in the next version of Win32::GUI and call the native functions. > >My hope now that we have several very committed users to developing this= ,=20 >we will see releases at least once a month or so... Given that, I think the best way is to do it the proper way and have it=20 added to Win32::GUI and not hacked into TGL. When it's a matter of adding an option to a control or running a method o= n=20 the control object after creation, it's a minimal operation to add TGL=20 support. Kind of like this: $self->propertyAdd(Win32::GUI::Loft::ControlProperty->new("barcolor", "")= ); And should that not be fast enough, people can add it themselves using=20 Custom Properties <http://www.bahnhof.se/~johanl/perl/Loft/reference.html#custom%20properti= es> /J PS. There is a new release with 0.0.670 support at: <http://www.bahnhof.se/~johanl/perl/Loft/> -------- ------ ---- --- -- -- -- - - - - - Johan Lindstr=F6m Sourcerer @ Boss Casinos jo...@ba... Latest bookmark: "WIN32 API by Category" http://www.infotomic.com/infotomic/win32tlb/ByCategory.php dmoz (1 of 7): /Computers/Programming/Languages/JavaScript/ 7 |