ReactOS 0.4.15-dev-7788-g1ad9096
combo.c
Go to the documentation of this file.
1/* Unit test suite for ComboBox and ComboBoxEx32 controls.
2 *
3 * Copyright 2005 Jason Edmeades
4 * Copyright 2007 Mikolaj Zalewski
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 */
20
21#include <limits.h>
22#include <stdio.h>
23#include <windows.h>
24#include <commctrl.h>
25
26#include "wine/test.h"
27#include "v6util.h"
28#include "msg.h"
29
30#define EDITBOX_SEQ_INDEX 0
31#define NUM_MSG_SEQUENCES 1
32
33#define EDITBOX_ID 0
34#define COMBO_ID 1995
35
36#define expect(expected, got) ok(got == expected, "Expected %d, got %d\n", expected, got)
37
38#define expect_rect(r, _left, _top, _right, _bottom) ok(r.left == _left && r.top == _top && \
39 r.bottom == _bottom && r.right == _right, "Invalid rect %s vs (%d,%d)-(%d,%d)\n", \
40 wine_dbgstr_rect(&r), _left, _top, _right, _bottom);
41
42
44
47static const char ComboExTestClass[] = "ComboExTestClass";
48
49static BOOL (WINAPI *pSetWindowSubclass)(HWND, SUBCLASSPROC, UINT_PTR, DWORD_PTR);
50
51#define MAX_CHARS 100
52static char *textBuffer = NULL;
53
55
57{
58 BOOL ret;
59
60 info->cbSize = sizeof(*info);
62 ok(ret, "Failed to get combobox info structure, error %d\n", GetLastError());
63}
64
66 return CreateWindowExA(0, WC_COMBOBOXEXA, NULL, style, 0, 0, 300, 300,
68}
69
70static LONG addItem(HWND cbex, int idx, const char *text) {
71 COMBOBOXEXITEMA cbexItem;
72 memset(&cbexItem, 0x00, sizeof(cbexItem));
73 cbexItem.mask = CBEIF_TEXT;
74 cbexItem.iItem = idx;
75 cbexItem.pszText = (char*)text;
76 cbexItem.cchTextMax = 0;
77 return SendMessageA(cbex, CBEM_INSERTITEMA, 0, (LPARAM)&cbexItem);
78}
79
80static LONG setItem(HWND cbex, int idx, const char *text) {
81 COMBOBOXEXITEMA cbexItem;
82 memset(&cbexItem, 0x00, sizeof(cbexItem));
83 cbexItem.mask = CBEIF_TEXT;
84 cbexItem.iItem = idx;
85 cbexItem.pszText = (char*)text;
86 cbexItem.cchTextMax = 0;
87 return SendMessageA(cbex, CBEM_SETITEMA, 0, (LPARAM)&cbexItem);
88}
89
90static LONG delItem(HWND cbex, int idx) {
91 return SendMessageA(cbex, CBEM_DELETEITEM, idx, 0);
92}
93
94static LONG getItem(HWND cbex, int idx, COMBOBOXEXITEMA *cbItem) {
95 memset(cbItem, 0x00, sizeof(COMBOBOXEXITEMA));
96 cbItem->mask = CBEIF_TEXT;
97 cbItem->pszText = textBuffer;
98 cbItem->iItem = idx;
99 cbItem->cchTextMax = 100;
100 return SendMessageA(cbex, CBEM_GETITEMA, 0, (LPARAM)cbItem);
101}
102
104{
106 static LONG defwndproc_counter = 0;
107 struct message msg = { 0 };
108 LRESULT ret;
109
110 msg.message = message;
111 msg.flags = sent|wparam|lparam;
112 if (defwndproc_counter) msg.flags |= defwinproc;
113 msg.wParam = wParam;
114 msg.lParam = lParam;
115 msg.id = EDITBOX_ID;
116
117 if (message != WM_PAINT &&
119 message != WM_NCPAINT &&
121 message != WM_GETTEXT &&
122 message != WM_GETICON &&
124 {
126 }
127
128 defwndproc_counter++;
130 defwndproc_counter--;
131 return ret;
132}
133
134static HWND subclass_editbox(HWND hwndComboEx)
135{
136 WNDPROC oldproc;
137 HWND hwnd;
138
139 hwnd = (HWND)SendMessageA(hwndComboEx, CBEM_GETEDITCONTROL, 0, 0);
143
144 return hwnd;
145}
146
147static void test_comboex(void)
148{
149 HWND myHwnd = 0;
150 LONG res;
151 COMBOBOXEXITEMA cbexItem;
152 static const char *first_item = "First Item",
153 *second_item = "Second Item",
154 *third_item = "Third Item",
155 *middle_item = "Between First and Second Items",
156 *replacement_item = "Between First and Second Items",
157 *out_of_range_item = "Out of Range Item";
158
159 /* Allocate space for result */
161
162 /* Basic comboboxex test */
164
165 /* Add items onto the end of the combobox */
166 res = addItem(myHwnd, -1, first_item);
167 ok(res == 0, "Adding simple item failed (%d)\n", res);
168 res = addItem(myHwnd, -1, second_item);
169 ok(res == 1, "Adding simple item failed (%d)\n", res);
170 res = addItem(myHwnd, 2, third_item);
171 ok(res == 2, "Adding simple item failed (%d)\n", res);
172 res = addItem(myHwnd, 1, middle_item);
173 ok(res == 1, "Inserting simple item failed (%d)\n", res);
174
175 /* Add an item completely out of range */
176 res = addItem(myHwnd, 99, out_of_range_item);
177 ok(res == -1, "Adding using out of range index worked unexpectedly (%d)\n", res);
178 res = addItem(myHwnd, 5, out_of_range_item);
179 ok(res == -1, "Adding using out of range index worked unexpectedly (%d)\n", res);
180 /* Removed: Causes traps on Windows XP
181 res = addItem(myHwnd, -2, "Out Of Range Item");
182 ok(res == -1, "Adding out of range worked unexpectedly (%ld)\n", res);
183 */
184
185 /* Get an item completely out of range */
186 res = getItem(myHwnd, 99, &cbexItem);
187 ok(res == 0, "Getting item using out of range index worked unexpectedly (%d, %s)\n", res, cbexItem.pszText);
188 res = getItem(myHwnd, 4, &cbexItem);
189 ok(res == 0, "Getting item using out of range index worked unexpectedly (%d, %s)\n", res, cbexItem.pszText);
190 res = getItem(myHwnd, -2, &cbexItem);
191 ok(res == 0, "Getting item using out of range index worked unexpectedly (%d, %s)\n", res, cbexItem.pszText);
192
193 /* Get an item in range */
194 res = getItem(myHwnd, 0, &cbexItem);
195 ok(res != 0, "Getting item using valid index failed unexpectedly (%d)\n", res);
196 ok(strcmp(first_item, cbexItem.pszText) == 0, "Getting item returned wrong string (%s)\n", cbexItem.pszText);
197
198 res = getItem(myHwnd, 1, &cbexItem);
199 ok(res != 0, "Getting item using valid index failed unexpectedly (%d)\n", res);
200 ok(strcmp(middle_item, cbexItem.pszText) == 0, "Getting item returned wrong string (%s)\n", cbexItem.pszText);
201
202 res = getItem(myHwnd, 2, &cbexItem);
203 ok(res != 0, "Getting item using valid index failed unexpectedly (%d)\n", res);
204 ok(strcmp(second_item, cbexItem.pszText) == 0, "Getting item returned wrong string (%s)\n", cbexItem.pszText);
205
206 res = getItem(myHwnd, 3, &cbexItem);
207 ok(res != 0, "Getting item using valid index failed unexpectedly (%d)\n", res);
208 ok(strcmp(third_item, cbexItem.pszText) == 0, "Getting item returned wrong string (%s)\n", cbexItem.pszText);
209
210 /* Set an item completely out of range */
211 res = setItem(myHwnd, 99, replacement_item);
212 ok(res == 0, "Setting item using out of range index worked unexpectedly (%d)\n", res);
213 res = setItem(myHwnd, 4, replacement_item);
214 ok(res == 0, "Setting item using out of range index worked unexpectedly (%d)\n", res);
215 res = setItem(myHwnd, -2, replacement_item);
216 ok(res == 0, "Setting item using out of range index worked unexpectedly (%d)\n", res);
217
218 /* Set an item in range */
219 res = setItem(myHwnd, 0, replacement_item);
220 ok(res != 0, "Setting first item failed (%d)\n", res);
221 res = setItem(myHwnd, 3, replacement_item);
222 ok(res != 0, "Setting last item failed (%d)\n", res);
223
224 /* Remove items completely out of range (4 items in control at this point) */
225 res = delItem(myHwnd, -1);
226 ok(res == CB_ERR, "Deleting using out of range index worked unexpectedly (%d)\n", res);
227 res = delItem(myHwnd, 4);
228 ok(res == CB_ERR, "Deleting using out of range index worked unexpectedly (%d)\n", res);
229
230 /* Remove items in range (4 items in control at this point) */
231 res = delItem(myHwnd, 3);
232 ok(res == 3, "Deleting using out of range index failed (%d)\n", res);
233 res = delItem(myHwnd, 0);
234 ok(res == 2, "Deleting using out of range index failed (%d)\n", res);
235 res = delItem(myHwnd, 0);
236 ok(res == 1, "Deleting using out of range index failed (%d)\n", res);
237 res = delItem(myHwnd, 0);
238 ok(res == 0, "Deleting using out of range index failed (%d)\n", res);
239
240 /* Remove from an empty box */
241 res = delItem(myHwnd, 0);
242 ok(res == CB_ERR, "Deleting using out of range index worked unexpectedly (%d)\n", res);
243
244
245 /* Cleanup */
247 DestroyWindow(myHwnd);
248}
249
251{
252 HWND hComboEx, hCombo, hEdit, hList;
253 COMBOBOXINFO cbInfo;
254 UINT x, y, item_height;
256 UINT i;
257 int idx;
258 RECT rect;
259 WCHAR buffer[3];
260 static const UINT choices[] = {8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72};
261 static const WCHAR stringFormat[] = {'%','2','d','\0'};
262
263 hComboEx = CreateWindowExA(0, WC_COMBOBOXEXA, NULL,
264 WS_VISIBLE|WS_CHILD|CBS_DROPDOWN, 0, 0, 200, 150,
266
267 for (i = 0; i < ARRAY_SIZE(choices); i++){
268 COMBOBOXEXITEMW cbexItem;
269 wsprintfW(buffer, stringFormat, choices[i]);
270
271 memset(&cbexItem, 0x00, sizeof(cbexItem));
272 cbexItem.mask = CBEIF_TEXT;
273 cbexItem.iItem = i;
274 cbexItem.pszText = buffer;
275 cbexItem.cchTextMax = 0;
276 ok(SendMessageW(hComboEx, CBEM_INSERTITEMW, 0, (LPARAM)&cbexItem) >= 0,
277 "Failed to add item %d\n", i);
278 }
279
280 hCombo = (HWND)SendMessageA(hComboEx, CBEM_GETCOMBOCONTROL, 0, 0);
281 hEdit = (HWND)SendMessageA(hComboEx, CBEM_GETEDITCONTROL, 0, 0);
282
283 get_combobox_info(hCombo, &cbInfo);
284 hList = cbInfo.hwndList;
285
287 "Focus not on Main Window, instead on %p\n", GetFocus());
288
289 /* Click on the button to drop down the list */
290 x = cbInfo.rcButton.left + (cbInfo.rcButton.right-cbInfo.rcButton.left)/2;
291 y = cbInfo.rcButton.top + (cbInfo.rcButton.bottom-cbInfo.rcButton.top)/2;
293 ok(result, "WM_LBUTTONDOWN was not processed. LastError=%d\n",
294 GetLastError());
295 ok(GetFocus() == hCombo ||
296 broken(GetFocus() != hCombo), /* win98 */
297 "Focus not on ComboBoxEx's ComboBox Control, instead on %p\n",
298 GetFocus());
299 ok(SendMessageA(hComboEx, CB_GETDROPPEDSTATE, 0, 0),
300 "The dropdown list should have appeared after clicking the button.\n");
301 idx = SendMessageA(hCombo, CB_GETTOPINDEX, 0, 0);
302 ok(idx == 0, "For TopIndex expected %d, got %d\n", 0, idx);
303
304 result = SendMessageA(hCombo, WM_LBUTTONUP, 0, MAKELPARAM(x, y));
305 ok(result, "WM_LBUTTONUP was not processed. LastError=%d\n",
306 GetLastError());
307 ok(GetFocus() == hCombo ||
308 broken(GetFocus() != hCombo), /* win98 */
309 "Focus not on ComboBoxEx's ComboBox Control, instead on %p\n",
310 GetFocus());
311
312 /* Click on the 5th item in the list */
313 item_height = SendMessageA(hCombo, CB_GETITEMHEIGHT, 0, 0);
314 ok(GetClientRect(hList, &rect), "Failed to get list's client rect.\n");
315 x = rect.left + (rect.right-rect.left)/2;
316 y = item_height/2 + item_height*4;
318 ok(!result, "WM_MOUSEMOVE was not processed. LastError=%d\n",
319 GetLastError());
320 ok(GetFocus() == hCombo ||
321 broken(GetFocus() != hCombo), /* win98 */
322 "Focus not on ComboBoxEx's ComboBox Control, instead on %p\n",
323 GetFocus());
324
326 ok(!result, "WM_LBUTTONDOWN was not processed. LastError=%d\n",
327 GetLastError());
328 ok(GetFocus() == hCombo ||
329 broken(GetFocus() != hCombo), /* win98 */
330 "Focus not on ComboBoxEx's ComboBox Control, instead on %p\n",
331 GetFocus());
332 ok(SendMessageA(hComboEx, CB_GETDROPPEDSTATE, 0, 0),
333 "The dropdown list should still be visible.\n");
334
336 ok(!result, "WM_LBUTTONUP was not processed. LastError=%d\n",
337 GetLastError());
338 todo_wine ok(GetFocus() == hEdit ||
339 broken(GetFocus() == hCombo), /* win98 */
340 "Focus not on ComboBoxEx's Edit Control, instead on %p\n",
341 GetFocus());
342
343 result = SendMessageA(hCombo, CB_GETDROPPEDSTATE, 0, 0);
344 ok(!result ||
345 broken(result != 0), /* win98 */
346 "The dropdown list should have been rolled up.\n");
347 idx = SendMessageA(hComboEx, CB_GETCURSEL, 0, 0);
348 ok(idx == 4 ||
349 broken(idx == -1), /* win98 */
350 "Current Selection: expected %d, got %d\n", 4, idx);
351 ok(received_end_edit, "Expected to receive a CBEN_ENDEDIT message\n");
352
354 ok( GetFocus() == hComboExParentWnd, "got %p\n", GetFocus() );
355 SetFocus( hComboEx );
356 ok( GetFocus() == hEdit, "got %p\n", GetFocus() );
357
358 DestroyWindow(hComboEx);
359}
360
362{
363 HWND hCombo;
364 CHAR buff[1];
366 LRESULT ret;
367
369
370 /* set text to null */
371 addItem(hCombo, 0, NULL);
372
373 buff[0] = 'a';
374 item.mask = CBEIF_TEXT;
375 item.iItem = 0;
376 item.pszText = buff;
377 item.cchTextMax = 1;
378 ret = SendMessageA(hCombo, CBEM_GETITEMA, 0, (LPARAM)&item);
379 ok(ret != 0, "CBEM_GETITEM failed\n");
380 ok(buff[0] == 0, "\n");
381
382 ret = SendMessageA(hCombo, CB_GETLBTEXTLEN, 0, 0);
383 ok(ret == 0, "Expected zero length\n");
384
385 ret = SendMessageA(hCombo, CB_GETLBTEXTLEN, 0, 0);
386 ok(ret == 0, "Expected zero length\n");
387
388 buff[0] = 'a';
389 ret = SendMessageA(hCombo, CB_GETLBTEXT, 0, (LPARAM)buff);
390 ok(ret == 0, "Expected zero length\n");
391 ok(buff[0] == 0, "Expected null terminator as a string, got %s\n", buff);
392
393 DestroyWindow(hCombo);
394}
395
397{
398 HWND hCombo;
399 WINDOWPOS wp;
400 RECT rect;
401 int combo_height;
402 int ret;
403
405 ok(hCombo != NULL, "createComboEx failed\n");
406 ret = GetWindowRect(hCombo, &rect);
407 ok(ret, "GetWindowRect failed\n");
408 combo_height = rect.bottom - rect.top;
409 ok(combo_height > 0, "wrong combo height\n");
410
411 /* Test height > combo_height */
412 wp.x = rect.left;
413 wp.y = rect.top;
414 wp.cx = (rect.right - rect.left);
415 wp.cy = combo_height * 2;
416 wp.flags = 0;
417 wp.hwnd = hCombo;
419
420 ret = SendMessageA(hCombo, WM_WINDOWPOSCHANGING, 0, (LPARAM)&wp);
421 ok(ret == 0, "expected 0, got %x\n", ret);
422 ok(wp.cy == combo_height,
423 "Expected height %d, got %d\n", combo_height, wp.cy);
424
425 /* Test height < combo_height */
426 wp.x = rect.left;
427 wp.y = rect.top;
428 wp.cx = (rect.right - rect.left);
429 wp.cy = combo_height / 2;
430 wp.flags = 0;
431 wp.hwnd = hCombo;
433
434 ret = SendMessageA(hCombo, WM_WINDOWPOSCHANGING, 0, (LPARAM)&wp);
435 ok(ret == 0, "expected 0, got %x\n", ret);
436 ok(wp.cy == combo_height,
437 "Expected height %d, got %d\n", combo_height, wp.cy);
438
439 ret = DestroyWindow(hCombo);
440 ok(ret, "DestroyWindow failed\n");
441}
442
444{
445 NMHDR *hdr = (NMHDR*)lParam;
446 switch(hdr->code){
447 case CBEN_ENDEDITA:
448 {
449 NMCBEENDEDITA *edit_info = (NMCBEENDEDITA*)hdr;
450 if(edit_info->iWhy==CBENF_DROPDOWN){
452 }
453 break;
454 }
455 case CBEN_ENDEDITW:
456 {
457 NMCBEENDEDITW *edit_info = (NMCBEENDEDITW*)hdr;
458 if(edit_info->iWhy==CBENF_DROPDOWN){
460 }
461 break;
462 }
463 }
464 return 0;
465}
466
468{
469 switch(msg) {
470
471 case WM_DESTROY:
473 break;
474 case WM_NOTIFY:
476 default:
478 }
479
480 return 0L;
481}
482
483static void init_functions(void)
484{
485 HMODULE hComCtl32 = LoadLibraryA("comctl32.dll");
486
487#define X(f) p##f = (void*)GetProcAddress(hComCtl32, #f);
488#define X2(f, ord) p##f = (void*)GetProcAddress(hComCtl32, (const char *)ord);
489 X2(SetWindowSubclass, 410);
490#undef X
491#undef X2
492}
493
494static BOOL init(void)
495{
496 WNDCLASSA wc;
497
499 wc.cbClsExtra = 0;
500 wc.cbWndExtra = 0;
502 wc.hIcon = NULL;
505 wc.lpszMenuName = NULL;
508 RegisterClassA(&wc);
509
510 hMainWnd = CreateWindowA(WC_STATICA, "Test", WS_OVERLAPPEDWINDOW, 10, 10, 300, 300, NULL, NULL, NULL, 0);
512
515 ok(hComboExParentWnd != NULL, "failed to create parent window\n");
516
518
519 return hComboExParentWnd != NULL;
520}
521
522static void cleanup(void)
523{
524 MSG msg;
525
527 while (GetMessageA(&msg,0,0,0)) {
530 }
531
534
536}
537
538static void test_comboex_subclass(void)
539{
540 HWND hComboEx, hCombo, hEdit;
541
543
544 hCombo = (HWND)SendMessageA(hComboEx, CBEM_GETCOMBOCONTROL, 0, 0);
545 ok(hCombo != NULL, "Failed to get internal combo\n");
546 hEdit = (HWND)SendMessageA(hComboEx, CBEM_GETEDITCONTROL, 0, 0);
547 ok(hEdit != NULL, "Failed to get internal edit\n");
548
549 if (pSetWindowSubclass)
550 {
551 ok(GetPropA(hCombo, "CC32SubclassInfo") != NULL, "Expected CC32SubclassInfo property\n");
552 ok(GetPropA(hEdit, "CC32SubclassInfo") != NULL, "Expected CC32SubclassInfo property\n");
553 }
554
555 DestroyWindow(hComboEx);
556}
557
558static const struct message test_setitem_edit_seq[] = {
559 { WM_SETTEXT, sent|id, 0, 0, EDITBOX_ID },
560 { EM_SETSEL, sent|id|wparam|lparam, 0, 0, EDITBOX_ID },
561 { EM_SETSEL, sent|id|wparam|lparam, 0, -1, EDITBOX_ID },
562 { 0 }
563};
564
566{
567 char textA[] = "test";
568 HWND hComboEx;
570 BOOL ret;
571
573
574 subclass_editbox(hComboEx);
575
577
578 memset(&item, 0, sizeof(item));
579 item.mask = CBEIF_TEXT;
580 item.pszText = textA;
581 item.iItem = -1;
582 ret = SendMessageA(hComboEx, CBEM_SETITEMA, 0, (LPARAM)&item);
583 expect(TRUE, ret);
584
586
587 /* get/set lParam */
588 item.mask = CBEIF_LPARAM;
589 item.iItem = -1;
590 item.lParam = 0xdeadbeef;
591 ret = SendMessageA(hComboEx, CBEM_GETITEMA, 0, (LPARAM)&item);
592 expect(TRUE, ret);
593 ok(item.lParam == 0, "Expected zero, got %lx\n", item.lParam);
594
595 item.lParam = 0x1abe11ed;
596 ret = SendMessageA(hComboEx, CBEM_SETITEMA, 0, (LPARAM)&item);
597 expect(TRUE, ret);
598
599 item.lParam = 0;
600 ret = SendMessageA(hComboEx, CBEM_GETITEMA, 0, (LPARAM)&item);
601 expect(TRUE, ret);
602 ok(item.lParam == 0x1abe11ed, "Expected 0x1abe11ed, got %lx\n", item.lParam);
603
604 DestroyWindow(hComboEx);
605}
606
608{
609 return CreateWindowA(WC_COMBOBOXA, "Combo", WS_VISIBLE|WS_CHILD|style, 5, 5, 100, 100, hMainWnd, (HMENU)COMBO_ID, NULL, 0);
610}
611
613{
615 HFONT hFontOld;
616 HDC hDC;
617
619 hFontOld = SelectObject(hDC, hFont);
621 SelectObject(hDC, hFontOld);
622 DeleteDC(hDC);
623
624 return tm.tmHeight;
625}
626
628{
629 HWND hCombo = create_combobox(style);
630 RECT r;
631 int i;
632
633 GetClientRect(hCombo, &r);
637 todo_wine expect_rect(r, 5, 5, 105, 105);
638
639 for (i = 1; i < 30; i++)
640 {
641 SendMessageA(hCombo, CB_SETITEMHEIGHT, -1, i);
642 GetClientRect(hCombo, &r);
643 ok((r.bottom - r.top) == (i + 6), "Unexpected client rect height.\n");
644 }
645
646 DestroyWindow(hCombo);
647}
648
650{
651 HFONT hFont1, hFont2;
652 HWND hCombo;
653 RECT r;
654 int i;
655
656 hCombo = create_combobox(style);
659
660 GetClientRect(hCombo, &r);
664 todo_wine expect_rect(r, 5, 5, 105, 105);
665
666 /* The size of the dropped control is initially equal to the size
667 of the window when it was created. The size of the calculated
668 dropped area changes only by how much the selection area
669 changes, not by how much the list area changes. */
670 if (font_height(hFont1) == 10 && font_height(hFont2) == 8)
671 {
672 SendMessageA(hCombo, WM_SETFONT, (WPARAM)hFont1, FALSE);
673 GetClientRect(hCombo, &r);
674 expect_rect(r, 0, 0, 100, 18);
678
679 SendMessageA(hCombo, WM_SETFONT, (WPARAM)hFont2, FALSE);
680 GetClientRect(hCombo, &r);
681 expect_rect(r, 0, 0, 100, 16);
685
686 SendMessageA(hCombo, WM_SETFONT, (WPARAM)hFont1, FALSE);
687 GetClientRect(hCombo, &r);
688 expect_rect(r, 0, 0, 100, 18);
692 }
693 else
694 {
695 ok(0, "Expected Marlett font heights 10/8, got %d/%d\n",
696 font_height(hFont1), font_height(hFont2));
697 }
698
699 for (i = 1; i < 30; i++)
700 {
702 int height = font_height(hFont);
703
705 GetClientRect(hCombo, &r);
706 ok((r.bottom - r.top) == (height + 8), "Unexpected client rect height.\n");
707 SendMessageA(hCombo, WM_SETFONT, 0, FALSE);
709 }
710
711 DestroyWindow(hCombo);
712 DeleteObject(hFont1);
713 DeleteObject(hFont2);
714}
715
716static LRESULT (CALLBACK *old_parent_proc)(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam);
720
722{
723 switch (msg)
724 {
725 case WM_COMMAND:
726 switch (wparam)
727 {
729 {
730 HWND hCombo = (HWND)lparam;
731 char list[20], edit[20];
732 int idx;
733
734 memset(list, 0, sizeof(list));
735 memset(edit, 0, sizeof(edit));
736
737 idx = SendMessageA(hCombo, CB_GETCURSEL, 0, 0);
739 SendMessageA(hCombo, WM_GETTEXT, sizeof(edit), (LPARAM)edit);
740
741 ok(!strcmp(edit, expected_edit_text), "edit: got %s, expected %s\n",
742 edit, expected_edit_text);
743 ok(!strcmp(list, expected_list_text), "list: got %s, expected %s\n",
745
747 }
748 break;
749 }
750 break;
751 }
752
753 return CallWindowProcA(old_parent_proc, hwnd, msg, wparam, lparam);
754}
755
756static void test_selection(DWORD style, const char * const text[], const int *edit, const int *list)
757{
758 HWND hCombo;
759 INT idx;
760
761 hCombo = create_combobox(style);
762
763 SendMessageA(hCombo, CB_ADDSTRING, 0, (LPARAM)text[0]);
764 SendMessageA(hCombo, CB_ADDSTRING, 0, (LPARAM)text[1]);
765 SendMessageA(hCombo, CB_SETCURSEL, -1, 0);
766
768
769 idx = SendMessageA(hCombo, CB_GETCURSEL, 0, 0);
770 ok(idx == -1, "expected selection -1, got %d\n", idx);
771
772 /* keyboard navigation */
773
775 expected_edit_text = text[edit[0]];
777 SendMessageA(hCombo, WM_KEYDOWN, VK_DOWN, 0);
778 ok(selchange_fired, "CBN_SELCHANGE not sent!\n");
779
781 expected_edit_text = text[edit[1]];
783 SendMessageA(hCombo, WM_KEYDOWN, VK_DOWN, 0);
784 ok(selchange_fired, "CBN_SELCHANGE not sent!\n");
785
787 expected_edit_text = text[edit[2]];
789 SendMessageA(hCombo, WM_KEYDOWN, VK_UP, 0);
790 ok(selchange_fired, "CBN_SELCHANGE not sent!\n");
791
792 /* programmatic navigation */
793
795 expected_edit_text = text[edit[3]];
797 SendMessageA(hCombo, CB_SETCURSEL, list[3], 0);
798 ok(!selchange_fired, "CBN_SELCHANGE sent!\n");
799
801 expected_edit_text = text[edit[4]];
803 SendMessageA(hCombo, CB_SETCURSEL, list[4], 0);
804 ok(!selchange_fired, "CBN_SELCHANGE sent!\n");
805
807 DestroyWindow(hCombo);
808}
809
811{
812 static const char * const text[] = { "alpha", "beta", "" };
813 static const int sel_1[] = { 2, 0, 1, 0, 1 };
814 static const int sel_2[] = { 0, 1, 0, 0, 1 };
815
816 test_selection(CBS_SIMPLE, text, sel_1, sel_2);
817 test_selection(CBS_DROPDOWN, text, sel_1, sel_2);
818 test_selection(CBS_DROPDOWNLIST, text, sel_2, sel_2);
819}
820
822{
823 INT ddheight, clheight, ddwidth, clwidth;
824 HWND hCombo;
825 RECT rc;
826
827 hCombo = create_combobox(style);
828
829 /* get initial measurements */
830 GetClientRect( hCombo, &rc);
831 clheight = rc.bottom - rc.top;
832 clwidth = rc.right - rc.left;
834 ddheight = rc.bottom - rc.top;
835 ddwidth = rc.right - rc.left;
836 /* use MoveWindow to move & resize the combo */
837 /* first make it slightly smaller */
838 MoveWindow( hCombo, 10, 10, clwidth - 2, clheight - 2, TRUE);
839 GetClientRect( hCombo, &rc);
840 ok( rc.right - rc.left == clwidth - 2, "clientrect width is %d vs %d\n",
841 rc.right - rc.left, clwidth - 2);
842 ok( rc.bottom - rc.top == clheight, "clientrect height is %d vs %d\n",
843 rc.bottom - rc.top, clheight);
845 ok( rc.right - rc.left == clwidth - 2, "drop-down rect width is %d vs %d\n",
846 rc.right - rc.left, clwidth - 2);
847 ok( rc.bottom - rc.top == ddheight, "drop-down rect height is %d vs %d\n",
848 rc.bottom - rc.top, ddheight);
849 ok( rc.right - rc.left == ddwidth -2, "drop-down rect width is %d vs %d\n",
850 rc.right - rc.left, ddwidth - 2);
851 /* new cx, cy is slightly bigger than the initial values */
852 MoveWindow( hCombo, 10, 10, clwidth + 2, clheight + 2, TRUE);
853 GetClientRect( hCombo, &rc);
854 ok( rc.right - rc.left == clwidth + 2, "clientrect width is %d vs %d\n",
855 rc.right - rc.left, clwidth + 2);
856 ok( rc.bottom - rc.top == clheight, "clientrect height is %d vs %d\n",
857 rc.bottom - rc.top, clheight);
859 ok( rc.right - rc.left == clwidth + 2, "drop-down rect width is %d vs %d\n",
860 rc.right - rc.left, clwidth + 2);
861 todo_wine {
862 ok( rc.bottom - rc.top == clheight + 2, "drop-down rect height is %d vs %d\n",
863 rc.bottom - rc.top, clheight + 2);
864 }
865
866 ddwidth = SendMessageA(hCombo, CB_SETDROPPEDWIDTH, -1, 0);
867 ok( ddwidth == clwidth + 2, "drop-width is %d vs %d\n", ddwidth, clwidth + 2);
868 ddwidth = SendMessageA(hCombo, CB_GETDROPPEDWIDTH, 0, 0);
869 ok( ddwidth == clwidth + 2, "drop-width is %d vs %d\n", ddwidth, clwidth + 2);
870
871 ddwidth = SendMessageA(hCombo, CB_SETDROPPEDWIDTH, 0, 0);
872 ok( ddwidth == clwidth + 2, "drop-width is %d vs %d\n", ddwidth, clwidth + 2);
873 ddwidth = SendMessageA(hCombo, CB_GETDROPPEDWIDTH, 0, 0);
874 ok( ddwidth == clwidth + 2, "drop-width is %d vs %d\n", ddwidth, clwidth + 2);
875
876 ddwidth = SendMessageA(hCombo, CB_SETDROPPEDWIDTH, clwidth - 1, 0);
877 ok( ddwidth == clwidth + 2, "drop-width is %d vs %d\n", ddwidth, clwidth + 2);
878 ddwidth = SendMessageA(hCombo, CB_GETDROPPEDWIDTH, 0, 0);
879 ok( ddwidth == clwidth + 2, "drop-width is %d vs %d\n", ddwidth, clwidth + 2);
880
881 ddwidth = SendMessageA(hCombo, CB_SETDROPPEDWIDTH, clwidth << 1, 0);
882 ok( ddwidth == (clwidth << 1), "drop-width is %d vs %d\n", ddwidth, clwidth << 1);
883 ddwidth = SendMessageA(hCombo, CB_GETDROPPEDWIDTH, 0, 0);
884 ok( ddwidth == (clwidth << 1), "drop-width is %d vs %d\n", ddwidth, clwidth << 1);
885
886 ddwidth = SendMessageA(hCombo, CB_SETDROPPEDWIDTH, 0, 0);
887 ok( ddwidth == (clwidth << 1), "drop-width is %d vs %d\n", ddwidth, clwidth << 1);
888 ddwidth = SendMessageA(hCombo, CB_GETDROPPEDWIDTH, 0, 0);
889 ok( ddwidth == (clwidth << 1), "drop-width is %d vs %d\n", ddwidth, clwidth << 1);
890
891 ddwidth = SendMessageA(hCombo, CB_SETDROPPEDWIDTH, 1, 0);
892 ok( ddwidth == clwidth + 2, "drop-width is %d vs %d\n", ddwidth, clwidth + 2);
893 ddwidth = SendMessageA(hCombo, CB_GETDROPPEDWIDTH, 0, 0);
894 ok( ddwidth == clwidth + 2, "drop-width is %d vs %d\n", ddwidth, clwidth + 2);
895
896 DestroyWindow(hCombo);
897}
898
900{
901 COMBOBOXINFO cbInfo;
902 INT start, end;
903 char edit[20];
904 HWND hCombo;
905 HWND hEdit;
906 DWORD len;
907
908 /* Build a combo */
909 hCombo = create_combobox(CBS_SIMPLE);
910
911 get_combobox_info(hCombo, &cbInfo);
912 hEdit = cbInfo.hwndItem;
913
914 /* Initially combo selection is empty*/
915 len = SendMessageA(hCombo, CB_GETEDITSEL, 0,0);
916 ok(LOWORD(len)==0, "Unexpected start position for selection %d\n", LOWORD(len));
917 ok(HIWORD(len)==0, "Unexpected end position for selection %d\n", HIWORD(len));
918
919 /* Set some text, and press a key to replace it */
920 edit[0] = 0x00;
921 SendMessageA(hCombo, WM_SETTEXT, 0, (LPARAM)"Jason1");
922 SendMessageA(hCombo, WM_GETTEXT, sizeof(edit), (LPARAM)edit);
923 ok(strcmp(edit, "Jason1")==0, "Unexpected text retrieved %s\n", edit);
924
925 /* Now what is the selection - still empty */
927 ok(start==0, "Unexpected start position for selection %d\n", start);
928 ok(end==0, "Unexpected end position for selection %d\n", end);
929 len = SendMessageA(hCombo, CB_GETEDITSEL, 0,0);
930 ok(LOWORD(len)==0, "Unexpected start position for selection %d\n", LOWORD(len));
931 ok(HIWORD(len)==0, "Unexpected end position for selection %d\n", HIWORD(len));
932
933 /* Give it focus, and it gets selected */
934 SendMessageA(hCombo, WM_SETFOCUS, 0, (LPARAM)hEdit);
936 ok(start==0, "Unexpected start position for selection %d\n", start);
937 ok(end==6, "Unexpected end position for selection %d\n", end);
938 len = SendMessageA(hCombo, CB_GETEDITSEL, 0,0);
939 ok(LOWORD(len)==0, "Unexpected start position for selection %d\n", LOWORD(len));
940 ok(HIWORD(len)==6, "Unexpected end position for selection %d\n", HIWORD(len));
941
942 /* Now emulate a key press */
943 edit[0] = 0x00;
944 SendMessageA(hCombo, WM_CHAR, 'A', 0x1c0001);
945 SendMessageA(hCombo, WM_GETTEXT, sizeof(edit), (LPARAM)edit);
946 ok(strcmp(edit, "A")==0, "Unexpected text retrieved %s\n", edit);
947
948 len = SendMessageA(hCombo, CB_GETEDITSEL, 0,0);
949 ok(LOWORD(len)==1, "Unexpected start position for selection %d\n", LOWORD(len));
950 ok(HIWORD(len)==1, "Unexpected end position for selection %d\n", HIWORD(len));
951
952 /* Now what happens when it gets more focus a second time - it doesn't reselect */
953 SendMessageA(hCombo, WM_SETFOCUS, 0, (LPARAM)hEdit);
954 len = SendMessageA(hCombo, CB_GETEDITSEL, 0,0);
955 ok(LOWORD(len)==1, "Unexpected start position for selection %d\n", LOWORD(len));
956 ok(HIWORD(len)==1, "Unexpected end position for selection %d\n", HIWORD(len));
957 DestroyWindow(hCombo);
958
959 /* Start again - Build a combo */
960 hCombo = create_combobox(CBS_SIMPLE);
961 get_combobox_info(hCombo, &cbInfo);
962 hEdit = cbInfo.hwndItem;
963
964 /* Set some text and give focus so it gets selected */
965 edit[0] = 0x00;
966 SendMessageA(hCombo, WM_SETTEXT, 0, (LPARAM)"Jason2");
967 SendMessageA(hCombo, WM_GETTEXT, sizeof(edit), (LPARAM)edit);
968 ok(strcmp(edit, "Jason2")==0, "Unexpected text retrieved %s\n", edit);
969
970 SendMessageA(hCombo, WM_SETFOCUS, 0, (LPARAM)hEdit);
971
972 /* Now what is the selection */
974 ok(start==0, "Unexpected start position for selection %d\n", start);
975 ok(end==6, "Unexpected end position for selection %d\n", end);
976 len = SendMessageA(hCombo, CB_GETEDITSEL, 0,0);
977 ok(LOWORD(len)==0, "Unexpected start position for selection %d\n", LOWORD(len));
978 ok(HIWORD(len)==6, "Unexpected end position for selection %d\n", HIWORD(len));
979
980 /* Now change the selection to the apparently invalid start -1, end -1 and
981 show it means no selection (ie start -1) but cursor at end */
982 SendMessageA(hCombo, CB_SETEDITSEL, 0, -1);
983 edit[0] = 0x00;
984 SendMessageA(hCombo, WM_CHAR, 'A', 0x1c0001);
985 SendMessageA(hCombo, WM_GETTEXT, sizeof(edit), (LPARAM)edit);
986 ok(strcmp(edit, "Jason2A")==0, "Unexpected text retrieved %s\n", edit);
987 DestroyWindow(hCombo);
988}
989
991static long setsel_start = 1, setsel_end = 1;
993
995{
996 if (msg == EM_SETSEL)
997 {
1000 }
1002}
1003
1005{
1006 switch (msg)
1007 {
1008 case WM_COMMAND:
1009 switch (HIWORD(wParam))
1010 {
1011 case CBN_SETFOCUS:
1013 break;
1014 case CBN_KILLFOCUS:
1016 break;
1017 }
1018 break;
1019 case WM_NEXTDLGCTL:
1021 break;
1022 }
1023 return CallWindowProcA(old_parent_proc, hwnd, msg, wParam, lParam);
1024}
1025
1027{
1028 static const char wine_test[] = "Wine Test";
1029 HWND hCombo, hEdit, hButton;
1030 char buffer[16] = {0};
1031 COMBOBOXINFO cbInfo;
1032 DWORD len;
1033
1034 hCombo = create_combobox(style);
1035 get_combobox_info(hCombo, &cbInfo);
1036 hEdit = cbInfo.hwndItem;
1037
1039 5, 50, 100, 20, hMainWnd, NULL,
1041
1044
1045 SendMessageA(hCombo, WM_SETFOCUS, 0, (LPARAM)hEdit);
1046 ok(setsel_start == 0, "Unexpected EM_SETSEL start value; got %ld\n", setsel_start);
1047 todo_wine ok(setsel_end == INT_MAX, "Unexpected EM_SETSEL end value; got %ld\n", setsel_end);
1048 ok(hCBN_SetFocus == hCombo, "Wrong handle set by CBN_SETFOCUS; got %p\n", hCBN_SetFocus);
1049 ok(GetFocus() == hEdit, "hEdit should have keyboard focus\n");
1050
1052 ok(setsel_start == 0, "Unexpected EM_SETSEL start value; got %ld\n", setsel_start);
1053 todo_wine ok(setsel_end == 0, "Unexpected EM_SETSEL end value; got %ld\n", setsel_end);
1054 ok(hCBN_KillFocus == hCombo, "Wrong handle set by CBN_KILLFOCUS; got %p\n", hCBN_KillFocus);
1055 ok(GetFocus() == hButton, "hButton should have keyboard focus\n");
1056
1059 ok(setsel_start == 0, "Unexpected EM_SETSEL start value; got %ld\n", setsel_start);
1060 todo_wine ok(setsel_end == INT_MAX, "Unexpected EM_SETSEL end value; got %ld\n", setsel_end);
1061 ok(hCBN_SetFocus == hCombo, "Wrong handle set by CBN_SETFOCUS; got %p\n", hCBN_SetFocus);
1062 ok(GetFocus() == hEdit, "hEdit should have keyboard focus\n");
1063 SendMessageA(hCombo, WM_GETTEXT, sizeof(buffer), (LPARAM)buffer);
1064 ok(!strcmp(buffer, wine_test), "Unexpected text in edit control; got '%s'\n", buffer);
1065
1067 ok(setsel_start == 0, "Unexpected EM_SETSEL start value; got %ld\n", setsel_start);
1068 todo_wine ok(setsel_end == 0, "Unexpected EM_SETSEL end value; got %ld\n", setsel_end);
1069 ok(hCBN_KillFocus == hCombo, "Wrong handle set by CBN_KILLFOCUS; got %p\n", hCBN_KillFocus);
1070 ok(GetFocus() == hButton, "hButton should have keyboard focus\n");
1071 len = SendMessageA(hCombo, CB_GETEDITSEL, 0, 0);
1072 ok(len == 0, "Unexpected text selection; start: %u, end: %u\n", LOWORD(len), HIWORD(len));
1073
1075 DestroyWindow(hButton);
1076 DestroyWindow(hCombo);
1077}
1078
1080{
1081 DWORD style, exstyle, expect_style, expect_exstyle;
1083 HWND combo;
1084
1086 if (cb_style == CBS_SIMPLE)
1087 {
1089 expect_exstyle = WS_EX_CLIENTEDGE;
1090 }
1091 else
1092 {
1094 expect_exstyle = WS_EX_TOOLWINDOW;
1095 }
1096
1097 combo = create_combobox(cb_style);
1098 get_combobox_info(combo, &info);
1099
1100 style = GetWindowLongW( info.hwndList, GWL_STYLE );
1101 exstyle = GetWindowLongW( info.hwndList, GWL_EXSTYLE );
1102 ok(style == expect_style, "%08x: got %08x\n", cb_style, style);
1103 ok(exstyle == expect_exstyle, "%08x: got %08x\n", cb_style, exstyle);
1104
1105 if (cb_style != CBS_SIMPLE)
1106 expect_exstyle |= WS_EX_TOPMOST;
1107
1108 SendMessageW(combo, CB_SHOWDROPDOWN, TRUE, 0 );
1109 style = GetWindowLongW( info.hwndList, GWL_STYLE );
1110 exstyle = GetWindowLongW( info.hwndList, GWL_EXSTYLE );
1111 ok(style == (expect_style | WS_VISIBLE), "%08x: got %08x\n", cb_style, style);
1112 ok(exstyle == expect_exstyle, "%08x: got %08x\n", cb_style, exstyle);
1113
1114 SendMessageW(combo, CB_SHOWDROPDOWN, FALSE, 0 );
1115 style = GetWindowLongW( info.hwndList, GWL_STYLE );
1116 exstyle = GetWindowLongW( info.hwndList, GWL_EXSTYLE );
1117 ok(style == expect_style, "%08x: got %08x\n", cb_style, style);
1118 ok(exstyle == expect_exstyle, "%08x: got %08x\n", cb_style, exstyle);
1119
1120 DestroyWindow(combo);
1121}
1122
1123static void test_combo_WS_VSCROLL(void)
1124{
1125 HWND hCombo, hList;
1127 DWORD style;
1128 int i;
1129
1131
1132 get_combobox_info(hCombo, &info);
1133 hList = info.hwndList;
1134
1135 for (i = 0; i < 3; i++)
1136 {
1137 char buffer[2];
1138 sprintf(buffer, "%d", i);
1139 SendMessageA(hCombo, CB_ADDSTRING, 0, (LPARAM)buffer);
1140 }
1141
1142 style = GetWindowLongA(info.hwndList, GWL_STYLE);
1144
1145 SendMessageA(hCombo, CB_SHOWDROPDOWN, TRUE, 0);
1146 SendMessageA(hCombo, CB_SHOWDROPDOWN, FALSE, 0);
1147
1149 ok((style & WS_VSCROLL) != 0, "Style does not include WS_VSCROLL\n");
1150
1151 DestroyWindow(hCombo);
1152}
1153
1155{
1156 static const char wine_test[] = "Wine Test";
1157 HWND hCombo, hList;
1158 COMBOBOXINFO cbInfo;
1159 int i, test, ret;
1160
1161 static const struct list_size_info
1162 {
1163 int num_items;
1164 int height_combo;
1165 int limit;
1166 } info_height[] = {
1167 {33, 50, -1},
1168 {35, 100, 40},
1169 {15, 50, 3},
1170 };
1171
1172 for (test = 0; test < ARRAY_SIZE(info_height); test++)
1173 {
1174 const struct list_size_info *info_test = &info_height[test];
1175 int height_item; /* Height of a list item */
1176 int height_list; /* Height of the list we got */
1177 int expected_height_list;
1178 RECT rect_list_client;
1179 int min_visible_expected;
1180
1181 hCombo = CreateWindowA(WC_COMBOBOXA, "Combo", CBS_DROPDOWN | WS_VISIBLE | WS_CHILD | style, 5, 5, 100,
1182 info_test->height_combo, hMainWnd, (HMENU)COMBO_ID, NULL, 0);
1183
1184 min_visible_expected = SendMessageA(hCombo, CB_GETMINVISIBLE, 0, 0);
1185 ok(min_visible_expected == 30, "Unexpected number of items %d.\n", min_visible_expected);
1186
1187 cbInfo.cbSize = sizeof(COMBOBOXINFO);
1188 ret = SendMessageA(hCombo, CB_GETCOMBOBOXINFO, 0, (LPARAM)&cbInfo);
1189 ok(ret, "Failed to get combo info, %d\n", ret);
1190
1191 hList = cbInfo.hwndList;
1192 for (i = 0; i < info_test->num_items; i++)
1193 {
1194 ret = SendMessageA(hCombo, CB_ADDSTRING, 0, (LPARAM) wine_test);
1195 ok(ret == i, "Failed to add string %d, returned %d.\n", i, ret);
1196 }
1197
1198 if (info_test->limit != -1)
1199 {
1200 int min_visible_actual;
1201 min_visible_expected = info_test->limit;
1202
1203 ret = SendMessageA(hCombo, CB_SETMINVISIBLE, min_visible_expected, 0);
1204 ok(ret, "Failed to set visible limit.\n");
1205 min_visible_actual = SendMessageA(hCombo, CB_GETMINVISIBLE, 0, 0);
1206 ok(min_visible_expected == min_visible_actual, "test %d: unexpected number of items %d.\n",
1207 test, min_visible_actual);
1208 }
1209
1210 ret = SendMessageA(hCombo, CB_SHOWDROPDOWN, TRUE,0);
1211 ok(ret, "Failed to show dropdown.\n");
1212 ret = SendMessageA(hCombo, CB_GETDROPPEDSTATE, 0, 0);
1213 ok(ret, "Unexpected dropped state.\n");
1214
1215 GetClientRect(hList, &rect_list_client);
1216 height_list = rect_list_client.bottom - rect_list_client.top;
1217 height_item = (int)SendMessageA(hList, LB_GETITEMHEIGHT, 0, 0);
1218
1220 {
1221 RECT rect_list_complete;
1222 int list_height_nonclient;
1223 int list_height_calculated;
1224 int edit_padding_size = cbInfo.rcItem.top; /* edit client rect top is the padding it has to its parent
1225 We assume it's the same on the bottom */
1226
1227 GetWindowRect(hList, &rect_list_complete);
1228
1229 list_height_nonclient = (rect_list_complete.bottom - rect_list_complete.top)
1230 - (rect_list_client.bottom - rect_list_client.top);
1231
1232 /* Calculate the expected client size of the listbox popup from the size of the combobox. */
1233 list_height_calculated = info_test->height_combo /* Take height we created combobox with */
1234 - (cbInfo.rcItem.bottom - cbInfo.rcItem.top) /* Subtract size of edit control */
1235 - list_height_nonclient /* Subtract list nonclient area */
1236 - edit_padding_size * 2; /* subtract space around the edit control */
1237
1238 expected_height_list = min(list_height_calculated, height_item * info_test->num_items);
1239 if (expected_height_list < 0)
1240 expected_height_list = 0;
1241
1242 ok(expected_height_list == height_list, "Test %d, expected list height to be %d, got %d\n",
1243 test, expected_height_list, height_list);
1244 }
1245 else
1246 {
1247 expected_height_list = min(info_test->num_items, min_visible_expected) * height_item;
1248
1249 ok(expected_height_list == height_list, "Test %d, expected list height to be %d, got %d\n",
1250 test, expected_height_list, height_list);
1251 }
1252
1253 DestroyWindow(hCombo);
1254 }
1255}
1256
1258{
1259 ULONG_PTR ctx_cookie;
1260 HANDLE hCtx;
1261
1263
1264 if (!init())
1265 return;
1266
1268
1269 /* ComboBoxEx32 tests. */
1270 test_comboex();
1276
1277 if (!load_v6_module(&ctx_cookie, &hCtx))
1278 {
1279 cleanup();
1280 return;
1281 }
1282
1283 /* ComboBox control tests. */
1300
1301 cleanup();
1302 unload_v6_module(ctx_cookie, hCtx);
1303}
static HDC hDC
Definition: 3dtext.c:33
@ sent
Definition: SystemMenu.c:27
@ defwinproc
Definition: SystemMenu.c:32
#define add_message(msg)
Definition: SystemMenu.c:98
#define ok_sequence(exp, contx, todo)
Definition: SystemMenu.c:275
#define broken(x)
Definition: _sntprintf.h:21
int strcmp(const char *String1, const char *String2)
Definition: utclib.c:469
Arabic default style
Definition: afstyles.h:94
static void * heap_alloc(size_t len)
Definition: appwiz.h:66
static BOOL heap_free(void *mem)
Definition: appwiz.h:76
#define ok(value,...)
Definition: atltest.h:57
#define START_TEST(x)
Definition: atltest.h:75
#define msg(x)
Definition: auth_time.c:54
HWND hWnd
Definition: settings.c:17
HFONT hFont
Definition: main.c:53
#define ARRAY_SIZE(A)
Definition: main.h:33
static const WCHAR stringFormat[]
Definition: wordpad.c:55
Definition: list.h:37
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
static void init_msg_sequences(struct msg_sequence **seq, int n)
Definition: msg.h:391
static void flush_sequences(struct msg_sequence **seq, int n)
Definition: msg.h:97
BOOL WINAPI SetWindowSubclass(HWND hWnd, SUBCLASSPROC pfnSubclass, UINT_PTR uIDSubclass, DWORD_PTR dwRef)
Definition: commctrl.c:1261
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
unsigned int idx
Definition: utils.c:41
HANDLE HWND
Definition: compat.h:19
#define CALLBACK
Definition: compat.h:35
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
Definition: loader.c:812
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
Definition: loader.c:111
const WCHAR * text
Definition: package.c:1799
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31
static unsigned char buff[32768]
Definition: fatten.c:17
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
pKey DeleteObject()
GLuint start
Definition: gl.h:1545
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
GLuint GLuint end
Definition: gl.h:1545
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
GLuint res
Definition: glext.h:9613
GLuint buffer
Definition: glext.h:5915
GLint limit
Definition: glext.h:10326
GLenum GLsizei len
Definition: glext.h:6722
GLuint64EXT * result
Definition: glext.h:11304
GLuint id
Definition: glext.h:5910
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define INT_MAX
Definition: limits.h:40
char hdr[14]
Definition: iptest.cpp:33
HWND hList
Definition: livecd.c:10
#define sprintf(buf, format,...)
Definition: sprintf.c:55
static const char textA[]
Definition: registrar.c:40
static void test_combo_changesize(DWORD style)
Definition: combo.c:821
static void test_comboex_CB_GETLBTEXT(void)
Definition: combo.c:361
static LONG getItem(HWND cbex, int idx, COMBOBOXEXITEMA *cbItem)
Definition: combo.c:94
static BOOL selchange_fired
Definition: combo.c:719
#define X2(f, ord)
static LONG addItem(HWND cbex, int idx, const char *text)
Definition: combo.c:70
static void test_combo_setitemheight(DWORD style)
Definition: combo.c:627
static void test_combo_editselection(void)
Definition: combo.c:899
static LRESULT ComboExTestOnNotify(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
Definition: combo.c:443
#define NUM_MSG_SEQUENCES
Definition: combo.c:31
static void test_comboex_get_set_item(void)
Definition: combo.c:565
static void test_combo_CBN_SELCHANGE(void)
Definition: combo.c:810
static void test_combo_listbox_styles(DWORD cb_style)
Definition: combo.c:1079
static LRESULT CALLBACK combobox_subclass_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
Definition: combo.c:994
static void test_combo_setfont(DWORD style)
Definition: combo.c:649
static HWND subclass_editbox(HWND hwndComboEx)
Definition: combo.c:134
#define COMBO_ID
Definition: combo.c:34
static HWND hCBN_KillFocus
Definition: combo.c:992
static HWND hMainWnd
Definition: combo.c:45
static BOOL init(void)
Definition: combo.c:494
static void cleanup(void)
Definition: combo.c:522
static SUBCLASSPROC
Definition: combo.c:49
static DWORD_PTR
Definition: combo.c:49
static HINSTANCE hMainHinst
Definition: combo.c:46
static LONG delItem(HWND cbex, int idx)
Definition: combo.c:90
static void test_comboex_WM_LBUTTONDOWN(void)
Definition: combo.c:250
#define expect_rect(r, _left, _top, _right, _bottom)
Definition: combo.c:38
static const struct message test_setitem_edit_seq[]
Definition: combo.c:558
static long setsel_start
Definition: combo.c:991
static HWND hComboExParentWnd
Definition: combo.c:45
static void test_comboex(void)
Definition: combo.c:147
static HWND createComboEx(DWORD style)
Definition: combo.c:65
#define MAX_CHARS
Definition: combo.c:51
static struct msg_sequence * sequences[NUM_MSG_SEQUENCES]
Definition: combo.c:43
static HWND create_combobox(DWORD style)
Definition: combo.c:607
static LPCSTR expected_edit_text
Definition: combo.c:717
static UINT WPARAM wparam
Definition: combo.c:716
static void get_combobox_info(HWND hwnd, COMBOBOXINFO *info)
Definition: combo.c:56
static UINT WPARAM LPARAM lparam
Definition: combo.c:716
#define expect(expected, got)
Definition: combo.c:36
static LRESULT WINAPI editbox_subclass_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
Definition: combo.c:103
static LRESULT CALLBACK ComboExTestWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
Definition: combo.c:467
static void test_combo_editselection_focus(DWORD style)
Definition: combo.c:1026
static void test_combo_WS_VSCROLL(void)
Definition: combo.c:1123
static void test_comboex_WM_WINDOWPOSCHANGING(void)
Definition: combo.c:396
static const char ComboExTestClass[]
Definition: combo.c:47
#define EDITBOX_SEQ_INDEX
Definition: combo.c:30
static UINT_PTR
Definition: combo.c:49
static long setsel_end
Definition: combo.c:991
static BOOL received_end_edit
Definition: combo.c:54
#define EDITBOX_ID
Definition: combo.c:33
static LRESULT CALLBACK test_window_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
Definition: combo.c:1004
static WNDPROC edit_window_proc
Definition: combo.c:990
static void test_combo_dropdown_size(DWORD style)
Definition: combo.c:1154
static void test_comboex_subclass(void)
Definition: combo.c:538
static void init_functions(void)
Definition: combo.c:483
static HWND hCBN_SetFocus
Definition: combo.c:992
static LPCSTR expected_list_text
Definition: combo.c:718
static int font_height(HFONT hFont)
Definition: combo.c:612
static LONG setItem(HWND cbex, int idx, const char *text)
Definition: combo.c:80
static LRESULT CALLBACK parent_wnd_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
Definition: combo.c:721
static char * textBuffer
Definition: combo.c:52
static HDC
Definition: imagelist.c:92
static void test_selection(void)
Definition: trackbar.c:859
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
#define todo_wine
Definition: custom.c:79
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:63
static ATOM item
Definition: dde.c:856
#define min(a, b)
Definition: monoChain.cc:55
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
unsigned int UINT
Definition: ndis.h:50
#define BOOL
Definition: nt_native.h:43
#define L(x)
Definition: ntvdm.h:50
#define LRESULT
Definition: ole.h:14
#define LOWORD(l)
Definition: pedump.c:82
#define WS_CHILD
Definition: pedump.c:617
#define WS_OVERLAPPEDWINDOW
Definition: pedump.c:637
#define WS_BORDER
Definition: pedump.c:625
#define LBS_HASSTRINGS
Definition: pedump.c:684
#define WS_VSCROLL
Definition: pedump.c:627
#define WS_VISIBLE
Definition: pedump.c:620
#define WS_EX_TOPMOST
Definition: pedump.c:647
long LONG
Definition: pedump.c:60
#define WS_CLIPSIBLINGS
Definition: pedump.c:618
#define LBS_NOTIFY
Definition: pedump.c:678
#define BS_DEFPUSHBUTTON
Definition: pedump.c:652
#define CBEN_ENDEDITW
Definition: commctrl.h:3876
#define WC_COMBOBOXEXA
Definition: commctrl.h:3782
#define WC_COMBOBOXA
Definition: commctrl.h:4716
#define WC_STATICA
Definition: commctrl.h:4679
#define CB_GETMINVISIBLE
Definition: commctrl.h:4722
#define CBEM_GETCOMBOCONTROL
Definition: commctrl.h:3832
#define CBEN_ENDEDITA
Definition: commctrl.h:3875
#define CBEIF_TEXT
Definition: commctrl.h:3786
#define CBEM_DELETEITEM
Definition: commctrl.h:3831
#define WC_BUTTONA
Definition: commctrl.h:4622
#define CBENF_DROPDOWN
Definition: commctrl.h:3890
#define CBEM_INSERTITEMA
Definition: commctrl.h:3826
#define CBEM_INSERTITEMW
Definition: commctrl.h:3841
#define CB_SETMINVISIBLE
Definition: commctrl.h:4721
#define CBEIF_LPARAM
Definition: commctrl.h:3791
#define CBEM_GETITEMA
Definition: commctrl.h:3829
#define CBEM_SETITEMA
Definition: commctrl.h:3830
#define CBEM_GETEDITCONTROL
Definition: commctrl.h:3833
#define WM_NOTIFY
Definition: richedit.h:61
#define test
Definition: rosglue.h:37
#define memset(x, y, z)
Definition: compat.h:39
static HWND hEdit
Definition: autocomplete.c:34
& rect
Definition: startmenu.cpp:1413
HWND hwnd
Definition: winuser.h:3588
UINT flags
Definition: winuser.h:3594
HWND hwndInsertAfter
Definition: winuser.h:3589
HBRUSH hbrBackground
Definition: winuser.h:3170
HICON hIcon
Definition: winuser.h:3168
HINSTANCE hInstance
Definition: winuser.h:3167
HCURSOR hCursor
Definition: winuser.h:3169
int cbWndExtra
Definition: winuser.h:3166
UINT style
Definition: winuser.h:3163
LPCSTR lpszMenuName
Definition: winuser.h:3171
LPCSTR lpszClassName
Definition: winuser.h:3172
WNDPROC lpfnWndProc
Definition: winuser.h:3164
int cbClsExtra
Definition: winuser.h:3165
Definition: tftpd.h:60
UINT message
Definition: SystemMenu.c:42
LONG right
Definition: windef.h:308
LONG bottom
Definition: windef.h:309
LONG top
Definition: windef.h:307
LONG left
Definition: windef.h:306
Definition: time.h:68
Definition: main.c:45
#define GWLP_WNDPROC
Definition: treelist.c:66
#define GWLP_USERDATA
Definition: treelist.c:63
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1829
int32_t INT
Definition: typedefs.h:58
uint32_t ULONG_PTR
Definition: typedefs.h:65
#define HIWORD(l)
Definition: typedefs.h:247
static BOOL load_v6_module(ULONG_PTR *pcookie, HANDLE *hCtx)
Definition: v6util.h:71
static void unload_v6_module(ULONG_PTR cookie, HANDLE hCtx)
Definition: v6util.h:63
int ret
#define expect_style(window, style)
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
LONG_PTR LPARAM
Definition: windef.h:208
LONG_PTR LRESULT
Definition: windef.h:209
UINT_PTR WPARAM
Definition: windef.h:207
#define WINAPI
Definition: msvc.h:6
#define DEFAULT_PITCH
Definition: wingdi.h:443
HGDIOBJ WINAPI GetStockObject(_In_ int)
#define FW_DONTCARE
Definition: wingdi.h:368
#define DEFAULT_QUALITY
Definition: wingdi.h:436
#define FF_DONTCARE
Definition: wingdi.h:448
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
Definition: dc.c:1539
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
#define OUT_DEFAULT_PRECIS
Definition: wingdi.h:415
#define CLIP_DEFAULT_PRECIS
Definition: wingdi.h:426
#define SYSTEM_FONT
Definition: wingdi.h:911
HFONT WINAPI CreateFontA(_In_ int, _In_ int, _In_ int, _In_ int, _In_ int, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_ DWORD, _In_opt_ LPCSTR)
BOOL WINAPI GetTextMetricsA(_In_ HDC, _Out_ LPTEXTMETRICA)
Definition: text.c:200
BOOL WINAPI DeleteDC(_In_ HDC)
#define SYMBOL_CHARSET
Definition: wingdi.h:385
#define WM_PAINT
Definition: winuser.h:1620
HWND WINAPI GetFocus(void)
Definition: window.c:1893
#define WM_ERASEBKGND
Definition: winuser.h:1625
#define CS_VREDRAW
Definition: winuser.h:658
LRESULT WINAPI DispatchMessageA(_In_ const MSG *)
#define MAKEWPARAM(l, h)
Definition: winuser.h:4009
#define SetWindowLongPtrA
Definition: winuser.h:5345
#define CB_SETDROPPEDWIDTH
Definition: winuser.h:1962
#define WM_CLOSE
Definition: winuser.h:1621
#define CB_GETLBTEXTLEN
Definition: winuser.h:1953
#define CB_GETLBTEXT
Definition: winuser.h:1952
BOOL WINAPI TranslateMessage(_In_ const MSG *)
#define MAKELPARAM(l, h)
Definition: winuser.h:4008
HWND WINAPI CreateWindowExA(_In_ DWORD dwExStyle, _In_opt_ LPCSTR lpClassName, _In_opt_ LPCSTR lpWindowName, _In_ DWORD dwStyle, _In_ int X, _In_ int Y, _In_ int nWidth, _In_ int nHeight, _In_opt_ HWND hWndParent, _In_opt_ HMENU hMenu, _In_opt_ HINSTANCE hInstance, _In_opt_ LPVOID lpParam)
#define COLOR_WINDOW
Definition: winuser.h:918
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
HANDLE WINAPI GetPropA(_In_ HWND, _In_ LPCSTR)
BOOL WINAPI UnregisterClassA(_In_ LPCSTR, HINSTANCE)
#define CBS_NOINTEGRALHEIGHT
Definition: winuser.h:287
LONG WINAPI GetWindowLongA(_In_ HWND, _In_ int)
#define CBS_DROPDOWNLIST
Definition: winuser.h:284
LRESULT WINAPI DefWindowProcA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define WM_WINDOWPOSCHANGING
Definition: winuser.h:1661
#define CreateWindowA(a, b, c, d, e, f, g, h, i, j, k)
Definition: winuser.h:4315
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
LONG WINAPI SetWindowLongA(_In_ HWND, _In_ int, _In_ LONG)
#define CB_SHOWDROPDOWN
Definition: winuser.h:1970
int WINAPIV wsprintfW(_Out_ LPWSTR, _In_ _Printf_format_string_ LPCWSTR,...)
#define CB_GETITEMHEIGHT
Definition: winuser.h:1951
__analysis_noreturn void WINAPI PostQuitMessage(_In_ int)
HBRUSH WINAPI GetSysColorBrush(_In_ int)
LONG WINAPI GetWindowLongW(_In_ HWND, _In_ int)
#define CBN_SETFOCUS
Definition: winuser.h:1982
#define WM_COMMAND
Definition: winuser.h:1740
#define CS_HREDRAW
Definition: winuser.h:653
#define CB_ERR
Definition: winuser.h:2435
#define IDC_ARROW
Definition: winuser.h:687
#define CB_SETCURSEL
Definition: winuser.h:1961
#define WM_NCHITTEST
Definition: winuser.h:1686
#define WS_EX_TOOLWINDOW
Definition: winuser.h:404
#define VK_UP
Definition: winuser.h:2225
LRESULT WINAPI SendMessageA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define WM_SETFOCUS
Definition: winuser.h:1613
#define WM_MOUSEMOVE
Definition: winuser.h:1775
#define WM_GETTEXT
Definition: winuser.h:1618
#define GetWindowLongPtrA
Definition: winuser.h:4828
#define WM_LBUTTONDOWN
Definition: winuser.h:1776
#define WM_DEVICECHANGE
Definition: winuser.h:1811
int WINAPI MapWindowPoints(_In_opt_ HWND hWndFrom, _In_opt_ HWND hWndTo, _Inout_updates_(cPoints) LPPOINT lpPoints, _In_ UINT cPoints)
#define GWLP_HINSTANCE
Definition: winuser.h:856
#define CB_GETDROPPEDWIDTH
Definition: winuser.h:1946
#define CB_GETCOMBOBOXINFO
Definition: winuser.h:1941
#define WM_NEXTDLGCTL
Definition: winuser.h:1643
#define CBN_SELCHANGE
Definition: winuser.h:1979
#define HWND_DESKTOP
Definition: winuser.h:1209
#define WM_SETTEXT
Definition: winuser.h:1617
#define CBS_SIMPLE
Definition: winuser.h:291
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
ATOM WINAPI RegisterClassA(_In_ CONST WNDCLASSA *)
#define LBS_COMBOBOX
Definition: winuser.h:324
#define CB_GETDROPPEDCONTROLRECT
Definition: winuser.h:1944
HWND WINAPI SetFocus(_In_opt_ HWND)
#define LB_GETITEMHEIGHT
Definition: winuser.h:2042
BOOL WINAPI GetComboBoxInfo(_In_ HWND, _Inout_ PCOMBOBOXINFO)
#define WM_SETFONT
Definition: winuser.h:1650
#define CB_ADDSTRING
Definition: winuser.h:1936
struct tagCOMBOBOXINFO COMBOBOXINFO
#define CBN_KILLFOCUS
Definition: winuser.h:1978
#define EM_SETSEL
Definition: winuser.h:2018
#define CBS_DROPDOWN
Definition: winuser.h:283
#define CB_SETEDITSEL
Definition: winuser.h:1963
#define CB_GETDROPPEDSTATE
Definition: winuser.h:1945
#define WM_LBUTTONUP
Definition: winuser.h:1777
#define WM_CHAR
Definition: winuser.h:1717
#define CW_USEDEFAULT
Definition: winuser.h:225
#define VK_DOWN
Definition: winuser.h:2227
#define CB_GETTOPINDEX
Definition: winuser.h:1955
#define CB_GETEDITSEL
Definition: winuser.h:1947
#define SW_SHOW
Definition: winuser.h:775
#define WM_DESTROY
Definition: winuser.h:1609
#define WS_EX_CLIENTEDGE
Definition: winuser.h:384
#define WM_KEYDOWN
Definition: winuser.h:1715
LRESULT(CALLBACK * WNDPROC)(HWND, UINT, WPARAM, LPARAM)
Definition: winuser.h:2906
#define CB_GETCURSEL
Definition: winuser.h:1943
#define GWL_STYLE
Definition: winuser.h:852
BOOL WINAPI GetMessageA(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT)
#define CB_SETITEMHEIGHT
Definition: winuser.h:1967
BOOL WINAPI DestroyWindow(_In_ HWND)
BOOL WINAPI PostMessageA(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI MoveWindow(_In_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ BOOL)
LRESULT WINAPI CallWindowProcA(_In_ WNDPROC, _In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
HCURSOR WINAPI LoadCursorA(_In_opt_ HINSTANCE, _In_ LPCSTR)
Definition: cursoricon.c:2090
#define WM_NCPAINT
Definition: winuser.h:1687
#define GWL_EXSTYLE
Definition: winuser.h:851
const char * LPCSTR
Definition: xmlstorage.h:183
__wchar_t WCHAR
Definition: xmlstorage.h:180
char CHAR
Definition: xmlstorage.h:175