TCHAR buffer[ MAX_PATH ];wsprintf( buffer, L"ControlPanel\\Desktop" );HKEY hKey;LONG open;open = RegOpenKeyEx( HKEY_CURRENT_USER, buffer, 0, KEY_WRITE, &hKey);if ( open != ERROR_SUCCESS ) { showError(); //return false;}RegSetValueEx( hKey, L"WallpaperStyle", 0, REG_SZ, (LPBYTE)"0", lstrlen( L"0" ) + 1 );RegSetValueEx( hKey, L"TileWallpaper", 0, REG_SZ, (LPBYTE)"0", lstrlen( L"0" ) + 1 );
RemarksUnlike the RegCreateKeyEx function, the RegOpenKeyEx function does not create the specified key if the key does not exist in the registry.
Jeje, Control Panel, con espacio