From: Frazier, J. J. <Joe.Frazier@PeopleClick.com> - 2001-06-14 13:51:50
|
Thanks Johan, but i am fairly new to GUI Dev. I have a little knowledge of VB, and have been working in Perl for about 3 years, but none of it has used core API calls directly. Also, I have never needed to use pack/unpack before, so I am not sure of the intricate details. Here is a sample, perhasp Aldo or someone else can help me make sure it is right( I am sure it is not) $icon =3D new Win32::GUI::Icon('SECUR05.ICO'); $Window->ChangeIcon($icon); $ni =3D $Window->AddNotifyIcon(-name =3D> "NI", -id =3D> 1, -icon =3D> = $icon, -tip =3D> "PCKeys"); $nifunc =3D new Win32::API("shell32", = "Shell_NotifyIconA",[N,N,N,N,N,N,P], I); $size =3D # what? $tip =3D "Show this tip"; # same as tip above $id =3D 1; # same as id above $flags =3D undef; # would this be -style type stuff? $callback =3D undef; # right? what else could you put? A callback when the icon i #created/modified/deleted? $icon =3D $icon; # I assume I can use an object????? $hWnd =3D # what? Is this the -name Param above or = the parent window object? $params =3D pack("LLLLLLA", $size, $hWnd, $id, $flags, $callback, $icon, $tip); =20 # I have never messed with pack/unpack, does this look about right? $NIM_ADD =3D 0; $NIM_MODIFY =3D 1; $NIM_DELETE =3D 2; $rval =3D $nifunc->Call($NIM_MODIFY,$params); # now what? I know I = have to unpack,=20 #but what kind of data is returned? Is is a simple bool? $return =3D unpack("I", $rval); for the pack/unpack, are values returned signed or unsigned? Also, should strings normally be a,A or Z in pack/unpack? =20 Thanks for any pointers. =20 > -----Original Message----- > From: Johan Lindstrom [mailto:jo...@ba...] > Sent: Wednesday, June 13, 2001 17:06 > To: per...@li... > Subject: RE: [perl-win32-gui-users] RE: How to change tip for Notify > Icon >=20 >=20 > Joe wrote: > >No go.. Got the "Cant Locate object method Change in package > >Win32::GUI::NotifyIcon ..... Any more thoughts? >=20 > When Win32::GUI doesn't do what you want, you do what you=20 > want with Win32::API. >=20 > Look at "Shell_NotifyIcon" and "NOTIFYICONDATA" in the Win32=20 > API Reference.=20 > I posted a few urls the other day. >=20 >=20 > /J >=20 > ------ ---- --- -- -- -- - - - - - > Johan Lindstr=F6m Boss Casinos > Sourcerer jo...@ba... > http://www.bahnhof.se/~johanl/ > If the only tool you have is a hammer, > everything tends to look > like a nail=20 >=20 >=20 >=20 > _______________________________________________ > Perl-Win32-GUI-Users mailing list > Per...@li... > http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users >=20 |