Avoid calling the *Rect USER functions from inside GDI.
[wine] / windows / sysparams.c
1 /*
2  * System parameters functions
3  *
4  * Copyright 1994 Alexandre Julliard
5  */
6
7 #include "config.h"
8
9 #include "windef.h"
10 #include "winbase.h"
11 #include "wingdi.h"
12 #include "wine/winuser16.h"
13 #include "winerror.h"
14
15 #include "keyboard.h"
16 #include "monitor.h"
17 #include "tweak.h"
18 #include "desktop.h"
19 #include "debugtools.h"
20
21 DEFAULT_DEBUG_CHANNEL(system);
22
23 /***********************************************************************
24  *      GetTimerResolution (USER.14)
25  */
26 LONG WINAPI GetTimerResolution16(void)
27 {
28         return (1000);
29 }
30
31 /***********************************************************************
32  *      SystemParametersInfo32A   (USER32.540)
33  */
34 BOOL WINAPI SystemParametersInfoA( UINT uAction, UINT uParam,
35                                        LPVOID lpvParam, UINT fuWinIni )
36 {
37         int timeout;
38
39         switch (uAction) {
40         case SPI_GETBEEP:
41                 *(BOOL *) lpvParam = KEYBOARD_GetBeepActive();
42                 break;
43         case SPI_SETBEEP:
44                KEYBOARD_SetBeepActive(uParam);
45                break;
46
47         case SPI_GETBORDER:
48                 *(INT *)lpvParam = GetSystemMetrics( SM_CXFRAME );
49                 break;
50
51         case SPI_GETDRAGFULLWINDOWS:
52                 *(BOOL *) lpvParam = FALSE;
53                 break;
54
55         case SPI_SETDRAGFULLWINDOWS:
56                 break;
57
58         case SPI_GETFASTTASKSWITCH:
59                 if ( GetProfileIntA( "windows", "CoolSwitch", 1 ) == 1 )
60                         *(BOOL *) lpvParam = TRUE;
61                 else
62                         *(BOOL *) lpvParam = FALSE;
63                 break;
64                 
65         case SPI_GETGRIDGRANULARITY:
66                 *(INT*)lpvParam=GetProfileIntA("desktop","GridGranularity",1);
67                 break;
68
69         case SPI_GETICONTITLEWRAP:
70                 *(BOOL*)lpvParam=GetProfileIntA("desktop","IconTitleWrap",TRUE);
71                 break;
72
73         case SPI_GETKEYBOARDDELAY:
74                 *(INT*)lpvParam=GetProfileIntA("keyboard","KeyboardDelay",1);
75                 break;
76
77         case SPI_GETKEYBOARDSPEED:
78                 *(DWORD*)lpvParam=GetProfileIntA("keyboard","KeyboardSpeed",30);
79                 break;
80
81         case SPI_GETMENUDROPALIGNMENT:
82                 *(BOOL*)lpvParam=GetSystemMetrics(SM_MENUDROPALIGNMENT); /* XXX check this */
83                 break;
84
85         case SPI_GETSCREENSAVEACTIVE:           
86                if(MONITOR_GetScreenSaveActive(&MONITOR_PrimaryMonitor) || 
87                   GetProfileIntA( "windows", "ScreenSaveActive", 1 ) == 1)
88                         *(BOOL*)lpvParam = TRUE;
89                 else
90                         *(BOOL*)lpvParam = FALSE;
91                 break;
92
93         case SPI_GETSCREENSAVETIMEOUT:
94                 timeout = MONITOR_GetScreenSaveTimeout(&MONITOR_PrimaryMonitor);
95                 if(!timeout)
96                         timeout = GetProfileIntA( "windows", "ScreenSaveTimeout", 300 );
97                 *(INT *) lpvParam = timeout * 1000;
98                 break;
99
100         case SPI_ICONHORIZONTALSPACING:
101                 /* FIXME Get/SetProfileInt */
102                 if (lpvParam == NULL)
103                         /*SetSystemMetrics( SM_CXICONSPACING, uParam )*/ ;
104                 else
105                         *(INT*)lpvParam=GetSystemMetrics(SM_CXICONSPACING);
106                 break;
107
108         case SPI_ICONVERTICALSPACING:
109                 /* FIXME Get/SetProfileInt */
110                 if (lpvParam == NULL)
111                         /*SetSystemMetrics( SM_CYICONSPACING, uParam )*/ ;
112                 else
113                         *(INT*)lpvParam=GetSystemMetrics(SM_CYICONSPACING);
114                 break;
115
116         case SPI_GETICONTITLELOGFONT: {
117                 LPLOGFONTA lpLogFont = (LPLOGFONTA)lpvParam;
118
119                 /* from now on we always have an alias for MS Sans Serif */
120
121                 GetProfileStringA("Desktop", "IconTitleFaceName", "MS Sans Serif", 
122                         lpLogFont->lfFaceName, LF_FACESIZE );
123                 lpLogFont->lfHeight = -GetProfileIntA("Desktop","IconTitleSize", 13);
124                 lpLogFont->lfWidth = 0;
125                 lpLogFont->lfEscapement = lpLogFont->lfOrientation = 0;
126                 lpLogFont->lfWeight = FW_NORMAL;
127                 lpLogFont->lfItalic = FALSE;
128                 lpLogFont->lfStrikeOut = FALSE;
129                 lpLogFont->lfUnderline = FALSE;
130                 lpLogFont->lfCharSet = ANSI_CHARSET;
131                 lpLogFont->lfOutPrecision = OUT_DEFAULT_PRECIS;
132                 lpLogFont->lfClipPrecision = CLIP_DEFAULT_PRECIS;
133                 lpLogFont->lfPitchAndFamily = DEFAULT_PITCH | FF_SWISS;
134                 break;
135         }
136
137         case SPI_GETICONMETRICS: {
138             LPICONMETRICSA lpIcon = lpvParam;
139             if(!lpIcon || lpIcon->cbSize != sizeof(*lpIcon))
140                 return FALSE;
141             SystemParametersInfoA( SPI_ICONHORIZONTALSPACING, 0,
142                                    &lpIcon->iHorzSpacing, FALSE );
143             SystemParametersInfoA( SPI_ICONVERTICALSPACING, 0,
144                                    &lpIcon->iVertSpacing, FALSE );
145             SystemParametersInfoA( SPI_GETICONTITLEWRAP, 0,
146                                    &lpIcon->iTitleWrap, FALSE );
147             SystemParametersInfoA( SPI_GETICONTITLELOGFONT, 0,
148                                    &lpIcon->lfFont, FALSE );
149             break;
150         }
151         case SPI_GETWORKAREA:
152                 SetRect( (RECT *)lpvParam, 0, 0,
153                         GetSystemMetrics( SM_CXSCREEN ),
154                         GetSystemMetrics( SM_CYSCREEN )
155                 );
156                 break;
157         case SPI_GETNONCLIENTMETRICS: 
158
159 #define lpnm ((LPNONCLIENTMETRICSA)lpvParam)
160                 
161                 if( lpnm->cbSize == sizeof(NONCLIENTMETRICSA) )
162                 {
163                     LPLOGFONTA lpLogFont = &(lpnm->lfMenuFont);
164                 
165                     /* clear the struct, so we have 'sane' members */
166                     memset(
167                         (char*)lpvParam+sizeof(lpnm->cbSize),
168                         0,
169                         lpnm->cbSize-sizeof(lpnm->cbSize)
170                     );
171
172                     /* FIXME: initialize geometry entries */
173                     /* FIXME: As these values are presumably in device units,
174                      *  we should calculate the defaults based on the screen dpi
175                      */
176                     /* caption */
177                     lpnm->iCaptionWidth = ((TWEAK_WineLook > WIN31_LOOK)  ? 32 : 20);
178                     lpnm->iCaptionHeight = lpnm->iCaptionWidth;
179                     lpnm->lfCaptionFont.lfWeight = FW_BOLD;
180                     SystemParametersInfoA(SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(lpnm->lfCaptionFont),0);
181
182                     /* small caption */
183                     lpnm->iSmCaptionWidth = ((TWEAK_WineLook > WIN31_LOOK)  ? 32 : 17);
184                     lpnm->iSmCaptionHeight = lpnm->iSmCaptionWidth;
185                     SystemParametersInfoA(SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(lpnm->lfSmCaptionFont),0);
186
187                     /* menus, FIXME: names of wine.conf entrys are bogus */
188
189                     lpnm->iMenuWidth = GetProfileIntA("Desktop","MenuWidth", 13);       /* size of the menu buttons*/
190                     lpnm->iMenuHeight = GetProfileIntA("Desktop","MenuHeight", 
191                                                 (TWEAK_WineLook > WIN31_LOOK) ? 13 : 27);
192
193                     GetProfileStringA("Desktop", "MenuFont", 
194                         (TWEAK_WineLook > WIN31_LOOK) ? "MS Sans Serif": "System", 
195                         lpLogFont->lfFaceName, LF_FACESIZE );
196
197                     lpLogFont->lfHeight = -GetProfileIntA("Desktop","MenuFontSize", 13);
198                     lpLogFont->lfWidth = 0;
199                     lpLogFont->lfEscapement = lpLogFont->lfOrientation = 0;
200                     lpLogFont->lfWeight = (TWEAK_WineLook > WIN31_LOOK) ? FW_NORMAL : FW_BOLD;
201                     lpLogFont->lfItalic = FALSE;
202                     lpLogFont->lfStrikeOut = FALSE;
203                     lpLogFont->lfUnderline = FALSE;
204                     lpLogFont->lfCharSet = ANSI_CHARSET;
205                     lpLogFont->lfOutPrecision = OUT_DEFAULT_PRECIS;
206                     lpLogFont->lfClipPrecision = CLIP_DEFAULT_PRECIS;
207                     lpLogFont->lfPitchAndFamily = DEFAULT_PITCH | FF_SWISS;
208
209                     SystemParametersInfoA(SPI_GETICONTITLELOGFONT, 0,
210                                                         (LPVOID)&(lpnm->lfStatusFont),0);
211                     SystemParametersInfoA(SPI_GETICONTITLELOGFONT, 0,
212                                                         (LPVOID)&(lpnm->lfMessageFont),0);
213                 }
214 #undef lpnm
215                 break;
216
217         case SPI_GETANIMATION: {
218                 LPANIMATIONINFO lpAnimInfo = (LPANIMATIONINFO)lpvParam;
219  
220                 /* Tell it "disabled" */
221                 lpAnimInfo->cbSize = sizeof(ANIMATIONINFO);
222                 uParam = sizeof(ANIMATIONINFO);
223                 lpAnimInfo->iMinAnimate = 0; /* Minimise and restore animation is disabled (nonzero == enabled) */
224                 break;
225         }
226  
227         case SPI_SETANIMATION: {
228                 LPANIMATIONINFO lpAnimInfo = (LPANIMATIONINFO)lpvParam;
229  
230                 /* Do nothing */
231                 WARN("SPI_SETANIMATION ignored.\n");
232                 lpAnimInfo->cbSize = sizeof(ANIMATIONINFO);
233                 uParam = sizeof(ANIMATIONINFO);
234                 break;
235         }
236
237         case SPI_GETHIGHCONTRAST:
238         {
239                 LPHIGHCONTRASTA lpHighContrastA = (LPHIGHCONTRASTA)lpvParam;
240
241                 FIXME("SPI_GETHIGHCONTRAST not fully implemented\n");
242
243                 if ( lpHighContrastA->cbSize == sizeof( HIGHCONTRASTA ) )
244                 {
245                         /* Indicate that there is no high contrast available */
246                         lpHighContrastA->dwFlags = 0;
247                         lpHighContrastA->lpszDefaultScheme = NULL;
248                 }
249                 else
250                 {
251                         return FALSE;
252                 }
253
254                 break;
255         }
256
257         default:
258                 return SystemParametersInfo16(uAction,uParam,lpvParam,fuWinIni);
259         }
260         return TRUE;
261 }
262
263
264 /***********************************************************************
265  *      SystemParametersInfo16   (USER.483)
266  */
267 BOOL16 WINAPI SystemParametersInfo16( UINT16 uAction, UINT16 uParam,
268                                       LPVOID lpvParam, UINT16 fuWinIni )
269 {
270         int timeout; 
271         char buffer[256];
272
273         switch (uAction)
274         {
275                 case SPI_GETBEEP:
276                         *(BOOL *) lpvParam = KEYBOARD_GetBeepActive();
277                         break;
278                 
279                 case SPI_GETBORDER:
280                         *(INT16 *)lpvParam = GetSystemMetrics( SM_CXFRAME );
281                         break;
282
283                 case SPI_GETFASTTASKSWITCH:
284                     if ( GetProfileIntA( "windows", "CoolSwitch", 1 ) == 1 )
285                           *(BOOL16 *) lpvParam = TRUE;
286                         else
287                           *(BOOL16 *) lpvParam = FALSE;
288                         break;
289
290                 case SPI_GETGRIDGRANULARITY:
291                     *(INT16 *) lpvParam = GetProfileIntA( "desktop", 
292                                                           "GridGranularity",
293                                                           1 );
294                     break;
295
296                 case SPI_GETICONTITLEWRAP:
297                     *(BOOL16 *) lpvParam = GetProfileIntA( "desktop",
298                                                            "IconTitleWrap",
299                                                            TRUE );
300                     break;
301
302                 case SPI_GETKEYBOARDDELAY:
303                     *(INT16 *) lpvParam = GetProfileIntA( "keyboard",
304                                                           "KeyboardDelay", 1 );
305                     break;
306
307                 case SPI_GETKEYBOARDSPEED:
308                     *(WORD *) lpvParam = GetProfileIntA( "keyboard",
309                                                            "KeyboardSpeed",
310                                                            30 );
311                     break;
312
313                 case SPI_GETMENUDROPALIGNMENT:
314                         *(BOOL16 *) lpvParam = GetSystemMetrics( SM_MENUDROPALIGNMENT ); /* XXX check this */
315                         break;
316
317                 case SPI_GETSCREENSAVEACTIVE:
318                   if(MONITOR_GetScreenSaveActive(&MONITOR_PrimaryMonitor) ||
319                      GetProfileIntA( "windows", "ScreenSaveActive", 1 ) == 1)
320                         *(BOOL16 *) lpvParam = TRUE;
321                     else
322                         *(BOOL16 *) lpvParam = FALSE;
323                     break;
324
325                 case SPI_GETSCREENSAVETIMEOUT:
326                         timeout = MONITOR_GetScreenSaveTimeout(&MONITOR_PrimaryMonitor);
327                         if(!timeout)
328                             timeout = GetProfileIntA( "windows", "ScreenSaveTimeout", 300 );
329                         *(INT16 *) lpvParam = timeout;
330                         break;
331
332                 case SPI_ICONHORIZONTALSPACING:
333                     /* FIXME Get/SetProfileInt */
334                         if (lpvParam == NULL)
335                             /*SetSystemMetrics( SM_CXICONSPACING, uParam )*/ ;
336                         else
337                             *(INT16 *)lpvParam = GetSystemMetrics( SM_CXICONSPACING );
338                         break;
339
340                 case SPI_ICONVERTICALSPACING:
341                     /* FIXME Get/SetProfileInt */
342                     if (lpvParam == NULL)
343                         /*SetSystemMetrics( SM_CYICONSPACING, uParam )*/ ;
344                     else
345                         *(INT16 *)lpvParam = GetSystemMetrics(SM_CYICONSPACING);
346                     break;
347
348                 case SPI_SETBEEP:
349                         KEYBOARD_SetBeepActive(uParam);
350                         break;
351
352                 case SPI_SETSCREENSAVEACTIVE:
353                         MONITOR_SetScreenSaveActive(&MONITOR_PrimaryMonitor, uParam);
354                         break;
355
356                 case SPI_SETSCREENSAVETIMEOUT:
357                         MONITOR_SetScreenSaveTimeout(&MONITOR_PrimaryMonitor, uParam);
358                         break;
359
360                 case SPI_SETDESKWALLPAPER:
361                         return (SetDeskWallPaper((LPSTR) lpvParam));
362                         break;
363
364                 case SPI_SETDESKPATTERN:
365                         if ((INT16)uParam == -1) {
366                                 GetProfileStringA("Desktop", "Pattern", 
367                                                 "170 85 170 85 170 85 170 85", 
368                                                 buffer, sizeof(buffer) );
369                                 return (DESKTOP_SetPattern((LPSTR) buffer));
370                         } else
371                                 return (DESKTOP_SetPattern((LPSTR) lpvParam));
372                         break;
373
374                 case SPI_GETICONTITLELOGFONT: 
375                 {
376                     LPLOGFONT16 lpLogFont = (LPLOGFONT16)lpvParam;
377                     GetProfileStringA("Desktop", "IconTitleFaceName", "MS Sans Serif", 
378                                         lpLogFont->lfFaceName, LF_FACESIZE );
379                     lpLogFont->lfHeight = -GetProfileIntA("Desktop","IconTitleSize", 13);
380                     lpLogFont->lfWidth = 0;
381                     lpLogFont->lfEscapement = lpLogFont->lfOrientation = 0;
382                     lpLogFont->lfWeight = FW_NORMAL;
383                     lpLogFont->lfItalic = FALSE;
384                     lpLogFont->lfStrikeOut = FALSE;
385                     lpLogFont->lfUnderline = FALSE;
386                     lpLogFont->lfCharSet = ANSI_CHARSET;
387                     lpLogFont->lfOutPrecision = OUT_DEFAULT_PRECIS;
388                     lpLogFont->lfClipPrecision = CLIP_DEFAULT_PRECIS;
389                     lpLogFont->lfPitchAndFamily = DEFAULT_PITCH | FF_SWISS;
390                     break;
391                 }
392                 case SPI_GETNONCLIENTMETRICS:
393
394 #define lpnm ((LPNONCLIENTMETRICS16)lpvParam)
395                     if( lpnm->cbSize == sizeof(NONCLIENTMETRICS16) )
396                     {
397                         /* clear the struct, so we have 'sane' members */
398                         memset(
399                             (char*)lpvParam+sizeof(lpnm->cbSize),
400                             0,
401                             lpnm->cbSize-sizeof(lpnm->cbSize)
402                         );
403                         /* FIXME: initialize geometry entries */
404                         SystemParametersInfo16( SPI_GETICONTITLELOGFONT, 0, 
405                                                         (LPVOID)&(lpnm->lfCaptionFont),0);
406                         lpnm->lfCaptionFont.lfWeight = FW_BOLD;
407                         SystemParametersInfo16( SPI_GETICONTITLELOGFONT, 0,
408                                                         (LPVOID)&(lpnm->lfSmCaptionFont),0);
409                         SystemParametersInfo16( SPI_GETICONTITLELOGFONT, 0,
410                                                         (LPVOID)&(lpnm->lfMenuFont),0);
411                         SystemParametersInfo16( SPI_GETICONTITLELOGFONT, 0,
412                                                         (LPVOID)&(lpnm->lfStatusFont),0);
413                         SystemParametersInfo16( SPI_GETICONTITLELOGFONT, 0,
414                                                         (LPVOID)&(lpnm->lfMessageFont),0);
415                     }
416                     else /* winfile 95 sets sbSize to 340 */
417                         SystemParametersInfoA( uAction, uParam, lpvParam, fuWinIni );
418 #undef lpnm
419                     break;
420
421                 case SPI_LANGDRIVER:
422                 case SPI_SETBORDER:
423                 case SPI_SETDOUBLECLKHEIGHT:
424                 case SPI_SETDOUBLECLICKTIME:
425                 case SPI_SETDOUBLECLKWIDTH:
426                 case SPI_SETFASTTASKSWITCH:
427                 case SPI_SETKEYBOARDDELAY:
428                 case SPI_SETKEYBOARDSPEED:
429                         WARN("Option %d ignored.\n", uAction);
430                         break;
431
432                 case SPI_GETWORKAREA:
433                     SetRect16( (RECT16 *)lpvParam, 0, 0,
434                                GetSystemMetrics( SM_CXSCREEN ),
435                                GetSystemMetrics( SM_CYSCREEN ) );
436                     break;
437
438                 default:
439                         FIXME("Unknown option %d.\n", uAction);
440                         SetLastError(ERROR_INVALID_SPI_VALUE);
441                         return 0;
442         }
443         return 1;
444 }
445
446 /***********************************************************************
447  *      SystemParametersInfo32W   (USER32.541)
448  */
449 BOOL WINAPI SystemParametersInfoW( UINT uAction, UINT uParam,
450                                        LPVOID lpvParam, UINT fuWinIni )
451 {
452     char buffer[256];
453
454     switch (uAction)
455     {
456     case SPI_SETDESKWALLPAPER:
457         if (lpvParam)
458         {
459             lstrcpynWtoA(buffer,(LPWSTR)lpvParam,sizeof(buffer));
460             return SetDeskWallPaper(buffer);
461         }
462         return SetDeskWallPaper(NULL);
463
464     case SPI_SETDESKPATTERN:
465         if ((INT) uParam == -1)
466         {
467             GetProfileStringA("Desktop", "Pattern", 
468                                 "170 85 170 85 170 85 170 85", 
469                                 buffer, sizeof(buffer) );
470             return (DESKTOP_SetPattern((LPSTR) buffer));
471         }
472         if (lpvParam)
473         {
474             lstrcpynWtoA(buffer,(LPWSTR)lpvParam,sizeof(buffer));
475             return DESKTOP_SetPattern(buffer);
476         }
477         return DESKTOP_SetPattern(NULL);
478
479     case SPI_GETICONTITLELOGFONT:
480         {
481             LPLOGFONTW lpLogFont = (LPLOGFONTW)lpvParam;
482
483             GetProfileStringA("Desktop", "IconTitleFaceName", "MS Sans Serif", 
484                          buffer, sizeof(buffer) );
485             lstrcpynAtoW(lpLogFont->lfFaceName, buffer, LF_FACESIZE);
486             lpLogFont->lfHeight = 17;
487             lpLogFont->lfWidth = 0;
488             lpLogFont->lfEscapement = lpLogFont->lfOrientation = 0;
489             lpLogFont->lfWeight = FW_NORMAL;
490             lpLogFont->lfItalic = lpLogFont->lfStrikeOut = lpLogFont->lfUnderline = FALSE;
491             lpLogFont->lfCharSet = ANSI_CHARSET;
492             lpLogFont->lfOutPrecision = OUT_DEFAULT_PRECIS;
493             lpLogFont->lfClipPrecision = CLIP_DEFAULT_PRECIS;
494             lpLogFont->lfPitchAndFamily = DEFAULT_PITCH | FF_SWISS;
495         }
496         break;
497         case SPI_GETICONMETRICS: {
498             LPICONMETRICSW lpIcon = lpvParam;
499             if(!lpIcon || lpIcon->cbSize != sizeof(*lpIcon))
500                 return FALSE;
501             SystemParametersInfoW( SPI_ICONHORIZONTALSPACING, 0,
502                                    &lpIcon->iHorzSpacing, FALSE );
503             SystemParametersInfoW( SPI_ICONVERTICALSPACING, 0,
504                                    &lpIcon->iVertSpacing, FALSE );
505             SystemParametersInfoW( SPI_GETICONTITLEWRAP, 0,
506                                    &lpIcon->iTitleWrap, FALSE );
507             SystemParametersInfoW( SPI_GETICONTITLELOGFONT, 0,
508                                    &lpIcon->lfFont, FALSE );
509             break;
510         }
511     case SPI_GETNONCLIENTMETRICS: {
512         /* FIXME: implement correctly */
513         LPNONCLIENTMETRICSW     lpnm=(LPNONCLIENTMETRICSW)lpvParam;
514
515         /* clear the struct, so we have 'sane' members */
516         memset((char*)lpvParam+sizeof(lpnm->cbSize),
517                 0,
518                 lpnm->cbSize-sizeof(lpnm->cbSize)
519         );
520         SystemParametersInfoW(SPI_GETICONTITLELOGFONT,0,(LPVOID)&(lpnm->lfCaptionFont),0);
521         lpnm->lfCaptionFont.lfWeight = FW_BOLD;
522         SystemParametersInfoW(SPI_GETICONTITLELOGFONT,0,(LPVOID)&(lpnm->lfSmCaptionFont),0);
523         SystemParametersInfoW(SPI_GETICONTITLELOGFONT,0,(LPVOID)&(lpnm->lfMenuFont),0);
524         SystemParametersInfoW(SPI_GETICONTITLELOGFONT,0,(LPVOID)&(lpnm->lfStatusFont),0);
525         SystemParametersInfoW(SPI_GETICONTITLELOGFONT,0,(LPVOID)&(lpnm->lfMessageFont),0);
526         break;
527     }
528
529     case SPI_GETHIGHCONTRAST:
530     {
531        LPHIGHCONTRASTW lpHighContrastW = (LPHIGHCONTRASTW)lpvParam;
532
533        FIXME("SPI_GETHIGHCONTRAST not fully implemented\n");
534
535        if ( lpHighContrastW->cbSize == sizeof( HIGHCONTRASTW ) )
536        {
537           /* Indicate that there is no high contrast available */
538           lpHighContrastW->dwFlags = 0;
539           lpHighContrastW->lpszDefaultScheme = NULL;
540        }
541        else
542        {
543           return FALSE;
544        }
545
546        break;
547     }
548
549     default:
550         return SystemParametersInfoA(uAction,uParam,lpvParam,fuWinIni);
551         
552     }
553     return TRUE;
554 }