Move implementation of SysParametersInfo from Ascii to Unicode.

This commit is contained in:
Justin Chevrier 2004-03-04 01:41:11 +00:00 committed by Alexandre Julliard
parent 4d6b27ec3a
commit 0a25dd4668
3 changed files with 342 additions and 305 deletions

View File

@ -235,25 +235,30 @@ BOOL WINAPI SetDeskWallPaper( LPCSTR filename )
* *
* Set the desktop pattern. * Set the desktop pattern.
*/ */
BOOL DESKTOP_SetPattern( LPCSTR pattern ) BOOL DESKTOP_SetPattern( LPCWSTR pattern )
{ {
int pat[8]; int pat[8];
if (hbrushPattern) DeleteObject( hbrushPattern ); if (hbrushPattern) DeleteObject( hbrushPattern );
hbrushPattern = 0;
memset( pat, 0, sizeof(pat) ); memset( pat, 0, sizeof(pat) );
if (pattern && sscanf( pattern, " %d %d %d %d %d %d %d %d", if (pattern)
&pat[0], &pat[1], &pat[2], &pat[3],
&pat[4], &pat[5], &pat[6], &pat[7] ))
{ {
WORD pattern[8]; char buffer[64];
HBITMAP hbitmap; WideCharToMultiByte( CP_ACP, 0, pattern, -1, buffer, sizeof(buffer), NULL, NULL );
int i; if (sscanf( buffer, " %d %d %d %d %d %d %d %d",
&pat[0], &pat[1], &pat[2], &pat[3],
&pat[4], &pat[5], &pat[6], &pat[7] ))
{
WORD pattern[8];
HBITMAP hbitmap;
int i;
for (i = 0; i < 8; i++) pattern[i] = pat[i] & 0xffff; for (i = 0; i < 8; i++) pattern[i] = pat[i] & 0xffff;
hbitmap = CreateBitmap( 8, 8, 1, 1, (LPSTR)pattern ); hbitmap = CreateBitmap( 8, 8, 1, 1, (LPSTR)pattern );
hbrushPattern = CreatePatternBrush( hbitmap ); hbrushPattern = CreatePatternBrush( hbitmap );
DeleteObject( hbitmap ); DeleteObject( hbitmap );
}
} }
else hbrushPattern = 0;
return TRUE; return TRUE;
} }

View File

@ -47,7 +47,7 @@ struct builtin_class_descr
/* desktop */ /* desktop */
extern BOOL DESKTOP_SetPattern( LPCSTR pattern ); extern BOOL DESKTOP_SetPattern( LPCWSTR pattern );
/* icon title */ /* icon title */
extern HWND ICONTITLE_Create( HWND hwnd ); extern HWND ICONTITLE_Create( HWND hwnd );

File diff suppressed because it is too large Load Diff