rename tests to dllname_winetest to make it less trouble on exception to change build...
[reactos.git] / reactos / regtests / winetests / comctl32 / imagelist.c
1 /* Unit test suite for imagelist control.
2 *
3 * Copyright 2004 Michael Stefaniuc
4 * Copyright 2002 Mike McCormack for CodeWeavers
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21 #include <assert.h>
22 #include <windows.h>
23 #include <wine/commctrl.h>
24 #include <stdio.h>
25
26 #include "wine/test.h"
27
28 #undef VISIBLE
29
30 #ifdef VISIBLE
31 #define WAIT Sleep (1000)
32 #define REDRAW(hwnd) RedrawWindow (hwnd, NULL, 0, RDW_UPDATENOW)
33 #else
34 #define WAIT
35 #define REDRAW(hwnd)
36 #endif
37
38
39 static BOOL (WINAPI *pImageList_DrawIndirect)(IMAGELISTDRAWPARAMS*) = NULL;
40
41 static HDC desktopDC;
42 static HINSTANCE hinst;
43
44 /* These macros build cursor/bitmap data in 4x4 pixel blocks */
45 #define B(x,y) ((x?0xf0:0)|(y?0xf:0))
46 #define ROW1(a,b,c,d,e,f,g,h) B(a,b),B(c,d),B(e,f),B(g,h)
47 #define ROW32(a,b,c,d,e,f,g,h) ROW1(a,b,c,d,e,f,g,h), ROW1(a,b,c,d,e,f,g,h), \
48 ROW1(a,b,c,d,e,f,g,h), ROW1(a,b,c,d,e,f,g,h)
49 #define ROW2(a,b,c,d,e,f,g,h,i,j,k,l) ROW1(a,b,c,d,e,f,g,h),B(i,j),B(k,l)
50 #define ROW48(a,b,c,d,e,f,g,h,i,j,k,l) ROW2(a,b,c,d,e,f,g,h,i,j,k,l), \
51 ROW2(a,b,c,d,e,f,g,h,i,j,k,l), ROW2(a,b,c,d,e,f,g,h,i,j,k,l), \
52 ROW2(a,b,c,d,e,f,g,h,i,j,k,l)
53
54 static const BYTE empty_bits[48*48/8];
55
56 static const BYTE icon_bits[32*32/8] =
57 {
58 ROW32(0,0,0,0,0,0,0,0),
59 ROW32(0,0,1,1,1,1,0,0),
60 ROW32(0,1,1,1,1,1,1,0),
61 ROW32(0,1,1,0,0,1,1,0),
62 ROW32(0,1,1,0,0,1,1,0),
63 ROW32(0,1,1,1,1,1,1,0),
64 ROW32(0,0,1,1,1,1,0,0),
65 ROW32(0,0,0,0,0,0,0,0)
66 };
67
68 static const BYTE bitmap_bits[48*48/8] =
69 {
70 ROW48(0,0,0,0,0,0,0,0,0,0,0,0),
71 ROW48(0,1,1,1,1,1,1,1,1,1,1,0),
72 ROW48(0,1,1,0,0,0,0,0,0,1,1,0),
73 ROW48(0,1,0,0,0,0,0,0,1,0,1,0),
74 ROW48(0,1,0,0,0,0,0,1,0,0,1,0),
75 ROW48(0,1,0,0,0,0,1,0,0,0,1,0),
76 ROW48(0,1,0,0,0,1,0,0,0,0,1,0),
77 ROW48(0,1,0,0,1,0,0,0,0,0,1,0),
78 ROW48(0,1,0,1,0,0,0,0,0,0,1,0),
79 ROW48(0,1,1,0,0,0,0,0,0,1,1,0),
80 ROW48(0,1,1,1,1,1,1,1,1,1,1,0),
81 ROW48(0,0,0,0,0,0,0,0,0,0,0,0)
82 };
83
84 static HIMAGELIST createImageList(int cx, int cy)
85 {
86 /* Create an ImageList and put an image into it */
87 HIMAGELIST himl = ImageList_Create(cx, cy, ILC_COLOR, 1, 1);
88 HBITMAP hbm = CreateBitmap(48, 48, 1, 1, bitmap_bits);
89 ImageList_Add(himl, hbm, NULL);
90 return himl;
91 }
92
93 static HWND create_a_window(void)
94 {
95 char className[] = "bmwnd";
96 char winName[] = "Test Bitmap";
97 HWND hWnd;
98 static int registered = 0;
99
100 if (!registered)
101 {
102 WNDCLASSA cls;
103
104 cls.style = CS_HREDRAW | CS_VREDRAW | CS_GLOBALCLASS;
105 cls.lpfnWndProc = DefWindowProcA;
106 cls.cbClsExtra = 0;
107 cls.cbWndExtra = 0;
108 cls.hInstance = 0;
109 cls.hIcon = LoadIconA (0, (LPSTR)IDI_APPLICATION);
110 cls.hCursor = LoadCursorA (0, (LPSTR)IDC_ARROW);
111 cls.hbrBackground = (HBRUSH) GetStockObject (WHITE_BRUSH);
112 cls.lpszMenuName = 0;
113 cls.lpszClassName = className;
114
115 RegisterClassA (&cls);
116 registered = 1;
117 }
118
119 /* Setup window */
120 hWnd = CreateWindowA (className, winName,
121 WS_OVERLAPPEDWINDOW ,
122 CW_USEDEFAULT, CW_USEDEFAULT, 300, 300, 0,
123 0, hinst, 0);
124
125 #ifdef VISIBLE
126 ShowWindow (hWnd, SW_SHOW);
127 #endif
128 REDRAW(hWnd);
129 WAIT;
130
131 return hWnd;
132 }
133
134 static HDC show_image(HWND hwnd, HIMAGELIST himl, int idx, int size,
135 LPCSTR loc, BOOL clear)
136 {
137 HDC hdc = NULL;
138 #ifdef VISIBLE
139 if (!himl) return NULL;
140
141 SetWindowText(hwnd, loc);
142 hdc = GetDC(hwnd);
143 ImageList_Draw(himl, idx, hdc, 0, 0, ILD_TRANSPARENT);
144
145 REDRAW(hwnd);
146 WAIT;
147
148 if (clear)
149 {
150 BitBlt(hdc, 0, 0, size, size, hdc, size+1, size+1, SRCCOPY);
151 ReleaseDC(hwnd, hdc);
152 hdc = NULL;
153 }
154 #endif /* VISIBLE */
155 return hdc;
156 }
157
158 /* Useful for checking differences */
159 #if 0
160 static void dump_bits(const BYTE *p, const BYTE *q, int size)
161 {
162 int i, j;
163
164 size /= 8;
165
166 for (i = 0; i < size * 2; i++)
167 {
168 printf("|");
169 for (j = 0; j < size; j++)
170 printf("%c%c", p[j] & 0xf0 ? 'X' : ' ', p[j] & 0xf ? 'X' : ' ');
171 printf(" -- ");
172 for (j = 0; j < size; j++)
173 printf("%c%c", q[j] & 0xf0 ? 'X' : ' ', q[j] & 0xf ? 'X' : ' ');
174 printf("|\n");
175 p += size * 4;
176 q += size * 4;
177 }
178 printf("\n");
179 }
180 #endif
181
182 static void check_bits(HWND hwnd, HIMAGELIST himl, int idx, int size,
183 const BYTE *checkbits, LPCSTR loc)
184 {
185 #ifdef VISIBLE
186 BYTE bits[100*100/8];
187 COLORREF c;
188 HDC hdc;
189 int x, y, i = -1;
190
191 if (!himl) return;
192
193 memset(bits, 0, sizeof(bits));
194 hdc = show_image(hwnd, himl, idx, size, loc, FALSE);
195
196 c = GetPixel(hdc, 0, 0);
197
198 for (y = 0; y < size; y ++)
199 {
200 for (x = 0; x < size; x++)
201 {
202 if (!(x & 0x7)) i++;
203 if (GetPixel(hdc, x, y) != c) bits[i] |= (0x80 >> (x & 0x7));
204 }
205 }
206
207 BitBlt(hdc, 0, 0, size, size, hdc, size+1, size+1, SRCCOPY);
208 ReleaseDC(hwnd, hdc);
209
210 ok (memcmp(bits, checkbits, (size * size)/8) == 0,
211 "%s: bits different\n", loc);
212 if (memcmp(bits, checkbits, (size * size)/8))
213 dump_bits(bits, checkbits, size);
214 #endif /* VISIBLE */
215 }
216
217 static void testHotspot (void)
218 {
219 struct hotspot {
220 int dx;
221 int dy;
222 };
223
224 #define SIZEX1 47
225 #define SIZEY1 31
226 #define SIZEX2 11
227 #define SIZEY2 17
228 #define HOTSPOTS_MAX 4 /* Number of entries in hotspots */
229 static const struct hotspot hotspots[HOTSPOTS_MAX] = {
230 { 10, 7 },
231 { SIZEX1, SIZEY1 },
232 { -9, -8 },
233 { -7, 35 }
234 };
235 int i, j, ret;
236 HIMAGELIST himl1 = createImageList(SIZEX1, SIZEY1);
237 HIMAGELIST himl2 = createImageList(SIZEX2, SIZEY2);
238 HWND hwnd = create_a_window();
239
240
241 for (i = 0; i < HOTSPOTS_MAX; i++) {
242 for (j = 0; j < HOTSPOTS_MAX; j++) {
243 int dx1 = hotspots[i].dx;
244 int dy1 = hotspots[i].dy;
245 int dx2 = hotspots[j].dx;
246 int dy2 = hotspots[j].dy;
247 int correctx, correcty, newx, newy;
248 char loc[256];
249 HIMAGELIST himlNew;
250 POINT ppt;
251
252 ret = ImageList_BeginDrag(himl1, 0, dx1, dy1);
253 ok(ret != 0, "BeginDrag failed for { %d, %d }\n", dx1, dy1);
254 sprintf(loc, "BeginDrag (%d,%d)\n", i, j);
255 show_image(hwnd, himl1, 0, max(SIZEX1, SIZEY1), loc, TRUE);
256
257 /* check merging the dragged image with a second image */
258 ret = ImageList_SetDragCursorImage(himl2, 0, dx2, dy2);
259 ok(ret != 0, "SetDragCursorImage failed for {%d, %d}{%d, %d}\n",
260 dx1, dy1, dx2, dy2);
261 sprintf(loc, "SetDragCursorImage (%d,%d)\n", i, j);
262 show_image(hwnd, himl2, 0, max(SIZEX2, SIZEY2), loc, TRUE);
263
264 /* check new hotspot, it should be the same like the old one */
265 himlNew = ImageList_GetDragImage(NULL, &ppt);
266 ok(ppt.x == dx1 && ppt.y == dy1,
267 "Expected drag hotspot [%d,%d] got [%ld,%ld]\n",
268 dx1, dy1, ppt.x, ppt.y);
269 /* check size of new dragged image */
270 ImageList_GetIconSize(himlNew, &newx, &newy);
271 correctx = max(SIZEX1, max(SIZEX2 + dx2, SIZEX1 - dx2));
272 correcty = max(SIZEY1, max(SIZEY2 + dy2, SIZEY1 - dy2));
273 ok(newx == correctx && newy == correcty,
274 "Expected drag image size [%d,%d] got [%d,%d]\n",
275 correctx, correcty, newx, newy);
276 sprintf(loc, "GetDragImage (%d,%d)\n", i, j);
277 show_image(hwnd, himlNew, 0, max(correctx, correcty), loc, TRUE);
278 ImageList_EndDrag();
279 }
280 }
281 #undef SIZEX1
282 #undef SIZEY1
283 #undef SIZEX2
284 #undef SIZEY2
285 #undef HOTSPOTS_MAX
286 DestroyWindow(hwnd);
287 }
288
289 static BOOL DoTest1(void)
290 {
291 HIMAGELIST himl ;
292
293 HICON hicon1 ;
294 HICON hicon2 ;
295 HICON hicon3 ;
296
297 /* create an imagelist to play with */
298 himl = ImageList_Create(84,84,0x10,0,3);
299 ok(himl!=0,"failed to create imagelist\n");
300
301 /* load the icons to add to the image list */
302 hicon1 = CreateIcon(hinst, 32, 32, 1, 1, icon_bits, icon_bits);
303 ok(hicon1 != 0, "no hicon1\n");
304 hicon2 = CreateIcon(hinst, 32, 32, 1, 1, icon_bits, icon_bits);
305 ok(hicon2 != 0, "no hicon2\n");
306 hicon3 = CreateIcon(hinst, 32, 32, 1, 1, icon_bits, icon_bits);
307 ok(hicon3 != 0, "no hicon3\n");
308
309 /* remove when nothing exists */
310 ok(!ImageList_Remove(himl,0),"removed nonexistent icon\n");
311 /* removing everything from an empty imagelist should succeed */
312 ok(ImageList_RemoveAll(himl),"removed nonexistent icon\n");
313
314 /* add three */
315 ok(0==ImageList_AddIcon(himl, hicon1),"failed to add icon1\n");
316 ok(1==ImageList_AddIcon(himl, hicon2),"failed to add icon2\n");
317 ok(2==ImageList_AddIcon(himl, hicon3),"failed to add icon3\n");
318
319 /* remove an index out of range */
320 ok(!ImageList_Remove(himl,4711),"removed nonexistent icon\n");
321
322 /* remove three */
323 ok(ImageList_Remove(himl,0),"can't remove 0\n");
324 ok(ImageList_Remove(himl,0),"can't remove 0\n");
325 ok(ImageList_Remove(himl,0),"can't remove 0\n");
326
327 /* remove one extra */
328 ok(!ImageList_Remove(himl,0),"removed nonexistent icon\n");
329
330 /* destroy it */
331 ok(ImageList_Destroy(himl),"destroy imagelist failed\n");
332
333 /* icons should be deleted by the imagelist */
334 ok(!DeleteObject(hicon1),"icon 1 wasn't deleted\n");
335 ok(!DeleteObject(hicon2),"icon 2 wasn't deleted\n");
336 ok(!DeleteObject(hicon3),"icon 3 wasn't deleted\n");
337
338 return TRUE;
339 }
340
341 static BOOL DoTest2(void)
342 {
343 HIMAGELIST himl ;
344
345 HICON hicon1 ;
346 HICON hicon2 ;
347 HICON hicon3 ;
348
349 /* create an imagelist to play with */
350 himl = ImageList_Create(84,84,0x10,0,3);
351 ok(himl!=0,"failed to create imagelist\n");
352
353 /* load the icons to add to the image list */
354 hicon1 = CreateIcon(hinst, 32, 32, 1, 1, icon_bits, icon_bits);
355 ok(hicon1 != 0, "no hicon1\n");
356 hicon2 = CreateIcon(hinst, 32, 32, 1, 1, icon_bits, icon_bits);
357 ok(hicon2 != 0, "no hicon2\n");
358 hicon3 = CreateIcon(hinst, 32, 32, 1, 1, icon_bits, icon_bits);
359 ok(hicon3 != 0, "no hicon3\n");
360
361 /* add three */
362 ok(0==ImageList_AddIcon(himl, hicon1),"failed to add icon1\n");
363 ok(1==ImageList_AddIcon(himl, hicon2),"failed to add icon2\n");
364 ok(2==ImageList_AddIcon(himl, hicon3),"failed to add icon3\n");
365
366 /* destroy it */
367 ok(ImageList_Destroy(himl),"destroy imagelist failed\n");
368
369 /* icons should be deleted by the imagelist */
370 ok(!DeleteObject(hicon1),"icon 1 wasn't deleted\n");
371 ok(!DeleteObject(hicon2),"icon 2 wasn't deleted\n");
372 ok(!DeleteObject(hicon3),"icon 3 wasn't deleted\n");
373
374 return TRUE;
375 }
376
377 static BOOL DoTest3(void)
378 {
379 HIMAGELIST himl;
380
381 HBITMAP hbm1;
382 HBITMAP hbm2;
383 HBITMAP hbm3;
384
385 IMAGELISTDRAWPARAMS imldp;
386 HDC hdc;
387 HWND hwndfortest;
388
389 if (!pImageList_DrawIndirect)
390 {
391 HMODULE hComCtl32 = LoadLibraryA("comctl32.dll");
392 pImageList_DrawIndirect = (void*)GetProcAddress(hComCtl32, "ImageList_DrawIndirect");
393 if (!pImageList_DrawIndirect)
394 {
395 trace("ImageList_DrawIndirect not available, skipping test\n");
396 return TRUE;
397 }
398 }
399
400 hwndfortest = create_a_window();
401 hdc = GetDC(hwndfortest);
402 ok(hdc!=NULL, "couldn't get DC\n");
403
404 /* create an imagelist to play with */
405 himl = ImageList_Create(48,48,0x10,0,3);
406 ok(himl!=0,"failed to create imagelist\n");
407
408 /* load the icons to add to the image list */
409 hbm1 = CreateBitmap(48, 48, 1, 1, bitmap_bits);
410 ok(hbm1 != 0, "no bitmap 1\n");
411 hbm2 = CreateBitmap(48, 48, 1, 1, bitmap_bits);
412 ok(hbm2 != 0, "no bitmap 2\n");
413 hbm3 = CreateBitmap(48, 48, 1, 1, bitmap_bits);
414 ok(hbm3 != 0, "no bitmap 3\n");
415
416 /* add three */
417 ok(0==ImageList_Add(himl, hbm1, 0),"failed to add bitmap 1\n");
418 ok(1==ImageList_Add(himl, hbm2, 0),"failed to add bitmap 2\n");
419
420 ok(ImageList_SetImageCount(himl,3),"Setimage count failed\n");
421 /*ok(2==ImageList_Add(himl, hbm3, NULL),"failed to add bitmap 3\n"); */
422 ok(ImageList_Replace(himl, 2, hbm3, 0),"failed to replace bitmap 3\n");
423
424 memset(&imldp, 0, sizeof (imldp));
425 ok(!pImageList_DrawIndirect(&imldp), "zero data succeeded!\n");
426 imldp.cbSize = sizeof (imldp);
427 ok(!pImageList_DrawIndirect(&imldp), "zero hdc succeeded!\n");
428 imldp.hdcDst = hdc;
429 ok(!pImageList_DrawIndirect(&imldp),"zero himl succeeded!\n");
430 imldp.himl = himl;
431 if (!pImageList_DrawIndirect(&imldp))
432 {
433 /* Earlier versions of native comctl32 use a smaller structure */
434 imldp.cbSize -= 3 * sizeof(DWORD);
435 ok(pImageList_DrawIndirect(&imldp),"DrawIndirect should succeed\n");
436 }
437 REDRAW(hwndfortest);
438 WAIT;
439
440 imldp.fStyle = SRCCOPY;
441 imldp.rgbBk = CLR_DEFAULT;
442 imldp.rgbFg = CLR_DEFAULT;
443 imldp.y = 100;
444 imldp.x = 100;
445 ok(pImageList_DrawIndirect(&imldp),"should succeed\n");
446 imldp.i ++;
447 ok(pImageList_DrawIndirect(&imldp),"should succeed\n");
448 imldp.i ++;
449 ok(pImageList_DrawIndirect(&imldp),"should succeed\n");
450 imldp.i ++;
451 ok(!pImageList_DrawIndirect(&imldp),"should fail\n");
452
453 /* remove three */
454 ok(ImageList_Remove(himl, 0), "removing 1st bitmap\n");
455 ok(ImageList_Remove(himl, 0), "removing 2nd bitmap\n");
456 ok(ImageList_Remove(himl, 0), "removing 3rd bitmap\n");
457
458 /* destroy it */
459 ok(ImageList_Destroy(himl),"destroy imagelist failed\n");
460
461 /* bitmaps should not be deleted by the imagelist */
462 ok(DeleteObject(hbm1),"bitmap 1 can't be deleted\n");
463 ok(DeleteObject(hbm2),"bitmap 2 can't be deleted\n");
464 ok(DeleteObject(hbm3),"bitmap 3 can't be deleted\n");
465
466 ReleaseDC(hwndfortest, hdc);
467 DestroyWindow(hwndfortest);
468
469 return TRUE;
470 }
471
472 static void testMerge(void)
473 {
474 HIMAGELIST himl1, himl2, hmerge;
475 HICON hicon1;
476 HWND hwnd = create_a_window();
477
478 himl1 = ImageList_Create(32,32,0,0,3);
479 ok(himl1 != NULL,"failed to create himl1\n");
480
481 himl2 = ImageList_Create(32,32,0,0,3);
482 ok(himl2 != NULL,"failed to create himl2\n");
483
484 hicon1 = CreateIcon(hinst, 32, 32, 1, 1, icon_bits, icon_bits);
485 ok(hicon1 != NULL, "failed to create hicon1\n");
486
487 if (!himl1 || !himl2 || !hicon1)
488 return;
489
490 ok(0==ImageList_AddIcon(himl2, hicon1),"add icon1 to himl2 failed\n");
491 check_bits(hwnd, himl2, 0, 32, icon_bits, "add icon1 to himl2");
492
493 /* If himl1 has no images, merge still succeeds */
494 hmerge = ImageList_Merge(himl1, -1, himl2, 0, 0, 0);
495 ok(hmerge != NULL, "merge himl1,-1 failed\n");
496 check_bits(hwnd, hmerge, 0, 32, empty_bits, "merge himl1,-1");
497 if (hmerge) ImageList_Destroy(hmerge);
498
499 hmerge = ImageList_Merge(himl1, 0, himl2, 0, 0, 0);
500 ok(hmerge != NULL,"merge himl1,0 failed\n");
501 check_bits(hwnd, hmerge, 0, 32, empty_bits, "merge himl1,0");
502 if (hmerge) ImageList_Destroy(hmerge);
503
504 /* Same happens if himl2 is empty */
505 ImageList_Destroy(himl2);
506 himl2 = ImageList_Create(32,32,0,0,3);
507 ok(himl2 != NULL,"failed to recreate himl2\n");
508 if (!himl2)
509 return;
510
511 hmerge = ImageList_Merge(himl1, -1, himl2, -1, 0, 0);
512 ok(hmerge != NULL, "merge himl2,-1 failed\n");
513 check_bits(hwnd, hmerge, 0, 32, empty_bits, "merge himl2,-1");
514 if (hmerge) ImageList_Destroy(hmerge);
515
516 hmerge = ImageList_Merge(himl1, -1, himl2, 0, 0, 0);
517 ok(hmerge != NULL, "merge himl2,0 failed\n");
518 check_bits(hwnd, hmerge, 0, 32, empty_bits, "merge himl2,0");
519 if (hmerge) ImageList_Destroy(hmerge);
520
521 /* Now try merging an image with itself */
522 ok(0==ImageList_AddIcon(himl2, hicon1),"re-add icon1 to himl2 failed\n");
523
524 hmerge = ImageList_Merge(himl2, 0, himl2, 0, 0, 0);
525 ok(hmerge != NULL, "merge himl2 with itself failed\n");
526 check_bits(hwnd, hmerge, 0, 32, empty_bits, "merge himl2 with itself");
527 if (hmerge) ImageList_Destroy(hmerge);
528
529 /* Try merging 2 different image lists */
530 ok(0==ImageList_AddIcon(himl1, hicon1),"add icon1 to himl1 failed\n");
531
532 hmerge = ImageList_Merge(himl1, 0, himl2, 0, 0, 0);
533 ok(hmerge != NULL, "merge himl1 with himl2 failed\n");
534 check_bits(hwnd, hmerge, 0, 32, empty_bits, "merge himl1 with himl2");
535 if (hmerge) ImageList_Destroy(hmerge);
536
537 hmerge = ImageList_Merge(himl1, 0, himl2, 0, 8, 16);
538 ok(hmerge != NULL, "merge himl1 with himl2 8,16 failed\n");
539 check_bits(hwnd, hmerge, 0, 32, empty_bits, "merge himl1 with himl2, 8,16");
540 if (hmerge) ImageList_Destroy(hmerge);
541
542 ImageList_Destroy(himl1);
543 ImageList_Destroy(himl2);
544 DeleteObject(hicon1);
545 DestroyWindow(hwnd);
546 }
547
548 START_TEST(imagelist)
549 {
550 desktopDC=GetDC(NULL);
551 hinst = GetModuleHandleA(NULL);
552
553 InitCommonControls();
554
555 testHotspot();
556 DoTest1();
557 DoTest2();
558 DoTest3();
559 testMerge();
560 }