mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 06:26:35 +00:00
Create a branch for header work.
svn path=/branches/header-work/; revision=45691
This commit is contained in:
parent
14fe274b1c
commit
9ea495ba33
19538 changed files with 0 additions and 1063950 deletions
43
base/applications/paint/registry.c
Normal file
43
base/applications/paint/registry.c
Normal file
|
@ -0,0 +1,43 @@
|
|||
/*
|
||||
* PROJECT: PAINT for ReactOS
|
||||
* LICENSE: LGPL
|
||||
* FILE: base/applications/paint/registry.c
|
||||
* PURPOSE: Offering functions dealing with registry values
|
||||
* PROGRAMMERS: Benedikt Freisen
|
||||
*/
|
||||
|
||||
/* INCLUDES *********************************************************/
|
||||
|
||||
#include <windows.h>
|
||||
#include <tchar.h>
|
||||
|
||||
/* FUNCTIONS ********************************************************/
|
||||
|
||||
void
|
||||
SetWallpaper(TCHAR * FileName, DWORD dwStyle, DWORD dwTile) //FIXME: The pattern (tiled/stretched) is not set
|
||||
{
|
||||
SystemParametersInfo(SPI_SETDESKWALLPAPER, 0, (PVOID) FileName, SPIF_UPDATEINIFILE);
|
||||
|
||||
/*HKEY hDesktop;
|
||||
TCHAR szStyle[3], szTile[3];
|
||||
|
||||
if ((dwStyle > 2) || (dwTile > 2))
|
||||
return;
|
||||
|
||||
if (RegOpenKeyEx(HKEY_CURRENT_USER,
|
||||
_T("Control Panel\\Desktop"), 0, KEY_READ | KEY_SET_VALUE, &hDesktop) == ERROR_SUCCESS)
|
||||
{
|
||||
RegSetValueEx(hDesktop, _T("Wallpaper"), 0, REG_SZ, (LPBYTE) FileName,
|
||||
_tcslen(FileName) * sizeof(TCHAR));
|
||||
|
||||
_stprintf(szStyle, _T("%i"), dwStyle);
|
||||
_stprintf(szTile, _T("%i"), dwTile);
|
||||
|
||||
RegSetValueEx(hDesktop, _T("WallpaperStyle"), 0, REG_SZ, (LPBYTE) szStyle,
|
||||
_tcslen(szStyle) * sizeof(TCHAR));
|
||||
RegSetValueEx(hDesktop, _T("TileWallpaper"), 0, REG_SZ, (LPBYTE) szTile,
|
||||
_tcslen(szTile) * sizeof(TCHAR));
|
||||
|
||||
RegCloseKey(hDesktop);
|
||||
}*/
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue