L
lb2000
Unregistered / Unconfirmed
GUEST, unregistred user!
我在启动程序时用下面的程序显示TrayIcon。<br>const<br> wm_notifyIcon = wm_user + 100;<br>type<br> private<br> procedure pNotifyIcon(var msg: TMessage); <br> message wm_notifyIcon;<br> end;<br>var<br> nid: TNotifyIconData;<br><br> nid.cbSize := sizeof (nid);<br> nid.Wnd := Handle;<br> nid.uID := 1;<br> nid.uFlags := NIF_MESSAGE + NIF_ICON + NIF_TIP;<br> nid.uCallbackMessage := wm_notifyicon;<br> nid.hIcon := Application.Icon.Handle;<br> lstrcpy (nid.szTip,' TrayIcon Examples');<br> Shell_NotifyIcon (nim_Add, @nid);<br>但是退出时无法将TrayIcon删除。<br> nid.cbSize := sizeof (nid);<br> nid.Wnd := Handle;<br> nid.uID := 1;<br> nid.uFlags := NIF_MESSAGE + NIF_ICON + NIF_TIP;<br> nid.uCallbackMessage := wm_notifyicon;<br> nid.hIcon := Application.Icon.Handle;<br> lstrcpy (nid.szTip,' TrayIcon Examples');<br> Shell_NotifyIcon (nim_Delete, @nid);<br>请问如何解决?<br>