/*************************************** *********************************/
/* This function is mainly used to refresh the icon of the system tray */
/**/
/* The icons in the pallets cannot be automatically deleted after operations such as forcible killing of the pallets */
/* You can use the following methods to simulate Mouse clicking on the tray icon and refresh the icon */
/**/
/* Usage: Call the refurbishtray function directly */
/* OPERATOR: Richard */
/* Mail box: happyhell@gmail.com */
/* Date: 2006-11-06 */
/*************************************** * *******************************/Void cgreenspandlg:: refurbishtray ()
{
Rect windowrect;
Point point;
Int X;
Int y;
// Int smalliconwidth, smalliconheight;
// Smalliconwidth = getsystemmetrics (sm_cxsmicon );
// Smalliconheight = getsystemmetrics (sm_cysmicon); hwnd = getw.raywnd ();
: Getwindowrect (hwnd, & windowrect );
: Getcursorpos (& Point); For (x = 1; x <windowrect. Right-windowrect. Left-1; X ++)
{
For (y = 1; y <windowrect. Bottom-windowrect. Top-1; y ++)
{
Setcursorpos (windowrect. Left + X, windowrect. Top + y );
Sleep (0 );
} // Setcursorpos (smalliconwidth, smalliconheight );
}/************************************** **********************************/
/* This function is mainly used to obtain the system tray handle */
/**/
/* This method only supports versions earlier than nt. If it is earlier than nt
/* Modify the taskbar window and Its subwindow structure */
/* Author: Richard * // * mail box: happyhell@gmail.com */
/* Date: 2006-11-06 */
/*************************************** *********************************/
Hwnd cgreenspandlg: getjavasraywnd ()
{
Hwnd;
Hwnd =: findwindow ("shell_traywnd", null );
Hwnd =: find1_wex (hwnd, 0, "traypolicywnd", null); Return hwnd;
}