[perl-win32-gui-users] Win32::GUI help-URGENT

2004-01-06 Thread #SHUCHI MITTAL#
Hello there
 
I am computer engg student in Singapore and am currently developing a perl 
application for which I need to develop a small and simple GUI. For this I came 
across this Win32::GUI module and feel its very easy to use. However I'm having 
trouble with it and was hoping someone could help me since posts in forums etc 
havent been much help. I thought mailing here directly would be the best thing 
to do.
Firstly i downloaded the package but when i say ppm install Win32-GUI i get an 
error as follows:
 
Error: No valid repositories; Error 500 Can't connect to ppm.Activestate.com:80 
(connect: Unknown error) at D:/Perl/site/lib/PPM/Repository.pm line 84 Error: 
500 Can't connect to ppm-ia.Activestate.com:80 (connect: Unknown error) at 
D:/Perl/site/lib/PPM/Repository.pm line 84 
 
I feel either there is something wrong with my pre-instaled modules or im doing 
something wrong, but have no idea what it is.
 
Also if i try to run a simple script to make a window with one button or any 
other script that uses this module I get the following error:
 
Can't locate loadable object for module Win32::GUI in @INC (@INC contains 
D:/Perl/lib D:/Perl/site/lib .) at GUI.pl line 1
Compilation failed in require at GUI.pl line 1
BEGIN failed--compilation aborted at GUI.pl line 1

Once again I think i'm not sure why this error is coming. I did copy the GUI.pm 
file in all the directories specified. Please tell me what else I should do. I 
am in a hurry and need to start developing soon which wont take time once this 
problem is solved. I am hoping someone would reply to be as soon as possible.

Any suggestions/help/advise to put me onto track would be much appreciated! 
Thank you for your time. Hoping to hear from you soon

Regards

Shuchi 





Re: [perl-win32-gui-users] Win32::GUI help-URGENT

2004-01-06 Thread Jez White
Hi,

I wouldn't use the Activestate Repository for win::gui - there are later
versions available on the sourceforge site - you will have to manually
install the module:

http://sourceforge.net/projects/perl-win32-gui/

http://sourceforge.net/project/showfiles.php?group_id=16572package_id=12884
for perl 5.6
http://sourceforge.net/project/showfiles.php?group_id=16572package_id=104184
for perl 5.8

If you want to use a repository, have a look at
http://perso.club-internet.fr/rocherl/Win32GUI.html it also contains the
latest versions.

Cheers,

jez.



- Original Message - 
From: #SHUCHI MITTAL# [EMAIL PROTECTED]
To: perl-win32-gui-users@lists.sourceforge.net
Sent: Tuesday, January 06, 2004 1:01 PM
Subject: [perl-win32-gui-users] Win32::GUI help-URGENT


Hello there

I am computer engg student in Singapore and am currently developing a perl
application for which I need to develop a small and simple GUI. For this I
came across this Win32::GUI module and feel its very easy to use. However
I'm having trouble with it and was hoping someone could help me since posts
in forums etc havent been much help. I thought mailing here directly would
be the best thing to do.
Firstly i downloaded the package but when i say ppm install Win32-GUI i get
an error as follows:

Error: No valid repositories; Error 500 Can't connect to
ppm.Activestate.com:80 (connect: Unknown error) at
D:/Perl/site/lib/PPM/Repository.pm line 84 Error: 500 Can't connect to
ppm-ia.Activestate.com:80 (connect: Unknown error) at
D:/Perl/site/lib/PPM/Repository.pm line 84

I feel either there is something wrong with my pre-instaled modules or im
doing something wrong, but have no idea what it is.

Also if i try to run a simple script to make a window with one button or any
other script that uses this module I get the following error:

Can't locate loadable object for module Win32::GUI in @INC (@INC contains
D:/Perl/lib D:/Perl/site/lib .) at GUI.pl line 1
Compilation failed in require at GUI.pl line 1
BEGIN failed--compilation aborted at GUI.pl line 1

Once again I think i'm not sure why this error is coming. I did copy the
GUI.pm file in all the directories specified. Please tell me what else I
should do. I am in a hurry and need to start developing soon which wont take
time once this problem is solved. I am hoping someone would reply to be as
soon as possible.

Any suggestions/help/advise to put me onto track would be much appreciated!
Thank you for your time. Hoping to hear from you soon

Regards

Shuchi




---
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id78alloc_id371op=ick
___
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] Win32::GUI help-URGENT

2004-01-06 Thread #SHUCHI MITTAL#
Hello there
 
I am computer engg student in Singapore and am currently developing a perl 
application for which I need to develop a small and simple GUI. For this I came 
across this Win32::GUI module and feel its very easy to use. However I'm having 
trouble with it and was hoping someone could help me since posts in forums etc 
havent been much help. I thought mailing here directly would be the best thing 
to do.
Firstly i downloaded the package but when i say ppm install Win32-GUI i get an 
error as follows:
 
Error: No valid repositories; Error 500 Can't connect to ppm.Activestate.com:80 
(connect: Unknown error) at D:/Perl/site/lib/PPM/Repository.pm line 84 Error: 
500 Can't connect to ppm-ia.Activestate.com:80 (connect: Unknown error) at 
D:/Perl/site/lib/PPM/Repository.pm line 84 
 
I feel either there is something wrong with my pre-instaled modules or im doing 
something wrong, but have no idea what it is.
 
Also if i try to run a simple script to make a window with one button or any 
other script that uses this module I get the following error:
 
Can't locate loadable object for module Win32::GUI in @INC (@INC contains 
D:/Perl/lib D:/Perl/site/lib .) at GUI.pl line 1
Compilation failed in require at GUI.pl line 1
BEGIN failed--compilation aborted at GUI.pl line 1

Once again I think i'm not sure why this error is coming. I did copy the GUI.pm 
file in all the directories specified. Please tell me what else I should do. I 
am in a hurry and need to start developing soon which wont take time once this 
problem is solved. I am hoping someone would reply to be as soon as possible.

Any suggestions/help/advise to put me onto track would be much appreciated! 
Thank you for your time. Hoping to hear from you soon

Regards

Shuchi 





RE: [perl-win32-gui-users] Win32::GUI help-URGENT

2004-01-06 Thread MJG
Instead of copying, install it with PPM.  Download the ZIP from
Sourceforge for your build of Perl.  I've run into the same thing when
just trying to copy the appropriate files to their locations.  If you
use the one from Active state, it is only build .558.  Sourceforge is
.607 I believe.

It looks like you are behind a Proxy.  Did you read the Perl
distribution docs on how to set up PPM (your environment) for a proxy?

-Original Message-
From: #SHUCHI MITTAL# [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 06, 2004 6:53 AM
To: perl-win32-gui-users@lists.sourceforge.net
Subject: [perl-win32-gui-users] Win32::GUI help-URGENT


Hello there
 
I am computer engg student in Singapore and am currently developing a
perl application for which I need to develop a small and simple GUI. For
this I came across this Win32::GUI module and feel its very easy to use.
However I'm having trouble with it and was hoping someone could help me
since posts in forums etc havent been much help. I thought mailing here
directly would be the best thing to do. Firstly i downloaded the package
but when i say ppm install Win32-GUI i get an error as follows:
 
Error: No valid repositories; Error 500 Can't connect to
ppm.Activestate.com:80 (connect: Unknown error) at
D:/Perl/site/lib/PPM/Repository.pm line 84 Error: 500 Can't connect to
ppm-ia.Activestate.com:80 (connect: Unknown error) at
D:/Perl/site/lib/PPM/Repository.pm line 84 
 
I feel either there is something wrong with my pre-instaled modules or
im doing something wrong, but have no idea what it is.
 
Also if i try to run a simple script to make a window with one button or
any other script that uses this module I get the following error:
 
Can't locate loadable object for module Win32::GUI in @INC (@INC
contains D:/Perl/lib D:/Perl/site/lib .) at GUI.pl line 1 Compilation
failed in require at GUI.pl line 1 BEGIN failed--compilation aborted at
GUI.pl line 1

Once again I think i'm not sure why this error is coming. I did copy the
GUI.pm file in all the directories specified. Please tell me what else I
should do. I am in a hurry and need to start developing soon which wont
take time once this problem is solved. I am hoping someone would reply
to be as soon as possible.

Any suggestions/help/advise to put me onto track would be much
appreciated! Thank you for your time. Hoping to hear from you soon

Regards

Shuchi 




---
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for
IBM's Free Linux Tutorials.  Learn everything from the bash shell to sys
admin. Click now! http://ads.osdn.com/?ad_id78alloc_id371op=ick
___
Perl-Win32-GUI-Users mailing list
Perl-Win32-GUI-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users



RE: [perl-win32-gui-users] New Hook Method

2004-01-06 Thread Glenn W Munroe
Thanks for that, Steve. I'll be looking out for the new implementation.
In the meantime, I've been playing with some other messages and always
seem to hit the same problem with pointers to structures. When you say
you can't use Perl to resolve the pointer does that mean it is
impossible without XS code? Can you not just pack the correct
structure? For example, it would be nice to be able to select all items
in a listview without going through a slow loop like:

for (0..$mw-lvList-Count()-1) {$mw-lvList-Select($_)}

Now,

$mw-lvList-Select(-1)

would be nice, but it doesn't work!

Taking an idea from the VB world I tried this:

use constant LVM_SETITEMSTATE   = 0x1000 + 43;
use constant LVIF_STATE = 0x0008;
use constant LVIS_SELECTED  = 0x0002;

my $lvItem=pack(IiiIIp,LVIF_STATE,0,0,1,LVIS_SELECTED,,0,0,0,0);
$mw-lvList-SendMessage(LVM_SETITEMSTATE, -1, \$lvItem);

Needless to say, it fails miserably. I assume the problem is with the
pointer to the structure. Is the structure wrong or is the problem with
the Perl variable reference? I know that a Perl variable is represented
by a C structure internally; can you get a pointer to the actual data
value without resorting to XS code?

Thanks again,
Glenn

-Original Message-
From: Stephen Pick [mailto:[EMAIL PROTECTED] 
Sent: Monday, 05 January, 2004 06:46
To: [EMAIL PROTECTED]; perl-win32-gui-users@lists.sourceforge.net
Cc: [EMAIL PROTECTED]
Subject: RE: [perl-win32-gui-users] New Hook Method

Hi Glenn,

 I've been trying to get the ListView EditLabel feature to work. I can
 turn it on OK and have got the handle to the edit control and through
 that the control's contents. The problem is that the control is
created
 and destroyed automatically, and it is difficult to get access to the
 final data. According to MSDN, an LVN_ENDLABELEDIT notification is
sent
 just before the control is destroyed, but I can't figure out how to
get
 to that. Would the new Hook method work? Again, according to MSDN,
the
 LVN_ENDLABELEDIT notification is sent in the form of a WM_NOTIFY
 message. Would I have to grab that? That sounds like it may be biting
 off more than I can chew... Can you offer any pointers? Could you
 perhaps post a snippet of code showing how the Hook method works?

You can't do this with Hooks at the moment. Personally I am not happy
with the current hook implementation as it does not satisfy what I
originally intended it to do. A new hook implementation should come in
the next few days, and I'll add the ability to hook notifications as
well as messages.

The problem is that WM_NOTIFY messages are delivered with an lParam that
is a pointer to a structure containing the notification code (like
LVN_ENDLABELEDIT). While you can use the current hooks implementation to
catch WM_NOTIFY and see the wParam and lParam arguments, the lParam
pointer is useless to you in Perl and you can't use Perl to resolve the
pointer and get the notification code from it.

Watch this space...

Steve






RE: [perl-win32-gui-users] New Hook Method

2004-01-06 Thread Stephen Pick
Hi,

Arrrgh.

The Win32 API deals, in the most part, with pointers to structs rather
than structs themselves. You can't pass homemade structs as Perl
references to SendMessage and hope that they're magically converted into
C pointers, that would indeed be nice, but it just isn't how it works.

I recommend you take a look at the Win32::API module for Perl. This may
help you as it certainly helped me.

Steve


 -Original Message-
 From: Glenn W Munroe [mailto:[EMAIL PROTECTED]
 Sent: 06 January 2004 14:28
 To: 'Stephen Pick'; perl-win32-gui-users@lists.sourceforge.net
 Cc: [EMAIL PROTECTED]
 Subject: RE: [perl-win32-gui-users] New Hook Method
 
 
 
 Thanks for that, Steve. I'll be looking out for the new 
 implementation.
 In the meantime, I've been playing with some other messages and always
 seem to hit the same problem with pointers to structures. When you say
 you can't use Perl to resolve the pointer does that mean it is
 impossible without XS code? Can you not just pack the correct
 structure? For example, it would be nice to be able to select 
 all items
 in a listview without going through a slow loop like:
 
 for (0..$mw-lvList-Count()-1) {$mw-lvList-Select($_)}
 
 Now,
 
 $mw-lvList-Select(-1)
 
 would be nice, but it doesn't work!
 
 Taking an idea from the VB world I tried this:
 
 use constant LVM_SETITEMSTATE = 0x1000 + 43;
 use constant LVIF_STATE   = 0x0008;
 use constant LVIS_SELECTED= 0x0002;
 
 my 
 $lvItem=pack(IiiIIp,LVIF_STATE,0,0,1,LVIS_SELECTED,,0,0,0,0);
 $mw-lvList-SendMessage(LVM_SETITEMSTATE, -1, \$lvItem);
 
 Needless to say, it fails miserably. I assume the problem is with the
 pointer to the structure. Is the structure wrong or is the 
 problem with
 the Perl variable reference? I know that a Perl variable is 
 represented
 by a C structure internally; can you get a pointer to the actual data
 value without resorting to XS code?
 
 Thanks again,
 Glenn
 
 -Original Message-
 From: Stephen Pick [mailto:[EMAIL PROTECTED] 
 Sent: Monday, 05 January, 2004 06:46
 To: [EMAIL PROTECTED]; perl-win32-gui-users@lists.sourceforge.net
 Cc: [EMAIL PROTECTED]
 Subject: RE: [perl-win32-gui-users] New Hook Method
 
 Hi Glenn,
 
  I've been trying to get the ListView EditLabel feature to 
 work. I can
  turn it on OK and have got the handle to the edit control 
 and through
  that the control's contents. The problem is that the control is
 created
  and destroyed automatically, and it is difficult to get 
 access to the
  final data. According to MSDN, an LVN_ENDLABELEDIT notification is
 sent
  just before the control is destroyed, but I can't figure out how to
 get
  to that. Would the new Hook method work? Again, according to MSDN,
 the
  LVN_ENDLABELEDIT notification is sent in the form of a WM_NOTIFY
  message. Would I have to grab that? That sounds like it may 
 be biting
  off more than I can chew... Can you offer any pointers? Could you
  perhaps post a snippet of code showing how the Hook method works?
 
 You can't do this with Hooks at the moment. Personally I am not happy
 with the current hook implementation as it does not satisfy what I
 originally intended it to do. A new hook implementation should come in
 the next few days, and I'll add the ability to hook notifications as
 well as messages.
 
 The problem is that WM_NOTIFY messages are delivered with an 
 lParam that
 is a pointer to a structure containing the notification code (like
 LVN_ENDLABELEDIT). While you can use the current hooks 
 implementation to
 catch WM_NOTIFY and see the wParam and lParam arguments, the lParam
 pointer is useless to you in Perl and you can't use Perl to 
 resolve the
 pointer and get the notification code from it.
 
 Watch this space...
 
 Steve
 
 
 
 



Re: [perl-win32-gui-users] New Hook Method

2004-01-06 Thread Glenn Linderman

On approximately 1/6/2004 6:51 AM, came the following characters from
the keyboard of Stephen Pick:


Hi,

Arrrgh.

The Win32 API deals, in the most part, with pointers to structs rather
than structs themselves. You can't pass homemade structs as Perl
references to SendMessage and hope that they're magically converted into
C pointers, that would indeed be nice, but it just isn't how it works.


pack/unpack does seem to have a conversion feature that deals with 
pointers, though, which I have to admit I have never figured out how to 
use it, or for certain why the feature is included.  None of the 
examples show its use.


I've idly wondered, from time to time, if one could obtain a pointer to 
a homebuilt struct via pack, and then pass that as an integer value via 
Win32::API to a parameter that expects a pointer, and if that would 
work.  Of course, Win32::API provides support for passing pointers to 
plain structs, so I've never had to worry about that in reality.  But 
then since SendMessage doesn't, maybe it would be useful there?


I offer these comments and speculations not in the knowledge that this 
is a workable solution, but that it might be close to one... please 
don't laugh me off the list if it is completely ridiculous.  But it 
seems I always have something else more important to do when I get near 
the computer, rather than try out this sort of thing.


Another alternative, of course, is to use the Win32::API module to 
create a new interface to the Windows SendMessage API rather than using 
the one in Win32::GUI.



I recommend you take a look at the Win32::API module for Perl. This may
help you as it certainly helped me.

Steve




-Original Message-
From: Glenn W Munroe [mailto:[EMAIL PROTECTED]
Sent: 06 January 2004 14:28
To: 'Stephen Pick'; perl-win32-gui-users@lists.sourceforge.net
Cc: [EMAIL PROTECTED]
Subject: RE: [perl-win32-gui-users] New Hook Method



Thanks for that, Steve. I'll be looking out for the new 
implementation.

In the meantime, I've been playing with some other messages and always
seem to hit the same problem with pointers to structures. When you say
you can't use Perl to resolve the pointer does that mean it is
impossible without XS code? Can you not just pack the correct
structure? For example, it would be nice to be able to select 
all items

in a listview without going through a slow loop like:

for (0..$mw-lvList-Count()-1) {$mw-lvList-Select($_)}

Now,

$mw-lvList-Select(-1)

would be nice, but it doesn't work!

Taking an idea from the VB world I tried this:

use constant LVM_SETITEMSTATE   = 0x1000 + 43;
use constant LVIF_STATE = 0x0008;
use constant LVIS_SELECTED  = 0x0002;

my 
$lvItem=pack(IiiIIp,LVIF_STATE,0,0,1,LVIS_SELECTED,,0,0,0,0);

$mw-lvList-SendMessage(LVM_SETITEMSTATE, -1, \$lvItem);

Needless to say, it fails miserably. I assume the problem is with the
pointer to the structure. Is the structure wrong or is the 
problem with
the Perl variable reference? I know that a Perl variable is 
represented

by a C structure internally; can you get a pointer to the actual data
value without resorting to XS code?

Thanks again,
Glenn

-Original Message-
From: Stephen Pick [mailto:[EMAIL PROTECTED] 
Sent: Monday, 05 January, 2004 06:46

To: [EMAIL PROTECTED]; perl-win32-gui-users@lists.sourceforge.net
Cc: [EMAIL PROTECTED]
Subject: RE: [perl-win32-gui-users] New Hook Method

Hi Glenn,


I've been trying to get the ListView EditLabel feature to 


work. I can

turn it on OK and have got the handle to the edit control 


and through


that the control's contents. The problem is that the control is


created

and destroyed automatically, and it is difficult to get 


access to the


final data. According to MSDN, an LVN_ENDLABELEDIT notification is


sent


just before the control is destroyed, but I can't figure out how to


get


to that. Would the new Hook method work? Again, according to MSDN,


the


LVN_ENDLABELEDIT notification is sent in the form of a WM_NOTIFY
message. Would I have to grab that? That sounds like it may 


be biting


off more than I can chew... Can you offer any pointers? Could you
perhaps post a snippet of code showing how the Hook method works?


You can't do this with Hooks at the moment. Personally I am not happy
with the current hook implementation as it does not satisfy what I
originally intended it to do. A new hook implementation should come in
the next few days, and I'll add the ability to hook notifications as
well as messages.

The problem is that WM_NOTIFY messages are delivered with an 
lParam that

is a pointer to a structure containing the notification code (like
LVN_ENDLABELEDIT). While you can use the current hooks 
implementation to

catch WM_NOTIFY and see the wParam and lParam arguments, the lParam
pointer is useless to you in Perl and you can't use Perl to 
resolve the

pointer and get the notification code from it.

Watch this space...

Steve