all groups > dotnet compact framework > july 2005 >
You're in the

dotnet compact framework

group:

Registry Set Background


Re: Registry Set Background Paul G. Tobey [eMVP]
7/29/2005 1:50:07 PM
dotnet compact framework: Probably, you have to send a WM_SETTINGCHANGE to the desktop window. To be
sure, there are two things that you might do:

1. PostMessage( HWND_BROADCAST, WM_SETTINGCHANGE, SPI_SETDESKWALLPAPER,
0 );

2. HWND hwnd = FindWindow( _T( "DesktopExplorerWindow" ), 0 );
if ( hwnd )
{
#define ID_WALLPAPAER 1001
#define ID_TILEWALLPAPER 1105
PostMessage( hwnd, WM_COMMAND, ID_TILEWALLPAPER, (LPARAM)fTile );
PostMessage( hwnd, WM_COMMAND, ID_WALLPAPAER, (LPARAM)0 );
}

Obviously, you'll have to port this to managed code, but most of the
declarations are in OpenNETCF already.

Paul T.

[quoted text, click to view]

Registry Set Background Harry Simpson
7/29/2005 3:38:06 PM
I've written a section of .REG file that does assign the background picture
to the file I designate but the picture doesn't actually display - instead
it's just a blank background.....is there someway to do a doevents type deal
that would make the background display after it's changed??

;Sets the background image
[HKEY_CURRENT_USER\Software\Microsoft\Today]
"WallFile"="\windows\tdycust.jpg"
"Wall"="Eidlablgbg"
"Skin"=""
"Watermark"="tdycust.jpg"

TIA
Harry

Re: Registry Set Background Chris Tacke, eMVP
7/29/2005 4:49:54 PM
Probably need to broadcast a WM_SETTINGSCHANGE

--
Chris Tacke
Co-founder
OpenNETCF.org
Are you using the SDF? Let's do a case study.
Email us at d c s @ o p e n n e t c f . c o m
http://www.opennetcf.org/donate


[quoted text, click to view]

AddThis Social Bookmark Button