Move implementation of SysParametersInfo from Ascii to Unicode.
This commit is contained in:
parent
4d6b27ec3a
commit
0a25dd4668
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
Loading…
Reference in New Issue