Changes in Windows 7 compared to Vista

"Karl-Henrik Henriksson [qwilk]" <[email protected]> Thu, 29 Jan 2009 00:19:21 +0100
Newsgroups gmane.comp.windows.shell-shocked.devel
Message-ID <[email protected]>
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