[perl-win32-gui-users] DateTime new methods

2003-11-17 Thread Jeremy White

Glenn,

Below are two new methods (GetDateTime and SetDateTime) for the datetime 
control. They allow the setting and reading of the time component. I've also 
included a simple example. I'll update the online documentation when you 
have released the new build.


I tried to find the fix for the splitter control but couldn't find any code, 
although found this mail from Trevor Garside:


Splitter Auto-Size
  I made some changes to the Splitter code to make it to auto-resize as it 
is being
dragged.  If you are interested in it, I can send it.  This was the first 
bit of code I
edited, and at that point I had no idea how XS worked.  Now that I am more 
familiar with it,

I want to re-code it and make it a switch-enabled option.

I've emailed him to see if he is prepaired to send the code to this list.

Cheers,

jez.

###
# (@)METHOD:GetDateTime()
# (preliminary) Returns the date and time in the DateTime control in a eight
# elements array (year, month, day, dayofweek, hour, minute, second, 
millisecond).

# Based on code from Laurent Rocher
void
GetDateTime(handle)
HWND handle
PREINIT:
SYSTEMTIME st;
PPCODE:
if(DateTime_GetSystemtime(handle, st) == GDT_VALID) {
EXTEND(SP, 8);
XST_mIV(0, st.wYear);
XST_mIV(1, st.wMonth);
XST_mIV(2, st.wDay);
XST_mIV(3, st.wDayOfWeek);
XST_mIV(4, st.wHour);
XST_mIV(5, st.wMinute);
XST_mIV(6, st.wSecond);
XST_mIV(7, st.wMilliseconds);
XSRETURN(8);
} else {
XSRETURN_UNDEF;
}

###
# (@)METHOD:SetDateTime(YEAR,MON, DAY, HOUR, MIN, SEC, [MSEC=0])
# (preliminary) Sets the date time in the DateTime control
# Based on code from Laurent Rocher
BOOL
SetDateTime(handle, year, mon, day, hour, min, sec, msec=0)
HWND handle
int year
int mon
int day
int hour
int min
int sec
int msec
PREINIT:
SYSTEMTIME st;
CODE:
ZeroMemory(st, sizeof(SYSTEMTIME));
st.wYear   = year;
st.wDay= day;
st.wMonth  = mon;
st.wHour   = hour;
st.wMinute = min;
st.wSecond = sec;
st.wMilliseconds = msec;

RETVAL = DateTime_SetSystemtime(handle, GDT_VALID, st);
OUTPUT:
 RETVAL
###

An example using the new methods:

use strict;
use Win32::GUI;

# main Window
my $Window = new Win32::GUI::Window (
   -name = Window,
   -title= Test,
   -pos  = [100, 100],
   -size = [400, 400],
) or die new Window;

# Date time control
my $DateTime = new Win32::GUI::DateTime (
   -parent   = $Window,
   -name = DateTime,
   -pos  = [10, 10],
   -size = [180, 20],
);

$DateTime-Format('dd-MMM- HH:mm:ss');

# Test Buttons
my $Button = $Window-AddButton  (
   -name = Gettime,
   -text = Get the time,
   -pos  = [100, 100],
   -size = [100, 100],
);

my $Button1 = $Window-AddButton  (
   -name = Settime,
   -text = Set the time,
   -pos  = [205, 100],
   -size = [100, 100],
);

# Event loop
$Window-Show();
Win32::GUI::Dialog();

# Main window event handler
sub Window_Terminate {
return -1;
}

# Button events
sub Gettime_Click {
my ($mday, $mon, $year, undef, $hour, $min,$sec) = $DateTime-GetDateTime();
print Year $year Month $mon Day $mday Hour $hour Min $min Sec $sec \n;

}
sub Settime_Click {
 my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = 
localtime(time);

 $year += 1900;
 $DateTime-SetDateTime($year, $mon, $mday, $hour,$min, $sec);
}

_
On the move? Get Hotmail on your mobile phone http://www.msn.co.uk/msnmobile




[perl-win32-gui-users] I'm here

2003-11-17 Thread Aldo Calpini
hello Win32::GUI people

I'm here, I'm here! I'm very, very sorry for my latitance. I know I
have promised a lot of things, a lot of times, and never respected
what I said. please accept my excuse for this.

and I'm very, very happy to see things moving and people willing to
help. as it is clear at this point, I'm not in the position to continue
developing Win32::GUI all alone. but I'm not going to give up the project.
if there is something useful for the community I can do acting as a
coordinator (sort of pumpking, in Perl terms), I'll be very happy to
coordinate. if someone feels like taking over the whole stuff, I'll be
very happy to be just a member of a team of developers.

my current development version of Win32::GUI has many bugfixes, but the
internals are being heavily reworked (to support NEM more natively)
and there are many non-working features. as an open question to anyone
interested, I ask: do you think it is better to keep the rewrite off
for a while and work on bugfixing the current release, or do you
prefer working with me on the new internals?

I can give all the tech help (eg. about XS and about how Win32::GUI works)
to people who want to be part of the dev team. there's a mailing list
(perl-win32-gui-hackers) that I set up just for this task.

so, if you want CVS commit access on SourceForge, just give me your
SourceForge user name and I will set it up. the -hackers mailing list
can also be used to ask questions about how SourceForge and/or CVS
works.

regarding the documentation, I appreciate what Erick did, but I found
it a little difficult to work with. I think a wiki (with CGI::Kwiki,
for example) would be a better start. we could also write in POD so
that the documentation could be more easily integrated in the CPAN
distribution.

I'm still backlogging all the messages on the list, so I will have
more to elaborate on later. for now, please accept my most sincere and
humble apologies for being such a non-existant person for so much
time :-(


cheers,
Aldo

__END__
$_=q,just perl,,s, , another ,,s,$, hacker,,print;




[perl-win32-gui-users] How to Flash a Window?

2003-11-17 Thread leonard . jacobsen
Does anyone know how I could go about making my main window flash when a
certain event has occured?

I've tried something like the following code, but can't seem to get it to
work.

$mainwindow = Win32::GUI::Window - new (
  -name = Mainwindow,
  -text = Main Window,
  -width  = 100,
  -height = 100,
);

.

my $flash = new Win32::API('user32','FlashWindow',['N','N'],'N');
my $ret = $flash - Call($mainwindow, 1);

Thanks.

Len.






Re: [perl-win32-gui-users] I'm here

2003-11-17 Thread Glenn Linderman

Hi Aldo,

Glad to hear from you again.  I would like CVS commit access on 
SourceForge, user name  guruglenn  although I may not be able to use it 
until next year (but that's only a couple months away).  Thank you.


I'm glad to hear you are working on NEM, as I think it is a friendlier 
model overall.  Unfortunately, due to timing, I must proceed with my 
current project using the old event model + bug fixes.


Regarding bugfixes, it would be nice to have them available on the 
current code base, but at this point, with many non-working features in 
your current development code base, it seems like simply releasing it 
wouldn't be practical.


Although I haven't yet figured out SourceForge's CVS implementation, I 
know the general capabilities of a source code control system, having 
worked with SCCS, RCS, and ClearCase.  And I think CVS is built on top 
of SCCS or RCS, so has the same capabilities, just packages them nicer? 
 At least, I think that is how it started... Anyway, perhaps it would 
be nice to have two branches... a development branch and a bugfix branch.


Perhaps you could continue on the NEM on the development branch, and let 
other people work on the bugfix branch, fixing bugs, and perhaps doing 
minor enhancements.


If this sounds good to you, perhaps someone (I'd volunteer starting in 
Jan, but if there are other volunteers that's OK) could be the 
designated pumpking for the bugfix branch.




On approximately 11/17/2003 2:47 AM, came the following characters from
the keyboard of Aldo Calpini:

hello Win32::GUI people

I'm here, I'm here! I'm very, very sorry for my latitance. I know I
have promised a lot of things, a lot of times, and never respected
what I said. please accept my excuse for this.

and I'm very, very happy to see things moving and people willing to
help. as it is clear at this point, I'm not in the position to continue
developing Win32::GUI all alone. but I'm not going to give up the project.
if there is something useful for the community I can do acting as a
coordinator (sort of pumpking, in Perl terms), I'll be very happy to
coordinate. if someone feels like taking over the whole stuff, I'll be
very happy to be just a member of a team of developers.

my current development version of Win32::GUI has many bugfixes, but the
internals are being heavily reworked (to support NEM more natively)
and there are many non-working features. as an open question to anyone
interested, I ask: do you think it is better to keep the rewrite off
for a while and work on bugfixing the current release, or do you
prefer working with me on the new internals?

I can give all the tech help (eg. about XS and about how Win32::GUI works)
to people who want to be part of the dev team. there's a mailing list
(perl-win32-gui-hackers) that I set up just for this task.

so, if you want CVS commit access on SourceForge, just give me your
SourceForge user name and I will set it up. the -hackers mailing list
can also be used to ask questions about how SourceForge and/or CVS
works.

regarding the documentation, I appreciate what Erick did, but I found
it a little difficult to work with. I think a wiki (with CGI::Kwiki,
for example) would be a better start. we could also write in POD so
that the documentation could be more easily integrated in the CPAN
distribution.

I'm still backlogging all the messages on the list, so I will have
more to elaborate on later. for now, please accept my most sincere and
humble apologies for being such a non-existant person for so much
time :-(


cheers,
Aldo

__END__
$_=q,just perl,,s, , another ,,s,$, hacker,,print;



---
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] How to Flash a Window?

2003-11-17 Thread leonard . jacobsen
That worked great.  Thank you very much.

Len.




   
  Laurent ROCHER  
   
  [EMAIL PROTECTED]To:   
perl-win32-gui-users@lists.sourceforge.net
  ernet.frcc:   [EMAIL PROTECTED]  
 
   Subject:  Re: 
[perl-win32-gui-users] How to Flash a Window? 
  11/17/2003 11:53  
   
  AM
   
  Please respond to 
   
  Laurent ROCHER  
   

   

   




Hi,

Try with Window handle :
my $ret = $flash - Call($mainwindow-{-handle}, 1);

Laurent.

 Does anyone know how I could go about making my main window flash when a
 certain event has occured?

 I've tried something like the following code, but can't seem to get it to
 work.

 $mainwindow = Win32::GUI::Window - new (
   -name = Mainwindow,
   -text = Main Window,
   -width  = 100,
   -height = 100,
 );

 ..

 my $flash = new Win32::API('user32','FlashWindow',['N','N'],'N');
 my $ret = $flash - Call($mainwindow, 1);

 Thanks.

 Len.











Re: [perl-win32-gui-users] I'm here

2003-11-17 Thread Laurent ROCHER
Hi Aldo,

Happy to read you again.

Last week, i have proposed to use SourceForge CVS for start a bug fix branch
on 665 release.

I have play a little with CVS, and i think i can setup CVS like this.

1) Tag current CVS source code as Win32-GUI-0_0_622.
   I have notice a problem with text files. Each line end with CRCRLF.
   I found this in TortoiseCVS FAQ :
http://www.tortoisecvs.org/faq.html#sharelinux
   I have fix this in my home repository, so i can correct it before.
2) Upload 665 code and tag it as Win32-GUI-0_0_665
3) Make a Win32-GUI-0_0_665-Fix branch and use this branch for fix bug.
   So, we can continue to use main branch for new version.

If you are agree, i can do the job and start to work on 665 fix branch.
I probably take a look on next release too ;)

Kwiki it's a good idea. It's very easy to install/customize/use.
Why not use SourceForge Web Space (i read somewhere it's possible to use
perl cgi).

Laurent.



 Glad to hear from you again.  I would like CVS commit access on
 SourceForge, user name  guruglenn  although I may not be able to use it
 until next year (but that's only a couple months away).  Thank you.

 I'm glad to hear you are working on NEM, as I think it is a friendlier
 model overall.  Unfortunately, due to timing, I must proceed with my
 current project using the old event model + bug fixes.

 Regarding bugfixes, it would be nice to have them available on the
 current code base, but at this point, with many non-working features in
 your current development code base, it seems like simply releasing it
 wouldn't be practical.

 Although I haven't yet figured out SourceForge's CVS implementation, I
 know the general capabilities of a source code control system, having
 worked with SCCS, RCS, and ClearCase.  And I think CVS is built on top
 of SCCS or RCS, so has the same capabilities, just packages them nicer?
   At least, I think that is how it started... Anyway, perhaps it would
 be nice to have two branches... a development branch and a bugfix branch.

 Perhaps you could continue on the NEM on the development branch, and let
 other people work on the bugfix branch, fixing bugs, and perhaps doing
 minor enhancements.

 If this sounds good to you, perhaps someone (I'd volunteer starting in
 Jan, but if there are other volunteers that's OK) could be the
 designated pumpking for the bugfix branch.

 On approximately 11/17/2003 2:47 AM, came the following characters from
 the keyboard of Aldo Calpini:
  hello Win32::GUI people
 
  I'm here, I'm here! I'm very, very sorry for my latitance. I know I
  have promised a lot of things, a lot of times, and never respected
  what I said. please accept my excuse for this.
 
  and I'm very, very happy to see things moving and people willing to
  help. as it is clear at this point, I'm not in the position to continue
  developing Win32::GUI all alone. but I'm not going to give up the
project.
  if there is something useful for the community I can do acting as a
  coordinator (sort of pumpking, in Perl terms), I'll be very happy to
  coordinate. if someone feels like taking over the whole stuff, I'll be
  very happy to be just a member of a team of developers.
 
  my current development version of Win32::GUI has many bugfixes, but the
  internals are being heavily reworked (to support NEM more natively)
  and there are many non-working features. as an open question to anyone
  interested, I ask: do you think it is better to keep the rewrite off
  for a while and work on bugfixing the current release, or do you
  prefer working with me on the new internals?
 
  I can give all the tech help (eg. about XS and about how Win32::GUI
works)
  to people who want to be part of the dev team. there's a mailing list
  (perl-win32-gui-hackers) that I set up just for this task.
 
  so, if you want CVS commit access on SourceForge, just give me your
  SourceForge user name and I will set it up. the -hackers mailing list
  can also be used to ask questions about how SourceForge and/or CVS
  works.
 
  regarding the documentation, I appreciate what Erick did, but I found
  it a little difficult to work with. I think a wiki (with CGI::Kwiki,
  for example) would be a better start. we could also write in POD so
  that the documentation could be more easily integrated in the CPAN
  distribution.
 
  I'm still backlogging all the messages on the list, so I will have
  more to elaborate on later. for now, please accept my most sincere and
  humble apologies for being such a non-existant person for so much
  time :-(
 
 
  cheers,
  Aldo
 
  __END__
  $_=q,just perl,,s, , another ,,s,$, hacker,,print;