Re: SysTrayIconRemove
- Posted by ne1uno Jul 20, 2011
- 2619 views
This looks promising. And the blog post that the answer is based upon.
In short the following C code would need to be ported to euphoria:
#define FW(x,y) FindWindowEx(x, NULL, y, L"") void RefreshTaskbarNotificationArea() { HWND hNotificationArea; RECT r; GetClientRect( hNotificationArea = FindWindowEx( FW(FW(FW(NULL, L"Shell_TrayWnd"), L"TrayNotifyWnd"), L"SysPager"), NULL, L"ToolbarWindow32", L"Notification Area"), &r); for (LONG x = 0; x < r.right; x += 5) for (LONG y = 0; y < r.bottom; y += 5) SendMessage( hNotificationArea, WM_MOUSEMOVE, 0, (y << 16) + x); }
Matt
(I found this while trying to research your more recent post.)
I started from original blog post, the formatting on the page had some mixed unicode quotes. that and lack of exact line numbers yesterday made debugging interesting for a while.
structs branch does need a way to redefine DWORD, UINT etc.
using eu4 structs branch, here's what I have. not sure it works yet. nothing obvious happens and I don't have a misbehaving program handy to test.
haven't found how to find which icon is under the mouse cursor yet. that should make it possible to obtain a HWND and get the struct the tooltip is passed in. you may also have to inject into the process to get it. solution may after all need something less programatic like Autoit due to windows bugs.
see the link to the VB code that should list the tooltips of all icons. I haven't integrated that code.
RefreshTaskbarNotificationArea pasty