From: Jez W. <je...@je...> - 2004-02-24 18:07:59
|
Hi, I'm trying to create a new method, GetIcon for an image list.=20 http://msdn.microsoft.com/library/default.asp?url=3D/library/en-us/shellc= c/platform/commctls/imagelist/functions/imagelist_geticon.asp It's quite a handy method, the way I'm using it is to populate the = status bar with a icon, straight from an imagelist. I've got a version working, but I'm not sure if it's up to "standard"? Cheers, jez. What I've got so far: ImageList.xs = #########################################################################= ## # (@)METHOD:_GetIcon(index, [flags]) int _GetIcon(handle, index, flags) HIMAGELIST handle int index UINT flags CODE: RETVAL =3D (LONG) ImageList_GetIcon(handle, index, flags); OUTPUT: RETVAL GUI.pm sub GetIcon { my ($self,$id,$flags)=3D@_; my $handle=3D$self->_GetIcon($id,$flags); if ($handle) { my $icon; $icon->{-handle} =3D $handle; bless($icon,'Win32::GUI::Icon'); return $icon; } return undef; } |