[EMAIL PROTECTED] wrote:

Quoting Robert May <[EMAIL PROTECTED]>:

[snip]

I though this might be a good moment to introduce
HyperLink.pm - a sub-classing of Win32::GUI::Label that acts as a
clickable hyperlink:
This is a great start - a nice object.

Thanks.

Although I had a problem with the constants (I'm on5.6) and got the following error:

D:\Development>perl HyperLinkDemo.pl
Constant name 'HASH(0x1a4306c)' has invalid characters at HyperLink.pm line 88 BEGIN failed--compilation aborted at HyperLink.pm line 91. Compilation failed in require at HyperLinkDemo.pl line 15. BEGIN failed--compilation aborted at HyperLinkDemo.pl line 15.

Once fixed, it worked great.
Can you let me have the fix so that I can put it back in the source. Im on 5.8.6 and don't have any other environment to test at the moment.

As a suggestion, it would be a good idea to get rid of the dependency on Win32::API - SetCapture and ReleaseCapture are already in Win32::GUI. If you are keen on this idea, I'll add GetCapture, LoadCursor into GUI.xs. The issue would then be ShellExecute - perhaps that should be added too?
I'd love to get rid of the Win32::API dependency - you'll see it listed as one of the TODO items in the comments at the start of Hyperlink.pm. I had missed that SetCapture and ReleaseCapture were already there - I guess I searched the source for GetCapture, and didn't find that. It'd be great if you could add GetCapture - should I raise a tracker? LoadCursor() is superseded (according to microsoft) by LoadImage but the API to LoadCursor is much more straightforward ... I did try using the existing Win32::GUI::LoadImage API, but never made it work (it's really only designed to get an image from a file. If we could modify the Win32::GUI::Cursor package to be able to do something like LoadImage(IDC_HAND,IMAGE_CURSOR, 0,0,LR_DEFAULT_SIZE) I think that would be better. It would be great if we could apply the same change to Win32::GUI::Icon to allow us access to default Icon resources too. Am I making any sense?

Adding ShellExecute (or ShellExecuteEx) is a bit more tenuous, but it does take a window handle as it's first parameter, so perhaps we can justify it?

Rob.

Reply via email to