Always calls SetMenu in MDISetMenu.
[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 "tweak.h"
17 #include "user.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  *      SystemParametersInfoA   (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(USER_Driver->pGetScreenSaveActive() || 
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 = USER_Driver->pGetScreenSaveTimeout();
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                 else
215                 {
216                     WARN("size mismatch !! (is %d; should be %d)\n", lpnm->cbSize, sizeof(NONCLIENTMETRICSA));
217                     return FALSE;
218                 }
219 #undef lpnm
220                 break;
221
222         case SPI_GETANIMATION: {
223                 LPANIMATIONINFO lpAnimInfo = (LPANIMATIONINFO)lpvParam;
224  
225                 /* Tell it "disabled" */
226                 lpAnimInfo->cbSize = sizeof(ANIMATIONINFO);
227                 uParam = sizeof(ANIMATIONINFO);
228                 lpAnimInfo->iMinAnimate = 0; /* Minimise and restore animation is disabled (nonzero == enabled) */
229                 break;
230         }
231  
232         case SPI_SETANIMATION: {
233                 LPANIMATIONINFO lpAnimInfo = (LPANIMATIONINFO)lpvParam;
234  
235                 /* Do nothing */
236                 WARN("SPI_SETANIMATION ignored.\n");
237                 lpAnimInfo->cbSize = sizeof(ANIMATIONINFO);
238                 uParam = sizeof(ANIMATIONINFO);
239                 break;
240         }
241
242         case SPI_GETHIGHCONTRAST:
243         {
244                 LPHIGHCONTRASTA lpHighContrastA = (LPHIGHCONTRASTA)lpvParam;
245
246                 FIXME("SPI_GETHIGHCONTRAST not fully implemented\n");
247
248                 if ( lpHighContrastA->cbSize == sizeof( HIGHCONTRASTA ) )
249                 {
250                         /* Indicate that there is no high contrast available */
251                         lpHighContrastA->dwFlags = 0;
252                         lpHighContrastA->lpszDefaultScheme = NULL;
253                 }
254                 else
255                 {
256                         return FALSE;
257                 }
258
259                 break;
260         }
261
262         default:
263                 return SystemParametersInfo16(uAction,uParam,lpvParam,fuWinIni);
264         }
265         return TRUE;
266 }
267
268
269 /***********************************************************************
270  *      SystemParametersInfo16   (USER.483)
271  */
272 BOOL16 WINAPI SystemParametersInfo16( UINT16 uAction, UINT16 uParam,
273                                       LPVOID lpvParam, UINT16 fuWinIni )
274 {
275         int timeout; 
276         char buffer[256];
277
278         switch (uAction)
279         {
280                 case SPI_GETBEEP:
281                         *(BOOL *) lpvParam = KEYBOARD_GetBeepActive();
282                         break;
283                 
284                 case SPI_GETBORDER:
285                         *(INT16 *)lpvParam = GetSystemMetrics( SM_CXFRAME );
286                         break;
287
288                 case SPI_GETFASTTASKSWITCH:
289                     if ( GetProfileIntA( "windows", "CoolSwitch", 1 ) == 1 )
290                           *(BOOL16 *) lpvParam = TRUE;
291                         else
292                           *(BOOL16 *) lpvParam = FALSE;
293                         break;
294
295                 case SPI_GETGRIDGRANULARITY:
296                     *(INT16 *) lpvParam = GetProfileIntA( "desktop", 
297                                                           "GridGranularity",
298                                                           1 );
299                     break;
300
301                 case SPI_GETICONTITLEWRAP:
302                     *(BOOL16 *) lpvParam = GetProfileIntA( "desktop",
303                                                            "IconTitleWrap",
304                                                            TRUE );
305                     break;
306
307                 case SPI_GETKEYBOARDDELAY:
308                     *(INT16 *) lpvParam = GetProfileIntA( "keyboard",
309                                                           "KeyboardDelay", 1 );
310                     break;
311
312                 case SPI_GETKEYBOARDSPEED:
313                     *(WORD *) lpvParam = GetProfileIntA( "keyboard",
314                                                            "KeyboardSpeed",
315                                                            30 );
316                     break;
317
318                 case SPI_GETMENUDROPALIGNMENT:
319                         *(BOOL16 *) lpvParam = GetSystemMetrics( SM_MENUDROPALIGNMENT ); /* XXX check this */
320                         break;
321
322                 case SPI_GETSCREENSAVEACTIVE:
323                   if(USER_Driver->pGetScreenSaveActive() ||
324                      GetProfileIntA( "windows", "ScreenSaveActive", 1 ) == 1)
325                         *(BOOL16 *) lpvParam = TRUE;
326                     else
327                         *(BOOL16 *) lpvParam = FALSE;
328                     break;
329
330                 case SPI_GETSCREENSAVETIMEOUT:
331                         timeout = USER_Driver->pGetScreenSaveTimeout();
332                         if(!timeout)
333                             timeout = GetProfileIntA( "windows", "ScreenSaveTimeout", 300 );
334                         *(INT16 *) lpvParam = timeout;
335                         break;
336
337                 case SPI_ICONHORIZONTALSPACING:
338                     /* FIXME Get/SetProfileInt */
339                         if (lpvParam == NULL)
340                             /*SetSystemMetrics( SM_CXICONSPACING, uParam )*/ ;
341                         else
342                             *(INT16 *)lpvParam = GetSystemMetrics( SM_CXICONSPACING );
343                         break;
344
345                 case SPI_ICONVERTICALSPACING:
346                     /* FIXME Get/SetProfileInt */
347                     if (lpvParam == NULL)
348                         /*SetSystemMetrics( SM_CYICONSPACING, uParam )*/ ;
349                     else
350                         *(INT16 *)lpvParam = GetSystemMetrics(SM_CYICONSPACING);
351                     break;
352
353                 case SPI_SETBEEP:
354                         KEYBOARD_SetBeepActive(uParam);
355                         break;
356
357                 case SPI_SETSCREENSAVEACTIVE:
358                         USER_Driver->pSetScreenSaveActive(uParam);
359                         break;
360
361                 case SPI_SETSCREENSAVETIMEOUT:
362                         USER_Driver->pSetScreenSaveTimeout(uParam);
363                         break;
364
365                 case SPI_SETDESKWALLPAPER:
366                         return (SetDeskWallPaper((LPSTR) lpvParam));
367                         break;
368
369                 case SPI_SETDESKPATTERN:
370                         if ((INT16)uParam == -1) {
371                                 GetProfileStringA("Desktop", "Pattern", 
372                                                 "170 85 170 85 170 85 170 85", 
373                                                 buffer, sizeof(buffer) );
374                                 return (DESKTOP_SetPattern((LPSTR) buffer));
375                         } else
376                                 return (DESKTOP_SetPattern((LPSTR) lpvParam));
377                         break;
378
379                 case SPI_GETICONTITLELOGFONT: 
380                 {
381                     LPLOGFONT16 lpLogFont = (LPLOGFONT16)lpvParam;
382                     GetProfileStringA("Desktop", "IconTitleFaceName", "MS Sans Serif", 
383                                         lpLogFont->lfFaceName, LF_FACESIZE );
384                     lpLogFont->lfHeight = -GetProfileIntA("Desktop","IconTitleSize", 13);
385                     lpLogFont->lfWidth = 0;
386                     lpLogFont->lfEscapement = lpLogFont->lfOrientation = 0;
387                     lpLogFont->lfWeight = FW_NORMAL;
388                     lpLogFont->lfItalic = FALSE;
389                     lpLogFont->lfStrikeOut = FALSE;
390                     lpLogFont->lfUnderline = FALSE;
391                     lpLogFont->lfCharSet = ANSI_CHARSET;
392                     lpLogFont->lfOutPrecision = OUT_DEFAULT_PRECIS;
393                     lpLogFont->lfClipPrecision = CLIP_DEFAULT_PRECIS;
394                     lpLogFont->lfPitchAndFamily = DEFAULT_PITCH | FF_SWISS;
395                     break;
396                 }
397                 case SPI_GETNONCLIENTMETRICS:
398
399 #define lpnm ((LPNONCLIENTMETRICS16)lpvParam)
400                     if( lpnm->cbSize == sizeof(NONCLIENTMETRICS16) )
401                     {
402                         /* clear the struct, so we have 'sane' members */
403                         memset(
404                             (char*)lpvParam+sizeof(lpnm->cbSize),
405                             0,
406                             lpnm->cbSize-sizeof(lpnm->cbSize)
407                         );
408                         /* FIXME: initialize geometry entries */
409                         SystemParametersInfo16( SPI_GETICONTITLELOGFONT, 0, 
410                                                         (LPVOID)&(lpnm->lfCaptionFont),0);
411                         lpnm->lfCaptionFont.lfWeight = FW_BOLD;
412                         SystemParametersInfo16( SPI_GETICONTITLELOGFONT, 0,
413                                                         (LPVOID)&(lpnm->lfSmCaptionFont),0);
414                         SystemParametersInfo16( SPI_GETICONTITLELOGFONT, 0,
415                                                         (LPVOID)&(lpnm->lfMenuFont),0);
416                         SystemParametersInfo16( SPI_GETICONTITLELOGFONT, 0,
417                                                         (LPVOID)&(lpnm->lfStatusFont),0);
418                         SystemParametersInfo16( SPI_GETICONTITLELOGFONT, 0,
419                                                         (LPVOID)&(lpnm->lfMessageFont),0);
420                     }
421                     else /* winfile 95 sets sbSize to 340 */
422                         SystemParametersInfoA( uAction, uParam, lpvParam, fuWinIni );
423 #undef lpnm
424                     break;
425
426                 case SPI_LANGDRIVER:
427                 case SPI_SETBORDER:
428                 case SPI_SETDOUBLECLKHEIGHT:
429                 case SPI_SETDOUBLECLICKTIME:
430                 case SPI_SETDOUBLECLKWIDTH:
431                 case SPI_SETFASTTASKSWITCH:
432                 case SPI_SETKEYBOARDDELAY:
433                 case SPI_SETKEYBOARDSPEED:
434                         WARN("Option %d ignored.\n", uAction);
435                         break;
436
437                 case SPI_GETWORKAREA:
438                     SetRect16( (RECT16 *)lpvParam, 0, 0,
439                                GetSystemMetrics( SM_CXSCREEN ),
440                                GetSystemMetrics( SM_CYSCREEN ) );
441                     break;
442
443                 /* FIXME need to implement SPI_SETMOUSEHOVER... */
444                 case SPI_GETMOUSEHOVERWIDTH:
445                     *(INT16 *)lpvParam = 4;
446                     break;
447
448                 case SPI_GETMOUSEHOVERHEIGHT:
449                     *(INT16 *)lpvParam = 4;
450                     break;
451
452                 case SPI_GETMOUSEHOVERTIME:
453                     *(INT16 *)lpvParam = 400; /* default for menu dropdowns */
454                     break;
455                 
456                 default:
457                         FIXME("Unknown option %d.\n", uAction);
458                         SetLastError(ERROR_INVALID_SPI_VALUE);
459                         return 0;
460         }
461         return 1;
462 }
463
464 /***********************************************************************
465  *      SystemParametersInfoW   (USER32.541)
466  */
467 BOOL WINAPI SystemParametersInfoW( UINT uAction, UINT uParam,
468                                        LPVOID lpvParam, UINT fuWinIni )
469 {
470     char buffer[256];
471
472     switch (uAction)
473     {
474     case SPI_SETDESKWALLPAPER:
475         if (lpvParam)
476         {
477             lstrcpynWtoA(buffer,(LPWSTR)lpvParam,sizeof(buffer));
478             return SetDeskWallPaper(buffer);
479         }
480         return SetDeskWallPaper(NULL);
481
482     case SPI_SETDESKPATTERN:
483         if ((INT) uParam == -1)
484         {
485             GetProfileStringA("Desktop", "Pattern", 
486                                 "170 85 170 85 170 85 170 85", 
487                                 buffer, sizeof(buffer) );
488             return (DESKTOP_SetPattern((LPSTR) buffer));
489         }
490         if (lpvParam)
491         {
492             lstrcpynWtoA(buffer,(LPWSTR)lpvParam,sizeof(buffer));
493             return DESKTOP_SetPattern(buffer);
494         }
495         return DESKTOP_SetPattern(NULL);
496
497     case SPI_GETICONTITLELOGFONT:
498         {
499             LPLOGFONTW lpLogFont = (LPLOGFONTW)lpvParam;
500
501             GetProfileStringA("Desktop", "IconTitleFaceName", "MS Sans Serif", 
502                          buffer, sizeof(buffer) );
503             lstrcpynAtoW(lpLogFont->lfFaceName, buffer, LF_FACESIZE);
504             lpLogFont->lfHeight = 17;
505             lpLogFont->lfWidth = 0;
506             lpLogFont->lfEscapement = lpLogFont->lfOrientation = 0;
507             lpLogFont->lfWeight = FW_NORMAL;
508             lpLogFont->lfItalic = lpLogFont->lfStrikeOut = lpLogFont->lfUnderline = FALSE;
509             lpLogFont->lfCharSet = ANSI_CHARSET;
510             lpLogFont->lfOutPrecision = OUT_DEFAULT_PRECIS;
511             lpLogFont->lfClipPrecision = CLIP_DEFAULT_PRECIS;
512             lpLogFont->lfPitchAndFamily = DEFAULT_PITCH | FF_SWISS;
513         }
514         break;
515         case SPI_GETICONMETRICS: {
516             LPICONMETRICSW lpIcon = lpvParam;
517             if(!lpIcon || lpIcon->cbSize != sizeof(*lpIcon))
518                 return FALSE;
519             SystemParametersInfoW( SPI_ICONHORIZONTALSPACING, 0,
520                                    &lpIcon->iHorzSpacing, FALSE );
521             SystemParametersInfoW( SPI_ICONVERTICALSPACING, 0,
522                                    &lpIcon->iVertSpacing, FALSE );
523             SystemParametersInfoW( SPI_GETICONTITLEWRAP, 0,
524                                    &lpIcon->iTitleWrap, FALSE );
525             SystemParametersInfoW( SPI_GETICONTITLELOGFONT, 0,
526                                    &lpIcon->lfFont, FALSE );
527             break;
528         }
529     case SPI_GETNONCLIENTMETRICS: {
530         /* FIXME: implement correctly */
531         LPNONCLIENTMETRICSW     lpnm=(LPNONCLIENTMETRICSW)lpvParam;
532
533         /* clear the struct, so we have 'sane' members */
534         memset((char*)lpvParam+sizeof(lpnm->cbSize),
535                 0,
536                 lpnm->cbSize-sizeof(lpnm->cbSize)
537         );
538         SystemParametersInfoW(SPI_GETICONTITLELOGFONT,0,(LPVOID)&(lpnm->lfCaptionFont),0);
539         lpnm->lfCaptionFont.lfWeight = FW_BOLD;
540         SystemParametersInfoW(SPI_GETICONTITLELOGFONT,0,(LPVOID)&(lpnm->lfSmCaptionFont),0);
541         SystemParametersInfoW(SPI_GETICONTITLELOGFONT,0,(LPVOID)&(lpnm->lfMenuFont),0);
542         SystemParametersInfoW(SPI_GETICONTITLELOGFONT,0,(LPVOID)&(lpnm->lfStatusFont),0);
543         SystemParametersInfoW(SPI_GETICONTITLELOGFONT,0,(LPVOID)&(lpnm->lfMessageFont),0);
544         break;
545     }
546
547     case SPI_GETHIGHCONTRAST:
548     {
549        LPHIGHCONTRASTW lpHighContrastW = (LPHIGHCONTRASTW)lpvParam;
550
551        FIXME("SPI_GETHIGHCONTRAST not fully implemented\n");
552
553        if ( lpHighContrastW->cbSize == sizeof( HIGHCONTRASTW ) )
554        {
555           /* Indicate that there is no high contrast available */
556           lpHighContrastW->dwFlags = 0;
557           lpHighContrastW->lpszDefaultScheme = NULL;
558        }
559        else
560        {
561           return FALSE;
562        }
563
564        break;
565     }
566
567     default:
568         return SystemParametersInfoA(uAction,uParam,lpvParam,fuWinIni);
569         
570     }
571     return TRUE;
572 }