3 Test_GetSystemMetrics(PTESTINFO pti
)
14 ret
= GetSystemMetrics(0);
17 ret
= GetSystemMetrics(64);
19 ret
= GetSystemMetrics(65);
21 ret
= GetSystemMetrics(66);
25 ret
= GetSystemMetrics(SM_CXSCREEN
);
26 TEST(ret
== GetDeviceCaps(hDC
, HORZRES
));
27 TEST(GetLastError() == 0);
29 ret
= GetSystemMetrics(SM_CYSCREEN
);
30 TEST(ret
== GetDeviceCaps(hDC
, VERTRES
));
31 TEST(GetLastError() == 0);
33 ret
= GetSystemMetrics(SM_CXVSCROLL
);
35 TEST(GetLastError() == 0);
37 ret
= GetSystemMetrics(SM_CYHSCROLL
);
39 TEST(GetLastError() == 0);
41 ret
= GetSystemMetrics(SM_CYCAPTION
);
43 TEST(GetLastError() == 0);
45 ret
= GetSystemMetrics(SM_CXBORDER
);
46 SystemParametersInfoW(SPI_GETFOCUSBORDERWIDTH
, 0, &UintVal
, 0);
48 TEST(GetLastError() == 0);
50 ret
= GetSystemMetrics(SM_CYBORDER
);
51 SystemParametersInfoW(SPI_GETFOCUSBORDERHEIGHT
, 0, &UintVal
, 0);
53 TEST(GetLastError() == 0);
55 ret
= GetSystemMetrics(SM_CXDLGFRAME
);
57 TEST(GetLastError() == 0);
59 ret
= GetSystemMetrics(SM_CYDLGFRAME
);
61 TEST(GetLastError() == 0);
63 ret
= GetSystemMetrics(SM_CYVTHUMB
);
65 TEST(GetLastError() == 0);
67 ret
= GetSystemMetrics(SM_CXHTHUMB
);
69 TEST(GetLastError() == 0);
71 ret
= GetSystemMetrics(SM_CXICON
);
73 TEST(GetLastError() == 0);
75 ret
= GetSystemMetrics(SM_CYICON
);
77 TEST(GetLastError() == 0);
79 ret
= GetSystemMetrics(SM_CXCURSOR
);
81 TEST(GetLastError() == 0);
83 ret
= GetSystemMetrics(SM_CYCURSOR
);
85 TEST(GetLastError() == 0);
87 ret
= GetSystemMetrics(SM_CYMENU
);
89 TEST(GetLastError() == 0);
91 SystemParametersInfoW(SPI_GETWORKAREA
, 0, &rect
, 0);
92 ret
= GetSystemMetrics(SM_CXFULLSCREEN
);
93 TEST(ret
== rect
.right
);
94 TEST(GetLastError() == 0);
96 ret
= GetSystemMetrics(SM_CYFULLSCREEN
);
97 TEST(ret
== rect
.bottom
- rect
.top
- GetSystemMetrics(SM_CYCAPTION
));
98 TEST(GetLastError() == 0);
100 ret
= GetSystemMetrics(SM_CYKANJIWINDOW
);
102 TEST(GetLastError() == 0);
104 ret
= GetSystemMetrics(SM_MOUSEPRESENT
);
106 TEST(GetLastError() == 0);
108 ret
= GetSystemMetrics(SM_CYVSCROLL
);
110 TEST(GetLastError() == 0);
112 ret
= GetSystemMetrics(SM_CXHSCROLL
);
114 TEST(GetLastError() == 0);
116 ret
= GetSystemMetrics(SM_DEBUG
);
118 TEST(GetLastError() == 0);
120 ret
= GetSystemMetrics(SM_SWAPBUTTON
);
122 TEST(GetLastError() == 0);
124 ret
= GetSystemMetrics(SM_RESERVED1
);
126 TEST(GetLastError() == 0);
128 ret
= GetSystemMetrics(SM_RESERVED2
);
130 TEST(GetLastError() == 0);
132 ret
= GetSystemMetrics(SM_RESERVED3
);
134 TEST(GetLastError() == 0);
136 ret
= GetSystemMetrics(SM_RESERVED4
);
138 TEST(GetLastError() == 0);
140 ret
= GetSystemMetrics(SM_CXMIN
);
142 TEST(GetLastError() == 0);
144 ret
= GetSystemMetrics(SM_CYMIN
);
146 TEST(GetLastError() == 0);
148 ret
= GetSystemMetrics(SM_CXSIZE
);
150 TEST(GetLastError() == 0);
152 ret
= GetSystemMetrics(SM_CYSIZE
);
154 TEST(GetLastError() == 0);
156 ret
= GetSystemMetrics(SM_CXFRAME
);
158 TEST(GetLastError() == 0);
160 ret
= GetSystemMetrics(SM_CYFRAME
);
162 TEST(GetLastError() == 0);
164 ret
= GetSystemMetrics(SM_CXMINTRACK
);
166 TEST(GetLastError() == 0);
168 ret
= GetSystemMetrics(SM_CYMINTRACK
);
170 TEST(GetLastError() == 0);
172 ret
= GetSystemMetrics(SM_CXDOUBLECLK
);
174 TEST(GetLastError() == 0);
176 ret
= GetSystemMetrics(SM_CYDOUBLECLK
);
178 TEST(GetLastError() == 0);
180 ret
= GetSystemMetrics(SM_CXICONSPACING
);
182 TEST(GetLastError() == 0);
184 ret
= GetSystemMetrics(SM_CYICONSPACING
);
186 TEST(GetLastError() == 0);
188 ret
= GetSystemMetrics(SM_MENUDROPALIGNMENT
);
190 TEST(GetLastError() == 0);
192 ret
= GetSystemMetrics(SM_PENWINDOWS
);
194 TEST(GetLastError() == 0);
196 ret
= GetSystemMetrics(SM_DBCSENABLED
);
198 TEST(GetLastError() == 0);
200 ret
= GetSystemMetrics(SM_CMOUSEBUTTONS
);
202 TEST(GetLastError() == 0);
204 #if(WINVER >= 0x0400)
205 ret
= GetSystemMetrics(SM_SECURE
);
207 TEST(GetLastError() == 0);
209 ret
= GetSystemMetrics(SM_CXEDGE
);
211 TEST(GetLastError() == 0);
213 ret
= GetSystemMetrics(SM_CYEDGE
);
215 TEST(GetLastError() == 0);
217 ret
= GetSystemMetrics(SM_CXMINSPACING
);
219 TEST(GetLastError() == 0);
221 ret
= GetSystemMetrics(SM_CYMINSPACING
);
223 TEST(GetLastError() == 0);
225 ret
= GetSystemMetrics(SM_CXSMICON
);
227 TEST(GetLastError() == 0);
229 ret
= GetSystemMetrics(SM_CYSMICON
);
231 TEST(GetLastError() == 0);
233 ret
= GetSystemMetrics(SM_CYSMCAPTION
);
235 TEST(GetLastError() == 0);
237 ret
= GetSystemMetrics(SM_CXSMSIZE
);
239 TEST(GetLastError() == 0);
241 ret
= GetSystemMetrics(SM_CYSMSIZE
);
243 TEST(GetLastError() == 0);
245 ret
= GetSystemMetrics(SM_CXMENUSIZE
);
247 TEST(GetLastError() == 0);
249 ret
= GetSystemMetrics(SM_CYMENUSIZE
);
251 TEST(GetLastError() == 0);
253 ret
= GetSystemMetrics(SM_ARRANGE
);
255 TEST(GetLastError() == 0);
257 ret
= GetSystemMetrics(SM_CXMINIMIZED
);
259 TEST(GetLastError() == 0);
261 ret
= GetSystemMetrics(SM_CYMINIMIZED
);
263 TEST(GetLastError() == 0);
265 ret
= GetSystemMetrics(SM_CXMAXTRACK
);
267 TEST(GetLastError() == 0);
269 ret
= GetSystemMetrics(SM_CYMAXTRACK
);
271 TEST(GetLastError() == 0);
273 ret
= GetSystemMetrics(SM_CXMAXIMIZED
);
275 TEST(GetLastError() == 0);
277 ret
= GetSystemMetrics(SM_CYMAXIMIZED
);
279 TEST(GetLastError() == 0);
281 ret
= GetSystemMetrics(SM_NETWORK
);
283 TEST(GetLastError() == 0);
285 ret
= GetSystemMetrics(SM_CLEANBOOT
);
287 TEST(GetLastError() == 0);
289 ret
= GetSystemMetrics(SM_CXDRAG
);
291 TEST(GetLastError() == 0);
293 ret
= GetSystemMetrics(SM_CYDRAG
);
295 TEST(GetLastError() == 0);
297 ret
= GetSystemMetrics(SM_SHOWSOUNDS
);
298 SystemParametersInfoW(SPI_GETSHOWSOUNDS
, 0, &BoolVal
, 0);
299 TEST(ret
== BoolVal
);
300 TEST(GetLastError() == 0);
302 ret
= GetSystemMetrics(SM_CXMENUCHECK
);
304 TEST(GetLastError() == 0);
306 ret
= GetSystemMetrics(SM_CYMENUCHECK
);
308 TEST(GetLastError() == 0);
310 ret
= GetSystemMetrics(SM_SLOWMACHINE
);
312 TEST(GetLastError() == 0);
314 ret
= GetSystemMetrics(SM_MIDEASTENABLED
);
316 TEST(GetLastError() == 0);
319 #if (WINVER >= 0x0500) || (_WIN32_WINNT >= 0x0400)
320 ret
= GetSystemMetrics(SM_MOUSEWHEELPRESENT
);
322 TEST(GetLastError() == 0);
325 #if(WINVER >= 0x0500)
326 ret
= GetSystemMetrics(SM_XVIRTUALSCREEN
);
328 TEST(GetLastError() == 0);
330 ret
= GetSystemMetrics(SM_YVIRTUALSCREEN
);
332 TEST(GetLastError() == 0);
334 ret
= GetSystemMetrics(SM_CXVIRTUALSCREEN
);
336 TEST(GetLastError() == 0);
338 ret
= GetSystemMetrics(SM_CYVIRTUALSCREEN
);
340 TEST(GetLastError() == 0);
342 ret
= GetSystemMetrics(SM_CMONITORS
);
344 TEST(GetLastError() == 0);
346 ret
= GetSystemMetrics(SM_SAMEDISPLAYFORMAT
);
348 TEST(GetLastError() == 0);
351 #if(_WIN32_WINNT >= 0x0500)
352 ret
= GetSystemMetrics(SM_IMMENABLED
);
354 TEST(GetLastError() == 0);
357 #if(_WIN32_WINNT >= 0x0501)
358 ret
= GetSystemMetrics(SM_CXFOCUSBORDER
);
359 SystemParametersInfoW(SPI_GETFOCUSBORDERWIDTH
, 0, &UintVal
, 0);
360 TEST(ret
== UintVal
);
361 TEST(GetLastError() == 0);
363 ret
= GetSystemMetrics(SM_CYFOCUSBORDER
);
364 SystemParametersInfoW(SPI_GETFOCUSBORDERHEIGHT
, 0, &UintVal
, 0);
365 TEST(ret
== UintVal
);
366 TEST(GetLastError() == 0);
368 ret
= GetSystemMetrics(SM_TABLETPC
);
370 TEST(GetLastError() == 0);
372 ret
= GetSystemMetrics(SM_MEDIACENTER
);
374 TEST(GetLastError() == 0);
376 ret
= GetSystemMetrics(SM_STARTER
);
378 TEST(GetLastError() == 0);
380 ret
= GetSystemMetrics(SM_SERVERR2
);
382 TEST(GetLastError() == 0);
385 #if(_WIN32_WINNT >= 0x0600)
386 ret
= GetSystemMetrics(SM_MOUSEHORIZONTALWHEELPRESENT
);
388 TEST(GetLastError() == 0);
390 ret
= GetSystemMetrics(SM_CXPADDEDBORDER
);
392 TEST(GetLastError() == 0);
395 return APISTATUS_NORMAL
;