[perl-win32-gui-users] Memory leak (not really a leak at all)

2001-01-07 Thread Sam
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi,

I found many references to the 'memory leak' in the archived 
messages at http://www.mail-archive.com/perl-win32-
[EMAIL PROTECTED]/.

I believe there isn't a memory leak at all, it appears that the 
memory usage reported by windows task manager includes a 
portion of a windows cache allocated to the program, and that it's 
the cache usage that changes, not the amount of memory that the 
perl interpreter has allocated.
This is based on these observations:
1)  As the memory usage reported by the task manager increases 
the total memory usage does not increase. If you run a compiler or 
something that will allocate memory a bit at a time for a long period 
of time you'll notice that as the compiler's memory usage goes up, 
and so does the total memory usage.
2)  If you minimize the perl-win32-gui app's window the reported 
memory usage goes down to a base value (120K with my perl), and 
every time you minimize the window it goes down to the same 
value. This is _not_ indicative of a memory leak.
3)  If you play with other applications in a similar way you can 
make them exhibit similar behaviour. The reported memory usage 
on other applications (my test was EditPlus) doesn't increase to 
the same extent, but it does increase (more on this difference later).

During the above I looked over the code involved, and attempted to 
isolate a memory leak. So far as I can tell the code is rock solid.


I believe that the difference between a perl-win32-gui application, 
and other pure win32 applications is in the DefWindowProc 
handling. The perl-win32-gui module does call DefWindowProc 
when either you don't have a handler installed, or you return 1, 
however through BoundsChecker I believe that this may not always 
be the case.

I would be interested if someone finds anything else out about this 
problem. Unfortunately I can't spend any more time on this, as it 
appears to me that this isn't a serious bug, at least not something 
that will stop a program from working correctly.



-BEGIN PGP SIGNATURE-
Version: N/A

iQA/AwUBOliL8ZsRND2Z+TaWEQJGwgCeMkadt3YnnIh+sC3In8ZbMObH3WkAoPLK
qIBjQIZHm48LYi6tlAehlC+G
=u9/m
-END PGP SIGNATURE-

Sam Jacobson
R & D Manager / Software Engineer
Selective Communications
Ph +64 9 302 1142
www.selective.co.nz



Re: [perl-win32-gui-users] Memory leak (not really a leak at all)

2001-01-09 Thread Sam
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

> Sam wrote:
> > Hi,
> >
> > I found many references to the 'memory leak' in the archived 
> > messages at http://www.mail-archive.com/perl-win32-
> > [EMAIL PROTECTED]/.
> 
> > I believe there isn't a memory leak at all, it appears that the 
> > memory usage reported by windows task manager includes a 
> > portion of a windows cache allocated to the program, and that it's 
> > the cache usage that changes, not the amount of memory that the 
> > perl interpreter has allocated.
> 
> oh well, I'm really confused now :-)
> 
> > This is based on these observations:
> > 1)  As the memory usage reported by the task manager increases 
> > the total memory usage does not increase. If you run a compiler or 
> > something that will allocate memory a bit at a time for a long period 
> > of time you'll notice that as the compiler's memory usage goes up, 
> > and so does the total memory usage.
> 
> yes, this is true.
> 
> > 2)  If you minimize the perl-win32-gui app's window the reported 
> > memory usage goes down to a base value (120K with my perl), and 
> > every time you minimize the window it goes down to the same 
> > value. This is _not_ indicative of a memory leak.
> 
> this is true too.
> 
> > 3)  If you play with other applications in a similar way you
> > can make them exhibit similar behaviour. The reported memory usage
> > on other applications (my test was EditPlus) doesn't increase to 
> > the same extent, but it does increase (more on this difference later).
> 
> and this is true, but there are other applications (for example,
> the NT Task Manager) which does not exhibit this behaviour, even
> if they're left running for a large amount of time. and the Task
> Manager updates its contect each second, so is doing something.
> but its cache memory never grows up. damn :-(
> 
> > During the above I looked over the code involved, and attempted
> > to isolate a memory leak. So far as I can tell the code is rock
> > solid.
> 
> way cool ;-)
> 
> > I believe that the difference between a perl-win32-gui application, 
> > and other pure win32 applications is in the DefWindowProc 
> > handling. The perl-win32-gui module does call DefWindowProc 
> > when either you don't have a handler installed, or you return 1, 
> > however through BoundsChecker I believe that this may not always 
> > be the case.
> 
> I'm really interested in this: can you elaborate more on this
> point? do I call DefWindowProc too much, or it is not called
> when it should be?
I saw a few messages come in that weren't DefWindowProc'd, but I 
think that may have been my fault (ie returned 0 from handler).
Looking at your code it looks like DefWindowProc is called when it 
should be, but there's obviously a problem somewhere. This was a 
bit of a stab in the dark (much like the assumption about the cache 
allocation, but what other answer is there?). My next move will be 
to attempt to recreate this bug in a pure win32 app.

> > I would be interested if someone finds anything else out about
> > this problem. Unfortunately I can't spend any more time on this,
> > as it appears to me that this isn't a serious bug, at least not
> > something that will stop a program from working correctly.
> 
> well, a 4k increment for each mouse movement is quite too much,
> so something should be corrected (if it's not totally wrong, it's
> surely at least poorly coded :-)
I agree, now. There was a posting recently that reported that a perl 
gui app would crash after all available memory was consumed, so I 
will devote some of my time to fixing this problem.

I'll report when I know more.

> cheers,
> Aldo
> 
> __END__
> $_=q,just perl,,s, , another ,,s,$, hacker,,print;
> 
> 
> 
> ___
> Perl-Win32-GUI-Users mailing list
> Perl-Win32-GUI-Users@lists.sourceforge.net
> http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
> 



-BEGIN PGP SIGNATURE-
Version: N/A

iQA/AwUBOlruq5sRND2Z+TaWEQKsowCg8YtbBZKJN7ZbK2kfuPN1ayTqKKQAoIfp
3dsqAbirf2z5dM0oe0iY+MLv
=cIST
-END PGP SIGNATURE-

Sam Jacobson
R & D Manager / Software Engineer
Selective Communications
Ph +64 9 302 1142
www.selective.co.nz



[perl-win32-gui-users] The memory leak problem (fixed, I hope ;)

2001-01-09 Thread Sam
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

I said I'd report when I know more, so here goes...

The problem isn't with DefWindowProc at all (in fact 
DefWindowProc doesn't do anything except default handling - 
duh!). My apologies for being misleading.

The memory usage in the task manager thingee is useful, but 
inherently misleading. It isn't a cache allocation thing or anything 
like that, again sorry for being misleading.

The problem is with the C-perl interface. The WindowMsgLoop 
needs a good perl start, and end block:
dSP;
ENTER;
SAVETMPS;



FREETMPS;
LEAVE;

This is because it calls into the perl interpreter. The Dialog XSUB 
doesn't need those blocks explicitly however because they are 
added by xsubpp. However because the Dialog XSUB pretty much 
never exits (and therefore calls FREETMPS) it accumulates TMPs. 
There are (I believe) two ways to fix this:
1/ make the dialog XSUB return after processing one message, 
and call it from perl like
while( Win32::GUI::Dialog() ) {
}
2/ give the Dialog XSUB an explicit block around the perl interpreter 
calls it makes. I believe that this will work fine, but I haven't tested 
it. I implemented (1) in my copy of win32::GUI.

NB:
It may be necessary to add blocks in other places (in fact I'm sure 
of it), but this is the only problem I am aware of.
I can't create and distribute a patch on work time, but in my own 
time (of which I have very little unfortunately) I will create a patch for 
0.0.502, and send this to Aldo, if he so desires.


-BEGIN PGP SIGNATURE-
Version: N/A

iQA/AwUBOlsd7ZsRND2Z+TaWEQLI4ACfT9k/+/Lm84a6GAhfnF8sa91kBGEAoIXP
QULIwerislw19RYsRAihlTY+
=5seU
-END PGP SIGNATURE-

Sam Jacobson
R & D Manager / Software Engineer
Selective Communications
Ph +64 9 302 1142
www.selective.co.nz



Re: [perl-win32-gui-users] The memory leak problem (fixed, I hope ;)

2001-01-10 Thread Sam
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

> Sam wrote:
> > I said I'd report when I know more, so here goes...
> >
> > The problem isn't with DefWindowProc at all (in fact 
> > DefWindowProc doesn't do anything except default handling - 
> > duh!). My apologies for being misleading.
> 
> no problem. even checking the obvious is helpful in such
> cases :-)
> 
> > The memory usage in the task manager thingee is useful, but 
> > inherently misleading. It isn't a cache allocation thing or
> > anything like that, again sorry for being misleading.
> >
> > The problem is with the C-perl interface. The WindowMsgLoop
> > needs a good perl start, and end block:
> > dSP;
> > ENTER;
> > SAVETMPS;
> >
> > 
> >
> > FREETMPS;
> > LEAVE;
> 
> unfortunately not. WindowMsgLoop, itself, does not actually
> call the Perl interpreter: the various DoEvent_* functions
> performs the needed calls, and they all have (SAVE|FREE)TMPS
> blocks. I tried, just to give it a try, to make the changes
> you suggested to WindowMsgLoop, but nothing changes.
> 
> > This is because it calls into the perl interpreter. The Dialog
> > XSUB doesn't need those blocks explicitly however because they
> > are added by xsubpp. However because the Dialog XSUB pretty much
> > never exits (and therefore calls FREETMPS) it accumulates TMPs. 
> > There are (I believe) two ways to fix this:
> > 1/ make the dialog XSUB return after processing one message, 
> > and call it from perl like
> > while( Win32::GUI::Dialog() ) {
> > }
> 
> this is a good hint. unfortunately, it is not a solution.
> there is already a one-go Dialog XSUB, which is called
> DoEvents. I tried replacing the Dialog() call with this:
> 
> 1 while ( Win32::GUI::DoEvents != -1 );
> 
> and indeed, there is no apparent memory leak!
> 
> BUT, the processor is busy at 100% while the Perl
> program runs: this is because the while loop, even if
> 'void', does consume CPU time. too bad :-(
That's because it uses PeekMessage, which returns immediately 
regardless of whether or not there are any messages waiting.

> BUT, this is a first approach to a possible solution,
> because it seems to isolate the problem in the Dialog()
> XSUB. I'll try to debug it and see if I can understand
> something more.
> 
> > 2/ give the Dialog XSUB an explicit block around the perl
> > interpreter calls it makes. I believe that this will work
> > fine, but I haven't tested it. I implemented (1) in my copy
> > of win32::GUI.
> 
> what do you mean by 'interpreter calls' here?
> 
> > NB:
> > It may be necessary to add blocks in other places (in fact
> > I'm sure of it), but this is the only problem I am aware of.
> > I can't create and distribute a patch on work time, but in my own
> > time (of which I have very little unfortunately) I will create
> > a patch for 0.0.502, and send this to Aldo, if he so desires.
> 
> please do so if you can :-)
> 
> 
> cheers,
> Aldo
> 
> __END__
> $_=q,just perl,,s, , another ,,s,$, hacker,,print;
> 
> 
> 
> ___
> Perl-Win32-GUI-Users mailing list
> Perl-Win32-GUI-Users@lists.sourceforge.net
> http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
> 



-BEGIN PGP SIGNATURE-
Version: N/A

iQA/AwUBOlwquJsRND2Z+TaWEQJEPwCeLjIAiDb1DHzs8woIpcIpaV7u3JEAnR4G
38Dh5N9HX44Guqr612WBFf6Y
=mvOy
-END PGP SIGNATURE-

Sam Jacobson
R & D Manager / Software Engineer
Selective Communications
Ph +64 9 302 1142
www.selective.co.nz



[perl-win32-gui-users] possible problem with GetOpenFilename

2001-01-10 Thread Sam
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

can anyone out there recreate this:

from perl call
my $filename = Win32::GUI::GetOpenFileName(
-filter => [
"File type 1" => "*.ft1",
"File type 2" => "*.ft2",
],
);

now call this twice. The first time it works wonderfully, the second 
time it causes my program to exit, and this is displayed:
Out of memory!
Callback called exit.
(I believe the message is from the perl interpreter rather than win32-
gui).

I'd be interested to hear if anyone is using this function with 
success (multiple times), as it may be a problem purely with my 
build of win32-gui (0.0502) or perl (5.60).

It doesn't seem to happen unless you specify a filter. All the other 
options work perfectly.


-BEGIN PGP SIGNATURE-
Version: N/A

iQA/AwUBOlyPOZsRND2Z+TaWEQIaMACglCnO6IUWinq3Edjli6FiNt1RtfIAn15U
CFa6ZCfkum4t9xQ8cVoqE5Be
=mQaa
-END PGP SIGNATURE-

Sam Jacobson
R & D Manager / Software Engineer
Selective Communications
Ph +64 9 302 1142
www.selective.co.nz



Re: [perl-win32-gui-users] possible problem with GetOpenFilename

2001-01-10 Thread Sam
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Sorry about essentially spamming this newsgroup, but I have a fix 
for the following problem (if anyone else is ever actually effected by 
it).

in the GetOpenFileName XSUB; change to following code:
int i, filterlen;
char *fpointer;
filters = (AV*)SvRV(ST(next_i));
for(i=0; i<=av_len(filters); i++) {
t = av_fetch(filters, i, 0);
if(t != NULL) {
filterlen += SvCUR(*t) + 1;
}
}
to:
int i, filterlen = 0;   /* < must 
initialize this */
char *fpointer;
filters = (AV*)SvRV(ST(next_i));
for(i=0; i<=av_len(filters); i++) {
t = av_fetch(filters, i, 0);
if(t != NULL) {
filterlen += SvCUR(*t) + 1;
}
}

also (and _please_ correct me if I'm wrong) I've changed the 
following code a little, as I disagree with the pointer arithmetic.

filterlen += 2;
filter = (char *) safemalloc(filterlen);
fpointer = filter;
for(i=0; i<=av_len(filters); i++) {
t = av_fetch(filters, i, 0);
if(t != NULL) {
strcpy(fpointer, SvPV_nolen(*t));
fpointer += SvCUR(*t);  
/* no + 1 */
*fpointer++ = 0;/* changed */
}

}
*fpointer = 0;  /* changed */
ofn.lpstrFilter = (LPCTSTR) filter;

hope this helps someone. If not then sorry for the needless traffic.

> can anyone out there recreate this:
> 
> from perl call
> my $filename = Win32::GUI::GetOpenFileName(
>   -filter => [
>   "File type 1" => "*.ft1",
>   "File type 2" => "*.ft2",
>   ],
> );
> 
> now call this twice. The first time it works wonderfully, the second 
> time it causes my program to exit, and this is displayed:
> Out of memory!
> Callback called exit.
> (I believe the message is from the perl interpreter rather than win32-
> gui).
> 
> I'd be interested to hear if anyone is using this function with 
> success (multiple times), as it may be a problem purely with my 
> build of win32-gui (0.0502) or perl (5.60).
> 
> It doesn't seem to happen unless you specify a filter. All the other 
> options work perfectly.
> 
> Sam Jacobson
> R & D Manager / Software Engineer
> Selective Communications
> Ph +64 9 302 1142
> www.selective.co.nz
> 
> ___
> Perl-Win32-GUI-Users mailing list
> Perl-Win32-GUI-Users@lists.sourceforge.net
> http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
> 
> 



-BEGIN PGP SIGNATURE-
Version: N/A

iQA/AwUBOlyUuZsRND2Z+TaWEQJORACfVCEfJBH6Ca1zEb6snziJsxUzetUAoN8+
PHUzaUdISWfzkjz3Z7b507iX
=BxIX
-END PGP SIGNATURE-

Sam Jacobson
R & D Manager / Software Engineer
Selective Communications
Ph +64 9 302 1142
www.selective.co.nz



Re: [perl-win32-gui-users] possible problem with GetOpenFilename

2001-01-10 Thread Sam
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

> I had this problem before - I found a possible solution in the old archives 
> (at http-tech), but it involved recompiling  (if I recall correctly, the 
> variable filterlen was not given a default value of 0, so when you specify a 
> filter, the program tries to increment something that hasn't been set yet).  
> Since I can't recompile, I shelved the program I was working on until a 
> fixed version came out.  I was using the last version, but I guess it's not 
> working with 0.0502 yet, either.
thank you.
(pity I didn't see this a few minutes ago).

> >can anyone out there recreate this:
> >
> >from perl call
> >my $filename = Win32::GUI::GetOpenFileName(
> > -filter => [
> > "File type 1" => "*.ft1",
> > "File type 2" => "*.ft2",
> > ],
> >);
> >
> >now call this twice. The first time it works wonderfully, the second
> >time it causes my program to exit, and this is displayed:
> >Out of memory!
> >Callback called exit.
> >(I believe the message is from the perl interpreter rather than win32-
> >gui).
> >
> >I'd be interested to hear if anyone is using this function with
> >success (multiple times), as it may be a problem purely with my
> >build of win32-gui (0.0502) or perl (5.60).
> >
> >It doesn't seem to happen unless you specify a filter. All the other
> >options work perfectly.
> _
> Get your FREE download of MSN Explorer at http://explorer.msn.com
> 
> 
> ___
> Perl-Win32-GUI-Users mailing list
> Perl-Win32-GUI-Users@lists.sourceforge.net
> http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
> 



-BEGIN PGP SIGNATURE-
Version: N/A

iQA/AwUBOlyVD5sRND2Z+TaWEQKUhwCfTzqkuL+VU54ClRf64F3rq6FTRsQAoJvu
bUAL+pbhg9JJhHG4VMbu4X4j
=AwPo
-END PGP SIGNATURE-

Sam Jacobson
R & D Manager / Software Engineer
Selective Communications
Ph +64 9 302 1142
www.selective.co.nz



Re: [perl-win32-gui-users] possible problem with GetOpenFilename

2001-01-10 Thread Sam
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

same goes for GetSaveFileName.

NB:
also if you're a pedant (like me) then you can change
filterlen += 2, to filterlen++ (so long as you change the pointer 
stuff), and save a _whole_ byte of memory (for about 15 seconds).

> Sorry about essentially spamming this newsgroup, but I have a fix 
> for the following problem (if anyone else is ever actually effected by 
> it).
> 
> in the GetOpenFileName XSUB; change to following code:
> int i, filterlen;
> char *fpointer;
> filters = (AV*)SvRV(ST(next_i));
> for(i=0; i<=av_len(filters); i++) {
> t = av_fetch(filters, i, 0);
> if(t != NULL) {
> filterlen += SvCUR(*t) + 1;
> }
> }
> to:
> int i, filterlen = 0; /* < must 
> initialize this */
> char *fpointer;
> filters = (AV*)SvRV(ST(next_i));
> for(i=0; i<=av_len(filters); i++) {
> t = av_fetch(filters, i, 0);
> if(t != NULL) {
> filterlen += SvCUR(*t) + 1;
> }
> }
> 
> also (and _please_ correct me if I'm wrong) I've changed the 
> following code a little, as I disagree with the pointer arithmetic.
> 
> filterlen += 2;
> filter = (char *) safemalloc(filterlen);
> fpointer = filter;
> for(i=0; i<=av_len(filters); i++) {
> t = av_fetch(filters, i, 0);
> if(t != NULL) {
> strcpy(fpointer, SvPV_nolen(*t));
> fpointer += SvCUR(*t);
> /* no + 1 */
> *fpointer++ = 0;  /* changed */
> }
> 
> }
> *fpointer = 0;/* changed */
> ofn.lpstrFilter = (LPCTSTR) filter;
> 
> hope this helps someone. If not then sorry for the needless traffic.
> 
> > can anyone out there recreate this:
> > 
> > from perl call
> > my $filename = Win32::GUI::GetOpenFileName(
> > -filter => [
> > "File type 1" => "*.ft1",
> > "File type 2" => "*.ft2",
> > ],
> > );
> > 
> > now call this twice. The first time it works wonderfully, the second 
> > time it causes my program to exit, and this is displayed:
> > Out of memory!
> > Callback called exit.
> > (I believe the message is from the perl interpreter rather than win32-
> > gui).
> > 
> > I'd be interested to hear if anyone is using this function with 
> > success (multiple times), as it may be a problem purely with my 
> > build of win32-gui (0.0502) or perl (5.60).
> > 
> > It doesn't seem to happen unless you specify a filter. All the other 
> > options work perfectly.
> > 
> > Sam Jacobson
> > R & D Manager / Software Engineer
> > Selective Communications
> > Ph +64 9 302 1142
> > www.selective.co.nz
> > 
> > ___
> > Perl-Win32-GUI-Users mailing list
> > Perl-Win32-GUI-Users@lists.sourceforge.net
> > http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
> > 
> >
> 
> Sam Jacobson
> R & D Manager / Software Engineer
> Selective Communications
> Ph +64 9 302 1142
> www.selective.co.nz
> 
> ___
> Perl-Win32-GUI-Users mailing list
> Perl-Win32-GUI-Users@lists.sourceforge.net
> http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
> 
> 



-BEGIN PGP SIGNATURE-
Version: N/A

iQA/AwUBOlyX45sRND2Z+TaWEQIEAACcCwaE+SlILJnPMgDI6oX99+27yg0An1ig
Y4DrESrVnnx4uF4kHJ3oRD7r
=AdVr
-END PGP SIGNATURE-

Sam Jacobson
R & D Manager / Software Engineer
Selective Communications
Ph +64 9 302 1142
www.selective.co.nz



Re: [perl-win32-gui-users] Timer memory leak

2001-01-17 Thread Sam
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

it's been fixed already. Aldo is putting together a new version. If you 
compiled your version from source, and you want a patch in the 
meantime then mail me direct, and I'll send instructions.

> There seems to be some kind of memory leak in the Timer function.
> Somehow a timer seems to be chewing memory for each cycle, so a timer
> with a short interval uses more memory than one with a longer interval.
> 
> I can recall having read about this before, but I couldn't find anything
> about it in the archives... Is there anything being done to track this
> one down?
> 
>   -Ludde
> 
> ___
> Perl-Win32-GUI-Users mailing list
> Perl-Win32-GUI-Users@lists.sourceforge.net
> http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
> 



-BEGIN PGP SIGNATURE-
Version: N/A

iQA/AwUBOmV3FpsRND2Z+TaWEQKp+gCeLZMn4Tt91lr2RdgHKJUR2a40Oh0AnRZf
RvelsYfiAdrIr21J4xK1IdOh
=NE/h
-END PGP SIGNATURE-

Sam Jacobson
R & D Manager / Software Engineer
Selective Communications
Ph +64 9 302 1142
www.selective.co.nz



Re: [perl-win32-gui-users] Progress Bar

2001-01-22 Thread Sam
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

try running progressbar.pl in the samples directory in the win32 
distribution. if it goes then use that code, owise ask again, and 
state that that sample doesn't go, and what errors you got eg a 
BSOD/critical messagebox etc.

> Was hoping someone could provide a little guidance on using a progress bar. 
> WIN32-GUI-PPM-5.6, ActiveState Perl dist, WinME. Have been unable to get a 
> progress bar to appear at all. All other objects seem to work OK. Any ideas?
> 
> Thanks
> Matt Heffron
> [EMAIL PROTECTED]
> _
> Get your FREE download of MSN Explorer at http://explorer.msn.com
> 
> 
> ___
> Perl-Win32-GUI-Users mailing list
> Perl-Win32-GUI-Users@lists.sourceforge.net
> http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
> 



-BEGIN PGP SIGNATURE-
Version: N/A

iQA/AwUBOmxLuJsRND2Z+TaWEQKsgACg2d3CZVJXrUYTAM0wEWusfy5aMl8AoO93
0GfrhwDjphzcBxIelHKUfjPZ
=mnYv
-END PGP SIGNATURE-

Sam Jacobson
R & D Manager / Software Engineer
Selective Communications
Ph +64 9 302 1142
www.selective.co.nz



Re: [perl-win32-gui-users] Final Code: Click on URL in About Wind ow

2001-01-23 Thread Sam
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

I didn't say anything before (about the html thing) because it really 
didn't matter, but in this case it does.
You don't really want to find file extensions in the registry, you 
want to find service providers. It's an academic point with html, but 
with mail it's critical for correct operation between mail clients.

look at HKCR/http and HKCR/mailto for the two offending keys 
(they should have shell command open thingees if your clients are 
good).

same applies for HKCR/ftp, and gopher wais etc etc etc

> Just to tell you Thomas, emails in Outlook have the ending
> .eml
> 
> > Deviating from Win32-GUI somewhat:
> > Next step is to figure out how to mimik a
> "mailto:"; for the e-mail
> > link. Should be easy, once we figure out how to determine
> what the default
> > e-mail program is. Not sure what assication is set for
> that. .html for the
> > browser is easy, but what about e-mail's? maybe .msg?
> Here's the ftype info
> > for .msg on my NT system, using outlook for e-mail.
> >
> > C:\>assoc .msg
> > ..msg=msgfile
> >
> > C:\>ftype msgfile
> > msgfile="C:\Program Files\Microsoft
> Office\Office\OUTLOOK.EXE" /f "%1"
> >
> 
> 
> 
> ___
> Perl-Win32-GUI-Users mailing list
> Perl-Win32-GUI-Users@lists.sourceforge.net
> http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
> 



-BEGIN PGP SIGNATURE-
Version: N/A

iQA/AwUBOm1IP5sRND2Z+TaWEQLoxgCeOmCRBRcoYC01SRwr4J5EsFmPas0An1ru
hizFZbFtSrQSEh3RUaEkqngP
=WO0q
-END PGP SIGNATURE-

Sam Jacobson
R & D Manager / Software Engineer
Selective Communications
Ph +64 9 302 1142
www.selective.co.nz



Re: [perl-win32-gui-users] Win32-GUI 0.0.558 Installation

2001-01-30 Thread Sam
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

which OS are you running? (ie is it that ugly 9x?)

> Hello,
> 
> I installed Win32-GUI 0.0.502 via PPM successfully but would like to use
> 0.0.558. Running "make" failed with both Borland's and Dev-C++'s
> "make":
> 
> C:\Perl\Win32-GUI-0.0.558>\borland\bcc55\bin\make
> MAKE Version 5.2  Copyright (c) 1987, 2000 Borland
> Fatal makefile 799: No terminator specified for in-line file operator
> 
> C:\Perl\Win32-GUI-0.0.558>\dev-c++\bin\make
> Makefile:303: *** missing separator.  Stop.
> 
> C:\Perl\Win32-GUI-0.0.558>
> 
> Any ideas?
> 
> best regards,
> Thomas
> 
> ___
> Perl-Win32-GUI-Users mailing list
> Perl-Win32-GUI-Users@lists.sourceforge.net
> http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
> 



-BEGIN PGP SIGNATURE-
Version: N/A

iQA/AwUBOnaMJJsRND2Z+TaWEQKzJACgy1y5bVzRelx88Dc//vRNbmC+w3sAoJ6I
TJ9VOPKVFHfcrD2juPn52RTb
=t+Tq
-END PGP SIGNATURE-

Sam Jacobson
R & D Manager / Software Engineer
Selective Communications
Ph +64 9 302 1142
www.selective.co.nz



[perl-win32-gui-users] select all items in ListView

2003-05-16 Thread sam . dela . cruz
Hi,

Is there a way to select all items in a ListView?  I tried doing this 
using this code, but it doesn't work:

sub SelectAll_Click
{
my $count = $MainWin->ListView->Count();
foreach (0..$count)
{
$MainWin->ListView->ItemCheck($_);
    }
}

Regards,
Sam Dela Cruz



Re: [perl-win32-gui-users] select all items in ListView

2003-05-16 Thread sam . dela . cruz
Hi,

I'm sorry let me clarify my question, I mean, how do I check mark all of 
the items in a listview?

Regards,
Sam Dela Cruz


Hi,

Is there a way to select all items in a ListView?  I tried doing this 
using this code, but it doesn't work:

sub SelectAll_Click
{
my $count = $MainWin->ListView->Count();
foreach (0..$count)
{
$MainWin->ListView->ItemCheck($_);
    }
}

Regards,
Sam Dela Cruz




RE: [perl-win32-gui-users] select all items in ListView

2003-05-16 Thread sam . dela . cruz
Darrik,

That worked very well.  Thanks!

Regards,
Sam Dela Cruz



try this:

foreach (0..$count) {
 $MainWin->ListView->ItemCheck($_,1);
}

:)

darrik


>> -Original Message-
>> From: [EMAIL PROTECTED]
>> [mailto:[EMAIL PROTECTED] Behalf Of
>> [EMAIL PROTECTED]
>> Sent: Friday, May 16, 2003 2:46 PM
>> To: perl-win32-gui-users@lists.sourceforge.net
>> Subject: [perl-win32-gui-users] select all items in ListView
>> 
>> 
>> Hi,
>> 
>> Is there a way to select all items in a ListView?  I tried doing this 
>> using this code, but it doesn't work:
>> 
>> sub SelectAll_Click
>> {
>> my $count = $MainWin->ListView->Count();
>> foreach (0..$count)
>> {
>> $MainWin->ListView->ItemCheck($_);
>> }
>> }
>> 
>> Regards,
>> Sam Dela Cruz
>> 
>> 
>> ---
>> Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara
>> The only event dedicated to issues related to Linux enterprise 
solutions
>> www.enterpriselinuxforum.com





[perl-win32-gui-users] ListView question: What event should I use when checking an item on a list?

2003-05-16 Thread sam . dela . cruz
Hi All,

Another question.  There are only three events in the documentation for 
ListView:
1.  ColumnClick
2.  ItemClick
3.  KeyDown

So if I want to capture the moment that a user checks on a list item, what 
do I use.  Nothing seems to fit, I tried ItemClick but this only responds 
when you select an item, not when you check an item.

Please help.  Thanks.

Regards,
Sam Dela Cruz



RE: [perl-win32-gui-users] ListView question: What event should I use when checking an item on a list?

2003-05-23 Thread sam . dela . cruz
I tried _ItemCheck, this worked like a charm!

Regards,
Sam Dela Cruz










"Stuart Arnold" <[EMAIL PROTECTED]>
Sent by: 
[EMAIL PROTECTED]
05/16/2003 05:49 PM

 
    To: Sam Dela Cruz/SVL/SC/[EMAIL PROTECTED]

cc: 
Subject:RE: [perl-win32-gui-users] ListView question: What 
event should I use when 
checking an item on a list?
Classification: 



I gave up on _ItemClick, Just try the "_Click" like a Listbox does.
You don't get anything as part of your call like ItemClick does, you
just have to inspect the selected item(s).
Besides, you get better control on what's going on.

To inspect, just get SelectedItems, then loop thru them for their
options, eg, -checked.


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Friday, May 16, 2003 7:33 PM
To: perl-win32-gui-users@lists.sourceforge.net
Subject: [perl-win32-gui-users] ListView question: What event should I
use when checking an item on a list?


Hi All,

Another question.  There are only three events in the documentation for 
ListView:
1.  ColumnClick
2.  ItemClick
3.  KeyDown

So if I want to capture the moment that a user checks on a list item,
what 
do I use.  Nothing seems to fit, I tried ItemClick but this only
responds 
when you select an item, not when you check an item.

Please help.  Thanks.

Regards,
Sam Dela Cruz


---
This SF.net email is sponsored by: If flattening out C++ or Java code to
make your application fit in a relational database is painful, 
don't do it! Check out ObjectStore. Now part of Progress Software.
http://www.objectstore.net/sourceforge
___
Perl-Win32-GUI-Users mailing list
Perl-Win32-GUI-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users




---
This SF.net email is sponsored by: If flattening out C++ or Java
code to make your application fit in a relational database is painful, 
don't do it! Check out ObjectStore. Now part of Progress Software.
http://www.objectstore.net/sourceforge
___
Perl-Win32-GUI-Users mailing list
Perl-Win32-GUI-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users






[perl-win32-gui-users] extract icons from shell32.dll and use it in image list

2003-06-18 Thread sam . dela . cruz
Hi Win32 GUI Experts,

This is in connection with Alex Lee's postings last year about 
Win32::GUI::DIBitmap.  I tried doing the following, but it doesn't work. 
Was there any solution for this one?

my $A = 0;
my $B = 'shimgvw.dll';
my $apiExecute = new Win32::API("Shell32", "ExtractIcon", 
['P','P','N'],'N');
my $hIcon= $apiExecute->Call($A,$B,1);
use Win32::GUI::DIBitmap;
my $dib = newFromBitmap Win32::GUI::DIBitmap($hIcon) or die "no $!";
$hbitmap = $dib->ConvertToBitmap();
$IL = new GUI::ImageList(16, 16, 24, 3, 10);
$IL->Add("folder.bmp");
$IL->Add($hbitmap);

There is this small utility that I'm gonna send to my users network wide, 
but I don't want to send it together with a bunch of bmp files.  So, I 
wanted to use the Windows icon stock in Shell32.dll to dynamically create 
the images.  Is there any other way of doing this?  Or perhaps, it is 
possible to include the bmp files in the executables using PDK4, PerlApp 
utility?


Thanks and Regards,
Sam Dela Cruz




Re: [perl-win32-gui-users] extract icons from shell32.dll and use it in image list

2003-06-18 Thread sam . dela . cruz
Win32::GUI::BitmapInline worked really well.  Thanks!

Regards,
Sam Dela Cruz


You could try Win32::GUI::BitmapInline, from the docs:

This module can be used to "inline" a bitmap file in your script, so
that it doesn't need to be accompained by several external files
(less hassle when you need to redistribute your script or move it
to another location).

cheers,

jez.
>From: [EMAIL PROTECTED]
>To: perl-win32-gui-users@lists.sourceforge.net
>Subject: [perl-win32-gui-users] extract icons from shell32.dll and use it 

>in image list
>Date: Wed, 18 Jun 2003 10:44:51 -0700
>
>Hi Win32 GUI Experts,
>
>This is in connection with Alex Lee's postings last year about
>Win32::GUI::DIBitmap.  I tried doing the following, but it doesn't work.
>Was there any solution for this one?
>
>my $A = 0;
>my $B = 'shimgvw.dll';
>my $apiExecute = new Win32::API("Shell32", "ExtractIcon",
>['P','P','N'],'N');
>my $hIcon= $apiExecute->Call($A,$B,1);
>use Win32::GUI::DIBitmap;
>my $dib = newFromBitmap Win32::GUI::DIBitmap($hIcon) or die "no $!";
>$hbitmap = $dib->ConvertToBitmap();
>$IL = new GUI::ImageList(16, 16, 24, 3, 10);
>$IL->Add("folder.bmp");
>$IL->Add($hbitmap);
>
>There is this small utility that I'm gonna send to my users network wide,
>but I don't want to send it together with a bunch of bmp files.  So, I
>wanted to use the Windows icon stock in Shell32.dll to dynamically create
>the images.  Is there any other way of doing this?  Or perhaps, it is
>possible to include the bmp files in the executables using PDK4, PerlApp
>utility?
>
>
>Thanks and Regards,
>Sam Dela Cruz



[perl-win32-gui-users] Is there an Event that I can use when a checkbox is checked on a Treeview Node

2003-07-17 Thread sam . dela . cruz
Hi GUI Experts,

Is there an Event that I can use when a checkbox is checked on a Treeview 
Node?  The GUI I'm creating has a treeview on the left and a listview on 
the right, much similar to Windows Explorer.  Any node on the left has a 
corresponding list on the right.  If I put a check mark on a node, I would 
like to check everything that is displayed on the listview on the right. 
Is there a way that I can capture that event?  Thanks.

Regards,
Sam Dela Cruz



RE: [perl-win32-gui-users] How do you deselect all currently sele cted items from a listview?

2003-07-23 Thread sam . dela . cruz
Here are two subs I have, Select All and Deselect All

#=
sub SelectAll_Click
#=
{
my $count = $MainWin->ListView->Count();
foreach my $item (0..$count)
{
$MainWin->ListView->ItemCheck($item,1);
}
}

#=
sub ClearSelections_Click
#=
{
my $count = $MainWin->ListView->Count();
foreach my $item (0..$count)
{
$MainWin->ListView->ItemCheck($item,0);
}
}

Regards,
Sam Dela Cruz



I believe this will actually "clear" the listview... I just want to 
"deselect" any "selected/highlighted" items.
-Original Message-
From: Jonathan Southwick [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 23, 2003 12:01 PM
To: [EMAIL PROTECTED] Sourceforge. Net (E-mail)
Subject: Re: [perl-win32-gui-users] How do you deselect all currently selected 
items from a listview?


Here is how I do it in one of my programs:

  $MainWindow->Recipients->Clear();

Where Recipients is the name of my listbox.

Jonathan

Jonathan Southwick
[EMAIL PROTECTED]
Technical & Network Services
Allegheny College
Meadville, PA 16335
(814) 332-2755


At 7/22/2003  09:44 AM, Magnone, Angelo wrote:

How do you deselect all currently selected items from a listview? 




This e-mail may be privileged and/or confidential, and the sender does not 
waive any related rights and obligations. Any distribution, use or copying 
of this e-mail or the information it contains by other than an intended 
recipient is unauthorized. If you received this e-mail in error, please 
advise me (by return e-mail or otherwise) immediately. 

Ce courrier électronique est confidentiel et protégé. L'expéditeur ne 
renonce pas aux droits et obligations qui s'y rapportent. Toute diffusion, 
utilisation ou copie de ce message ou des renseignements qu'il contient 
par une personne autre que le (les) destinataire(s) désigné(s) est 
interdite. Si vous recevez ce courrier électronique par erreur, veuillez 
m'en aviser immédiatement, par retour de courrier électronique ou par un 
autre moyen.

===

This e-mail may be privileged and/or confidential, and the sender does not 
waive any related rights and obligations. Any distribution, use or copying 
of this e-mail or the information it contains by other than an intended 
recipient is unauthorized. If you received this e-mail in error, please 
advise me (by return e-mail or otherwise) immediately. 

Ce courrier électronique est confidentiel et protégé. L'expéditeur ne 
renonce pas aux droits et obligations qui s'y rapportent. Toute diffusion, 
utilisation ou copie de ce message ou des renseignements qu'il contient 
par une personne autre que le (les) destinataire(s) désigné(s) est 
interdite. Si vous recevez ce courrier électronique par erreur, veuillez 
m'en aviser immédiatement, par retour de courrier électronique ou par un 
autre moyen.

 





Re: [perl-win32-gui-users] XP "Look and Feel" - Success.

2004-02-18 Thread sam . dela . cruz
Hi,

This looks great.  Thanks.  I was trying to create an executable using 
Activestate PDK-perlapp, how  do I include this file?

Regards,
Sam Dela Cruz










"Jez White" <[EMAIL PROTECTED]>
Sent by: 
[EMAIL PROTECTED]
02/04/04 05:17 AM

 
To: "Robert Thorpe" <[EMAIL PROTECTED]>

cc: (bcc: Sam Dela Cruz/SVL/SC/PHILIPS)
Subject:Re: [perl-win32-gui-users] XP "Look and Feel" - Success.
Classification: 



The only control that has problems (that I could find) with XP styles is 
the
tab strip. The tab strip only has minor issues - other dev platforms have
the same issues, so it's not specific to Win32::GUI.

To get XP styles working direct with Perl you can save the attachment
(perl.exe.manifest) in the same directory as perl.exe. You don't need to 
do
anything else.

Cheers,

jez.



wperl.exe.manifest
Description: Binary data


Re: [perl-win32-gui-users] XP "Look and Feel" - Success.

2004-02-18 Thread sam . dela . cruz
Hi Jez,

Did choice No. 1.   I placed the manifest file in the same directory as 
the resulting exe.  Negative results.
I tried to use ResHacker but, I think it's complicated.  Is there a way to 
just include the file when perlapp is used?

Regards,
Sam Dela Cruz











"Jez White" <[EMAIL PROTECTED]>
02/18/2004 09:31 AM

 
To: Sam Dela Cruz/SVL/SC/[EMAIL PROTECTED]
cc: 
<[EMAIL PROTECTED]>
"Robert Thorpe" <[EMAIL PROTECTED]>
Subject:Re: [perl-win32-gui-users] XP "Look and Feel" - Success.
Classification: 



Hi,

You have two choices:

1) Include the manifest in the same directory when you ship your exe.
2) Add the manifest directly to the exe.

The second approach is more "professional", but is more involved. I use
resource hacker to do this.
http://www.users.on.net/johnson/resourcehacker/

Cheers,

jez.

- Original Message - 
From: <[EMAIL PROTECTED]>
To: "Jez White" <[EMAIL PROTECTED]>
Cc: ;
<[EMAIL PROTECTED]>; "Robert Thorpe"
<[EMAIL PROTECTED]>
Sent: Wednesday, February 18, 2004 5:18 PM
Subject: Re: [perl-win32-gui-users] XP "Look and Feel" - Success.


> Hi,
>
> This looks great.  Thanks.  I was trying to create an executable using
> Activestate PDK-perlapp, how  do I include this file?
>
> Regards,
> Sam Dela Cruz
>
>
>
>
>
>
>
>
>
>
> "Jez White" <[EMAIL PROTECTED]>
> Sent by:
> [EMAIL PROTECTED]
> 02/04/04 05:17 AM
>
>
> To: "Robert Thorpe" <[EMAIL PROTECTED]>
> 
> cc: (bcc: Sam Dela Cruz/SVL/SC/PHILIPS)
> Subject:Re: [perl-win32-gui-users] XP "Look and Feel" -
Success.
> Classification:
>
>
>
> The only control that has problems (that I could find) with XP styles is
> the
> tab strip. The tab strip only has minor issues - other dev platforms 
have
> the same issues, so it's not specific to Win32::GUI.
>
> To get XP styles working direct with Perl you can save the attachment
> (perl.exe.manifest) in the same directory as perl.exe. You don't need to
> do
> anything else.
>
> Cheers,
>
> jez.
>
>







Re: [perl-win32-gui-users] XP "Look and Feel" - Success.

2004-02-18 Thread sam . dela . cruz
Got it!  manifest file works now, thanks.  As regards to ResHacker, I 
really would love a tutorial if you have some time.  Thanks.

Regards,
Sam Dela Cruz










"Jez White" <[EMAIL PROTECTED]>
02/18/2004 10:12 AM

 
    To: Sam Dela Cruz/SVL/SC/[EMAIL PROTECTED]
cc: 
<[EMAIL PROTECTED]>
"Robert Thorpe" <[EMAIL PROTECTED]>
Subject:Re: [perl-win32-gui-users] XP "Look and Feel" - Success.
Classification: 



Hi,

When using method 1 you have to match the exe names. So, if your exe is
called "pants.exe", then the manifest has to be called 
"pants.exe.manifest".
I've tried this with several applications, so this should work for 
perlapp.

As for ResHacker - it is quite complicated, you have to create a 'rc' file
which is added to your exe via command line options in ResHacker.

Cheers,

jez.



- Original Message - 
From: <[EMAIL PROTECTED]>
To: "Jez White" <[EMAIL PROTECTED]>
Cc: ;
<[EMAIL PROTECTED]>; "Robert Thorpe"
<[EMAIL PROTECTED]>
Sent: Wednesday, February 18, 2004 5:57 PM
Subject: Re: [perl-win32-gui-users] XP "Look and Feel" - Success.


> Hi Jez,
>
> Did choice No. 1.   I placed the manifest file in the same directory as
> the resulting exe.  Negative results.
> I tried to use ResHacker but, I think it's complicated.  Is there a way 
to
> just include the file when perlapp is used?
>
> Regards,
> Sam Dela Cruz
>
>
>
>
>
>
>
>
>
>
>
> "Jez White" <[EMAIL PROTECTED]>
> 02/18/2004 09:31 AM
>
>
> To: Sam Dela Cruz/SVL/SC/[EMAIL PROTECTED]
> cc: 
> <[EMAIL PROTECTED]>
> "Robert Thorpe" <[EMAIL PROTECTED]>
> Subject:Re: [perl-win32-gui-users] XP "Look and Feel" -
Success.
> Classification:
>
>
>
> Hi,
>
> You have two choices:
>
> 1) Include the manifest in the same directory when you ship your exe.
> 2) Add the manifest directly to the exe.
>
> The second approach is more "professional", but is more involved. I use
> resource hacker to do this.
> http://www.users.on.net/johnson/resourcehacker/
>
> Cheers,
>
> jez.
>
> - Original Message - 
> From: <[EMAIL PROTECTED]>
> To: "Jez White" <[EMAIL PROTECTED]>
> Cc: ;
> <[EMAIL PROTECTED]>; "Robert Thorpe"
> <[EMAIL PROTECTED]>
> Sent: Wednesday, February 18, 2004 5:18 PM
> Subject: Re: [perl-win32-gui-users] XP "Look and Feel" - Success.
>
>
> > Hi,
> >
> > This looks great.  Thanks.  I was trying to create an executable using
> > Activestate PDK-perlapp, how  do I include this file?
> >
> > Regards,
> > Sam Dela Cruz
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > "Jez White" <[EMAIL PROTECTED]>
> > Sent by:
> > [EMAIL PROTECTED]
> > 02/04/04 05:17 AM
> >
> >
> > To: "Robert Thorpe" <[EMAIL PROTECTED]>
> > 
> > cc: (bcc: Sam Dela Cruz/SVL/SC/PHILIPS)
> > Subject:Re: [perl-win32-gui-users] XP "Look and Feel" 
-
> Success.
> > Classification:
> >
> >
> >
> > The only control that has problems (that I could find) with XP styles 
is
> > the
> > tab strip. The tab strip only has minor issues - other dev platforms
> have
> > the same issues, so it's not specific to Win32::GUI.
> >
> > To get XP styles working direct with Perl you can save the attachment
> > (perl.exe.manifest) in the same directory as perl.exe. You don't need 
to
> > do
> > anything else.
> >
> > Cheers,
> >
> > jez.
> >
> >
>
>
>
>







Re: [perl-win32-gui-users] A guide for adding resources (bitmaps, binary objects and XP manifest) to your exe

2004-02-23 Thread sam . dela . cruz
This worked well with perlapp, thanks very much Jez!

Regards,
Sam Dela Cruz










"Jez White" <[EMAIL PROTECTED]>
Sent by: 
[EMAIL PROTECTED]
02/23/04 02:38 AM

 
To: "Win32-GUI" 
cc: (bcc: Sam Dela Cruz/SVL/SC/PHILIPS)
Subject:[perl-win32-gui-users] A guide for adding resources 
(bitmaps, binary 
objects and XP manifest) to your exe
Classification: 



This mini guide will take you through the steps that I go through when I 
add bitmaps, binary objects and an XP manifest to my exe. These steps 
should work with perl2exe and perlapp.
 
I have tried to make these steps as simple as possible, I apologies in 
advance if this approach turns out to be too simplistic:) If you have any 
questions, or comments, please email me.
 
Before you start:
 
To edit/add any resource to an exe you need to use a tool of some sort - 
these steps use Resource Hacker, a freeware utility. 
 
http://www.users.on.net/johnson/resourcehacker/
 
Manually Adding your resources:
 
1) Generate your exe as normal
2) Start Resource Hacker and open your exe.
3) To add any resource, use  Action->Add a new resource from the main 
menu.
For bitmaps, icons and cursors, the resource type will be filled for you. 
Just type the name of the resource and click ok (all names are upper 
case).
For binary objects, the type has to be "RCDATA".
For the XP manifest, the type has to be "24" and the name has to be "1". 
The length of the XML file should be multiple of 4 (just pad with spaces).
4) Save you changes.
 
To retrieve binary objects at runtime use Win32::GUI::LoadResource. 
Bitmaps, Cursors and icons will be retrieved automatically (assuming the 
name matches). You will need to include logic in your application to 
handle the situation where your application is run direct with perl.
 
Automating:
 
Clearly adding resources every time you regenerate your exe would become a 
pain, however you can save your resources to a res file and add them with 
the command line options of reshacker.
 
1) Start Resource Hacker and open your exe which you have added resources
2) Create the res file, use File->Save As, change the type to *.res and 
save the res file as the same name as your exe.
3) Use the following command to add resources to every freshly generated 
exe:
 
reshacker.exe -addoverwrite yourapp.exe,yourapp.exe,yourapp.res,,,
 
(The three comma's in the above command are required).
 
 
 
 
 
 
 
 
 

 
 





[perl-win32-gui-users] problem with Win32::GUI::AxWindow when building exe file with Activestate Perlapp

2004-03-01 Thread sam . dela . cruz
When I build an executable using perlapp on the following code, I get this 
error message:

Can't call method "Navigate" on an undefined value at Axsample.pl line 29.

What's happening?  And what can I do to make it work.  Thanks.

use Win32::GUI;
use Win32::OLE;
use Win32::GUI::AxWindow;
 
 # main Window
 $Window = new Win32::GUI::Window (
 -title=> "Win32::GUI::AxWindow and Win32::OLE",
 -pos => [100, 100],
 -size=> [400, 400],
 -name => "Window",
 ) or die "new Window";
 
 # Create AxWindow
 $Control = new Win32::GUI::AxWindow  (
-parent  => $Window,
-name=> "Control",
-pos => [0, 0],
-size=> [400, 300],
-control => "Shell.Explorer.2",
  ) or die "new Control";
 
 # Get Ole object
 my $html = 'http://www.perl.com";>perl.com';
 $OLEControl = $Control->GetOLE();
 $OLEControl->Navigate("about:blank");  # Clear control
 $OLEControl->{Document}->write($html); # Write Html
 
 # Event loop
 $Window->Show();
 Win32::GUI::Dialog();
 
 # Main window event handler
 sub Window_Terminate {
   # Release all before destroy window
   undef $OLEControl;
   $Control->Release();
   return -1;
 }
 
 sub Window_Resize {
   if (defined $Window) {
 ($width, $height) = ($Window->GetClientRect)[2..3];
 $Control->Resize ($width, $height);
   }
 }

Regards,
Sam Dela Cruz



[perl-win32-gui-users] How do I hide the column heading in ListView?

2004-03-11 Thread sam . dela . cruz
Hi All,

Can I hide the column heading in ListView?  How to do that?

Thanks & Regards,
Sam Dela Cruz