[shell-coding] Re: SysTray changes in Windows 7 Beta compared to Vista


...another change in Windows 7 Beta is that the size of the AppBar data blob sent to the shell (commonly referred to as e.g. "SHELLAPPBARDATA" to differentiate it from the actual APPBARDATA struct) is now 64 bytes, whereas it used to be 56 bytes in Windows XP and Vista, and 48 bytes in Windows 2000. Has anyone figured out what those extra 8 bytes are for and whether or not the position of e.g. dwMessage has changed? (...I haven't had time to trace it myself yet...)

BR//Karl -> qwilk

----------

Hello all,

I noticed that the system tray didn't seem to behave the same way in Windows 7 Beta as it does in Vista, so I whipped up a *box plugin to let me see what was going on. Basically, what the plugin does is that it adds an icon to the system tray, allows you to change the tray version (i.e. NIM_SETVERSION) on the fly using bro@ms (the *box equivalent to LiteStep !bangs), and then monitors the messages that get forwarded to it from the system tray when you e.g. move the mouse over or click on its tray icon. To monitor the messages of the Explorer system tray I disabled xoblite's built-in system tray, disabled the hiding of the Explorer taskbar etc at startup, and then ran xoblite on top of Explorer. And lo and behold, Windows 7 does indeed behave quite different compared to Windows Vista!!!

To avoid formatting issues, here's the table in both PNG and TXT format:

http://xoblite.net/TrayMessages.png
http://xoblite.net/TrayMessages.txt

Windows XP behaves the same way as Windows Vista when version=0 and version=3, and for obvious reasons does not support version=4. Windows 2000 behaves the same way as Windows XP/Vista when version=0 and version=3, except that is does not forward X clicks.

If you're interested, the *box (=xoblite/bbLean/boxCore/bb4win/etc) plugin is available at http://xoblite.net/TraySnooper.dll , if you want the source code please send me an email, asking politely ;)

BR//Karl -> qwilk

----------

On 14 jan 2009, at 01.25, Neil Santos wrote:

Has anybody tried Windows 7 yet?  I'm anxious to find out how much
work it would take to make shell reps work flawlessly on it.

Well, I think I've found one change in Windows 7 Beta compared to Windows Vista:

As you know, a wallpaper is (usually) set by a call to SystemParametersInfo using the SPI_SETDESKWALLPAPER input parameter (see http://msdn.microsoft.com/en-us/library/ms724947.aspx ). Starting with the Windows 7 Beta, a classic old-school desktop window ("DesktopBackgroundClass") no longer seems to be "notified" of wallpaper changes in the good old fashion way, i.e. by triggering a regular WM_PAINT repainting of the window. However, following a call to SystemParametersInfo, a WM_SETTINGCHANGE message is broadcasted to all top-level windows to notify them of the change, and this can be used to trigger the repainting of the classic desktop window. Here's an abbreviated example:

----------

        case WM_PAINT:
        {
                PAINTSTRUCT ps;
                HDC hdc = BeginPaint(hwnd, &ps);
                PaintDesktop(hdc);
                EndPaint(hwnd, &ps);
        }

        case WM_SETTINGCHANGE:
        {
                if (wParam == SPI_SETDESKWALLPAPER)
                {
if (operatingSystemVersion >= OSVERSION_WIN7) InvalidateRect(hDesktopWnd, NULL, false);
                }
        }

----------

BR//Karl -> qwilk


__________________________________________________
Subscription options and archive:
http://www.freelists.org/list/shell-coding



__________________________________________________
Subscription options and archive:
http://www.freelists.org/list/shell-coding



__________________________________________________
Subscription options and archive:
http://www.freelists.org/list/shell-coding

Other related posts: