Hi,
I am not able to change wall paper in pocketpc and windows mobile 5.0
I am using below code,
CopyFile(L"\\My Documents\\tdycust.jpg", L"\\windows\\tdycust.jpg",
0);
WCHAR * str1 = L"\\windows\\tdycust.gif";
WCHAR * str2 = L"Wallpaper";
WCHAR * str3 = L"tdycust.gif";
DWORD dwDPI = 1;
HKEY hKey;
//write in register
if(RegOpenKeyEx(HKEY_CURRENT_USER, L"Software\\Microsoft\\Today", 0,
0, &hKey) == ERROR_SUCCESS)
{
//RegDeleteValue(hKey, _T("UseStartImage"));
RegSetValueEx(hKey, L"WallFile", 0, REG_SZ,(const BYTE*) str1,
(_tcsclen(str1)+1)*2);
RegSetValueEx(hKey, L"Wall", 0, REG_SZ,(const BYTE*) str2,
(_tcsclen(str2)+1)*2);
RegSetValueEx(hKey, L"Watermark", 0, REG_SZ,(const BYTE*) str3,
(_tcsclen(str3)+1)*2);
RegSetValueEx(hKey, L"Skin", 0, REG_SZ,
0, 0);
RegSetValueEx(hKey, L"UseStartImage", 0, REG_DWORD,(const BYTE*)
&dwDPI, sizeof(DWORD));
RegCloseKey(hKey);
PostMessage(HWND_BROADCAST,WM_WININICHANGE, 0xF2, 0);
}
I checked the registry setting, it writes correctly, I guess many used
the same code.
even i tried using the code from the below link.
http://www.pocketpcdn.com/articles/changetodaytheme.html
didn't help.
Please help me.
Thanks
Vishal