Release 960521
[wine/multimedia.git] / controls / combo.c
blob37e6718bc2b885400430ac1a746d5cbb589744cb
1 /*
2 * Combo controls
3 *
4 * Copyright 1993 Martin Ayotte
5 * Copyright 1995 Bernd Schmidt
6 * Copyright 1996 Albrecht Kleine [some fixes]
7 *
8 */
10 #include <stdio.h>
11 #include <stdlib.h>
12 #include <string.h>
13 #include <sys/types.h>
14 #include <sys/stat.h>
16 #include "windows.h"
17 #include "sysmetrics.h"
18 #include "combo.h"
19 #include "stackframe.h"
20 #include "user.h"
21 #include "win.h"
22 #include "graphics.h"
23 #include "heap.h"
24 #include "listbox.h"
25 #include "dos_fs.h"
26 #include "drive.h"
27 #include "stddebug.h"
28 #include "debug.h"
29 #include "xmalloc.h"
32 * Note: Combos are probably implemented in a different way by Windows.
33 * Using a message spy for Windows, you can see some undocumented
34 * messages being passed between ComboBox and ComboLBox.
35 * I hope no programs rely on the implementation of combos.
38 #define ID_EDIT 1
39 #define ID_CLB 2
40 #define CBLMM_EDGE 4 /* distance inside box which is same as moving mouse
41 outside box, to trigger scrolling of CBL */
43 static BOOL CBCheckSize(HWND hwnd);
44 static BOOL CBLCheckSize(HWND hwnd);
46 static HBITMAP hComboBit = 0;
47 static WORD CBitHeight, CBitWidth;
49 static int COMBO_Init()
51 BITMAP bm;
53 dprintf_combo(stddeb, "COMBO_Init\n");
54 hComboBit = LoadBitmap(0, MAKEINTRESOURCE(OBM_COMBO));
55 GetObject(hComboBit, sizeof(BITMAP), (LPSTR)&bm);
56 CBitHeight = bm.bmHeight;
57 CBitWidth = bm.bmWidth;
58 return 0;
61 LPHEADCOMBO ComboGetStorageHeader(HWND hwnd)
63 return (LPHEADCOMBO)GetWindowLong(hwnd,4);
66 LPHEADLIST ComboGetListHeader(HWND hwnd)
68 return (LPHEADLIST)GetWindowLong(hwnd,0);
71 int CreateComboStruct(HWND hwnd, LONG style)
73 LPHEADCOMBO lphc;
75 lphc = (LPHEADCOMBO)xmalloc(sizeof(HEADCOMBO));
76 SetWindowLong32A(hwnd,4,(LONG)lphc);
77 lphc->hWndEdit = 0;
78 lphc->hWndLBox = 0;
79 lphc->dwState = 0;
80 lphc->LastSel = -1;
81 lphc->dwStyle = style;
82 lphc->DropDownVisible = FALSE;
83 return TRUE;
86 void ComboUpdateWindow(HWND hwnd, LPHEADLIST lphl, LPHEADCOMBO lphc, BOOL repaint)
88 WND *wndPtr = WIN_FindWndPtr(hwnd);
90 if (wndPtr->dwStyle & WS_VSCROLL)
91 SetScrollRange(lphc->hWndLBox,SB_VERT,0,ListMaxFirstVisible(lphl),TRUE);
92 if (repaint && lphl->bRedrawFlag) InvalidateRect32( hwnd, NULL, TRUE );
95 /***********************************************************************
96 * CBNCCreate
98 static LRESULT CBNCCreate(HWND hwnd, WPARAM wParam, LPARAM lParam)
100 CREATESTRUCT16 *createStruct;
102 if (!hComboBit) COMBO_Init();
104 createStruct = (CREATESTRUCT16 *)PTR_SEG_TO_LIN(lParam);
105 createStruct->style |= WS_BORDER;
106 SetWindowLong32A(hwnd, GWL_STYLE, createStruct->style);
108 dprintf_combo(stddeb,"ComboBox WM_NCCREATE!\n");
109 return DefWindowProc16(hwnd, WM_NCCREATE, wParam, lParam);
113 /***********************************************************************
114 * CBCreate
116 static LRESULT CBCreate(HWND hwnd, WPARAM wParam, LPARAM lParam)
118 LPHEADLIST lphl;
119 LPHEADCOMBO lphc;
120 LONG style = 0;
121 LONG cstyle = GetWindowLong(hwnd,GWL_STYLE);
122 RECT16 rect,lboxrect;
123 WND* wndPtr = WIN_FindWndPtr(hwnd);
124 char className[] = "COMBOLBOX"; /* Hack so that class names are > 0x10000 */
125 char editName[] = "EDIT";
126 HWND hwndp=0;
128 /* translate combo into listbox styles */
129 cstyle |= WS_BORDER;
130 if (cstyle & CBS_OWNERDRAWFIXED) style |= LBS_OWNERDRAWFIXED;
131 if (cstyle & CBS_OWNERDRAWVARIABLE) style |= LBS_OWNERDRAWVARIABLE;
132 if (cstyle & CBS_SORT) style |= LBS_SORT;
133 if (cstyle & CBS_HASSTRINGS) style |= LBS_HASSTRINGS;
134 style |= LBS_NOTIFY;
135 CreateListBoxStruct(hwnd, ODT_COMBOBOX, style, GetParent(hwnd));
136 CreateComboStruct(hwnd,cstyle);
138 lphl = ComboGetListHeader(hwnd);
139 lphc = ComboGetStorageHeader(hwnd);
141 GetClientRect16(hwnd,&rect);
142 lphc->LBoxTop = lphl->StdItemHeight;
144 switch(cstyle & 3)
146 case CBS_SIMPLE: /* edit control, list always visible */
147 lboxrect=rect;
148 lboxrect.left +=8;
149 dprintf_combo(stddeb,"CBS_SIMPLE\n");
150 style= WS_BORDER | WS_CHILD | WS_VISIBLE | WS_VSCROLL;
151 SetRectEmpty16(&lphc->RectButton);
152 hwndp=hwnd;
153 break;
155 case CBS_DROPDOWNLIST: /* static control, dropdown listbox */
156 case CBS_DROPDOWN: /* edit control, dropdown listbox */
157 GetWindowRect16(hwnd,&lboxrect);
158 style = WS_POPUP | WS_BORDER | WS_VSCROLL;
159 /* FIXME: WinSight says these should be CHILD windows with the TOPMOST flag
160 * set. Wine doesn't support TOPMOST, and simply setting the WS_CHILD
161 * flag doesn't work. */
162 lphc->RectButton = rect;
163 lphc->RectButton.left = lphc->RectButton.right - 6 - CBitWidth;
164 lphc->RectButton.bottom = lphc->RectButton.top + lphl->StdItemHeight;
165 SetWindowPos(hwnd, 0, 0, 0, rect.right - rect.left + 2*SYSMETRICS_CXBORDER,
166 lphl->StdItemHeight + 2*SYSMETRICS_CYBORDER,
167 SWP_NOMOVE | SWP_NOZORDER);
168 rect.right=lphc->RectButton.left - 8;
169 dprintf_combo(stddeb,(cstyle & 3)==CBS_DROPDOWN ? "CBS_DROPDOWN\n": "CBS_DROPDOWNLIST\n");
170 break;
172 default: fprintf(stderr,"COMBOBOX error: bad class style!\n");
173 return 0;
176 if ((cstyle & 3) != CBS_DROPDOWNLIST)
177 lphc->hWndEdit = CreateWindow16(MAKE_SEGPTR(editName), (SEGPTR)0,
178 WS_CHILD | WS_CLIPCHILDREN | WS_VISIBLE | ES_LEFT | WS_BORDER,
179 0, 0, rect.right, lphl->StdItemHeight,
180 hwnd, (HMENU)ID_EDIT, WIN_GetWindowInstance(hwnd), 0L);
182 lboxrect.top+=lphc->LBoxTop;
183 lphc->hWndLBox = CreateWindow16(MAKE_SEGPTR(className), (SEGPTR)0, style |
184 ((cstyle & WS_HSCROLL)? WS_HSCROLL : 0) |
185 ((cstyle & WS_VSCROLL)? WS_VSCROLL : 0),
186 lboxrect.left, lboxrect.top,
187 lboxrect.right - lboxrect.left,
188 lboxrect.bottom - lboxrect.top,
189 hwndp,(HMENU)ID_CLB, WIN_GetWindowInstance(hwnd),
190 (SEGPTR)hwnd );
192 wndPtr->dwStyle &= ~(WS_VSCROLL | WS_HSCROLL);
194 dprintf_combo( stddeb, "Combo Creation hwnd=%04x LBox=%04x Edit=%04x\n",
195 hwnd, lphc->hWndLBox, lphc->hWndEdit);
196 dprintf_combo( stddeb, " lbox %d,%d-%d,%d button %d,%d-%d,%d\n",
197 lboxrect.left, lboxrect.top, lboxrect.right, lboxrect.bottom,
198 lphc->RectButton.left, lphc->RectButton.top,
199 lphc->RectButton.right, lphc->RectButton.bottom );
200 dprintf_combo( stddeb, " client %d,%d-%d,%d window %d,%d-%d,%d\n",
201 wndPtr->rectClient.left, wndPtr->rectClient.top,
202 wndPtr->rectClient.right, wndPtr->rectClient.bottom,
203 wndPtr->rectWindow.left, wndPtr->rectWindow.top,
204 wndPtr->rectWindow.right, wndPtr->rectWindow.bottom );
205 return 0;
208 /***********************************************************************
209 * CBDestroy
211 static LRESULT CBDestroy(HWND hwnd, WPARAM wParam, LPARAM lParam)
213 LPHEADLIST lphl = ComboGetListHeader(hwnd);
215 ListBoxResetContent(lphl);
216 DestroyListBoxStruct(lphl);
217 dprintf_combo(stddeb,"Combo WM_DESTROY %p !\n", lphl);
218 return 0;
221 /***********************************************************************
222 * CBPaint
224 static LRESULT CBPaint(HWND hwnd, WPARAM wParam, LPARAM lParam)
226 LPHEADLIST lphl = ComboGetListHeader(hwnd);
227 LPHEADCOMBO lphc = ComboGetStorageHeader(hwnd);
228 LPLISTSTRUCT lpls;
229 PAINTSTRUCT16 ps;
230 HBRUSH hBrush;
231 HFONT hOldFont;
232 HDC16 hdc;
233 RECT16 rect;
235 hdc = BeginPaint16(hwnd, &ps);
236 if (hComboBit != 0 && !IsRectEmpty16(&lphc->RectButton))
238 GRAPH_DrawReliefRect(hdc, &lphc->RectButton, 2, 2, FALSE);
239 GRAPH_DrawBitmap(hdc, hComboBit,
240 lphc->RectButton.left + 2,lphc->RectButton.top + 2,
241 0, 0, CBitWidth, CBitHeight );
243 if (!IsWindowVisible(hwnd) || !lphl->bRedrawFlag
244 || (lphc->dwStyle & 3) != CBS_DROPDOWNLIST)
246 /* we don't want to draw an entry when there is an edit control */
247 EndPaint16(hwnd, &ps);
248 return 0;
251 hOldFont = SelectObject(hdc, lphl->hFont);
253 #ifdef WINELIB32
254 hBrush = SendMessage32A(lphl->hParent, WM_CTLCOLORLISTBOX, hdc, hwnd);
255 #else
256 hBrush = SendMessage16(lphl->hParent, WM_CTLCOLOR, hdc,
257 MAKELONG(hwnd, CTLCOLOR_LISTBOX));
258 #endif
259 if (hBrush == 0) hBrush = GetStockObject(WHITE_BRUSH);
261 GetClientRect16(hwnd, &rect);
263 CBCheckSize(hwnd);
264 rect.right -= (lphc->RectButton.right - lphc->RectButton.left);
266 lpls = ListBoxGetItem(lphl,lphl->ItemFocused);
267 if (lpls != NULL) {
268 FillRect16(hdc, &rect, hBrush);
269 ListBoxDrawItem (hwnd, lphl, hdc, lpls, &rect, ODA_DRAWENTIRE, 0);
270 if (GetFocus() == hwnd)
271 ListBoxDrawItem (hwnd,lphl, hdc, lpls, &rect, ODA_FOCUS, ODS_FOCUS);
273 else FillRect16(hdc, &rect, hBrush);
274 SelectObject(hdc,hOldFont);
275 EndPaint16(hwnd, &ps);
276 return 0;
279 /***********************************************************************
280 * CBGetDlgCode
282 static LRESULT CBGetDlgCode(HWND hwnd, WPARAM wParam, LPARAM lParam)
284 return DLGC_WANTARROWS | DLGC_WANTCHARS;
287 /***********************************************************************
288 * CBLButtonDown
290 static LRESULT CBLButtonDown(HWND hwnd, WPARAM wParam, LPARAM lParam)
292 LPHEADCOMBO lphc = ComboGetStorageHeader(hwnd);
293 SendMessage16(hwnd,CB_SHOWDROPDOWN,!lphc->DropDownVisible,0);
294 return 0;
297 /***********************************************************************
298 * CBKeyDown
300 static LRESULT CBKeyDown(HWND hwnd, WPARAM wParam, LPARAM lParam)
302 LPHEADLIST lphl = ComboGetListHeader(hwnd);
303 WORD newFocused = lphl->ItemFocused;
305 switch(wParam) {
306 case VK_HOME:
307 newFocused = 0;
308 break;
309 case VK_END:
310 newFocused = lphl->ItemsCount - 1;
311 break;
312 case VK_UP:
313 if (newFocused > 0) newFocused--;
314 break;
315 case VK_DOWN:
316 newFocused++;
317 break;
318 default:
319 return 0;
322 if (newFocused >= lphl->ItemsCount)
323 newFocused = lphl->ItemsCount - 1;
325 ListBoxSetCurSel(lphl, newFocused);
326 SendMessage16(hwnd, WM_COMMAND,ID_CLB,MAKELONG(0,CBN_SELCHANGE));
327 ListBoxSendNotification(lphl, CBN_SELCHANGE);
329 lphl->ItemFocused = newFocused;
330 ListBoxScrollToFocus(lphl);
331 /* SetScrollPos(hwnd, SB_VERT, lphl->FirstVisible, TRUE);*/
332 InvalidateRect32( hwnd, NULL, TRUE );
334 return 0;
337 /***********************************************************************
338 * CBChar
340 static LRESULT CBChar(HWND hwnd, WPARAM wParam, LPARAM lParam)
342 LPHEADLIST lphl = ComboGetListHeader(hwnd);
343 WORD newFocused;
345 newFocused = ListBoxFindNextMatch(lphl, wParam);
346 if (newFocused == (WORD)LB_ERR) return 0;
348 if (newFocused >= lphl->ItemsCount)
349 newFocused = lphl->ItemsCount - 1;
351 ListBoxSetCurSel(lphl, newFocused);
352 SendMessage16(hwnd, WM_COMMAND,ID_CLB,MAKELONG(0,CBN_SELCHANGE));
353 ListBoxSendNotification(lphl, CBN_SELCHANGE);
354 lphl->ItemFocused = newFocused;
355 ListBoxScrollToFocus(lphl);
357 /* SetScrollPos(hwnd, SB_VERT, lphl->FirstVisible, TRUE);*/
358 InvalidateRect32( hwnd, NULL, TRUE );
360 return 0;
363 /***********************************************************************
364 * CBKillFocus
366 static LRESULT CBKillFocus(HWND hwnd, WPARAM wParam, LPARAM lParam)
368 return 0;
371 /***********************************************************************
372 * CBSetFocus
374 static LRESULT CBSetFocus(HWND hwnd, WPARAM wParam, LPARAM lParam)
376 return 0;
379 /***********************************************************************
380 * CBResetContent
382 static LRESULT CBResetContent(HWND hwnd, WPARAM wParam, LPARAM lParam)
384 LPHEADLIST lphl = ComboGetListHeader(hwnd);
385 LPHEADCOMBO lphc = ComboGetStorageHeader(hwnd);
387 ListBoxResetContent(lphl);
388 ComboUpdateWindow(hwnd, lphl, lphc, TRUE);
389 return 0;
392 /***********************************************************************
393 * CBDir
395 static LRESULT CBDir(HWND hwnd, WPARAM wParam, LPARAM lParam)
397 WORD wRet;
398 LPHEADLIST lphl = ComboGetListHeader(hwnd);
399 LPHEADCOMBO lphc = ComboGetStorageHeader(hwnd);
401 wRet = ListBoxDirectory(lphl, wParam, (LPSTR)PTR_SEG_TO_LIN(lParam));
402 ComboUpdateWindow(hwnd, lphl, lphc, TRUE);
403 return wRet;
406 /***********************************************************************
407 * CBInsertString
409 static LRESULT CBInsertString(HWND hwnd, WPARAM wParam, LPARAM lParam)
411 WORD wRet;
412 LPHEADLIST lphl = ComboGetListHeader(hwnd);
413 LPHEADCOMBO lphc = ComboGetStorageHeader(hwnd);
415 if (lphl->HasStrings)
416 wRet = ListBoxInsertString(lphl, wParam, (LPSTR)PTR_SEG_TO_LIN(lParam));
417 else
418 wRet = ListBoxInsertString(lphl, wParam, (LPSTR)lParam);
419 ComboUpdateWindow(hwnd, lphl, lphc, TRUE);
420 return wRet;
423 /***********************************************************************
424 * CBAddString
426 static LRESULT CBAddString(HWND hwnd, WPARAM wParam, LPARAM lParam)
428 WORD wRet;
429 LPHEADLIST lphl = ComboGetListHeader(hwnd);
430 LPHEADCOMBO lphc = ComboGetStorageHeader(hwnd);
432 if (lphl->HasStrings)
433 wRet = ListBoxAddString(lphl, (LPSTR)PTR_SEG_TO_LIN(lParam));
434 else
435 wRet = ListBoxAddString(lphl, (LPSTR)lParam);
437 ComboUpdateWindow(hwnd, lphl, lphc, TRUE);
438 return wRet;
441 /***********************************************************************
442 * CBDeleteString
444 static LRESULT CBDeleteString(HWND hwnd, WPARAM wParam, LPARAM lParam)
446 LPHEADLIST lphl = ComboGetListHeader(hwnd);
447 LPHEADCOMBO lphc = ComboGetStorageHeader(hwnd);
448 LONG lRet = ListBoxDeleteString(lphl,wParam);
450 ComboUpdateWindow(hwnd, lphl, lphc, TRUE);
451 return lRet;
454 /***********************************************************************
455 * CBSelectString
457 static LRESULT CBSelectString(HWND hwnd, WPARAM wParam, LPARAM lParam)
459 LPHEADLIST lphl = ComboGetListHeader(hwnd);
460 WORD wRet;
462 wRet = ListBoxFindString(lphl, wParam, (SEGPTR)lParam);
464 /* XXX add functionality here */
466 return 0;
469 /***********************************************************************
470 * CBFindString
472 static LRESULT CBFindString(HWND hwnd, WPARAM wParam, LPARAM lParam)
474 LPHEADLIST lphl = ComboGetListHeader(hwnd);
475 return ListBoxFindString(lphl, wParam, (SEGPTR)lParam);
478 /***********************************************************************
479 * CBGetCount
481 static LRESULT CBGetCount(HWND hwnd, WPARAM wParam, LPARAM lParam)
483 LPHEADLIST lphl = ComboGetListHeader(hwnd);
484 return lphl->ItemsCount;
487 /***********************************************************************
488 * CBSetCurSel
490 static LRESULT CBSetCurSel(HWND hwnd, WPARAM wParam, LPARAM lParam)
492 LPHEADLIST lphl = ComboGetListHeader(hwnd);
493 WORD wRet;
495 wRet = ListBoxSetCurSel(lphl, wParam);
497 dprintf_combo(stddeb,"CBSetCurSel: hwnd %04x wp %x lp %lx wRet %d\n",
498 hwnd,wParam,lParam,wRet);
499 /* SetScrollPos(hwnd, SB_VERT, lphl->FirstVisible, TRUE);*/
500 InvalidateRect32( hwnd, NULL, TRUE );
502 return wRet;
505 /***********************************************************************
506 * CBGetCurSel
508 static LRESULT CBGetCurSel(HWND hwnd, WPARAM wParam, LPARAM lParam)
510 LPHEADLIST lphl = ComboGetListHeader(hwnd);
511 return lphl->ItemFocused;
514 /***********************************************************************
515 * CBGetItemHeight
517 static LRESULT CBGetItemHeight(HWND hwnd, WPARAM wParam, LPARAM lParam)
519 LPHEADLIST lphl = ComboGetListHeader(hwnd);
520 LPLISTSTRUCT lpls = ListBoxGetItem (lphl, wParam);
522 if (lpls == NULL) return LB_ERR;
523 return lpls->mis.itemHeight;
526 /***********************************************************************
527 * CBSetItemHeight
529 static LRESULT CBSetItemHeight(HWND hwnd, WPARAM wParam, LPARAM lParam)
531 LPHEADLIST lphl = ComboGetListHeader(hwnd);
532 return ListBoxSetItemHeight(lphl, wParam, lParam);
535 /***********************************************************************
536 * CBSetRedraw
538 static LRESULT CBSetRedraw(HWND hwnd, WPARAM wParam, LPARAM lParam)
540 LPHEADLIST lphl = ComboGetListHeader(hwnd);
541 lphl->bRedrawFlag = wParam;
542 return 0;
545 /***********************************************************************
546 * CBSetFont
548 static LRESULT CBSetFont(HWND hwnd, WPARAM wParam, LPARAM lParam)
550 LPHEADLIST lphl = ComboGetListHeader(hwnd);
551 LPHEADCOMBO lphc = ComboGetStorageHeader(hwnd);
553 if (wParam == 0)
554 lphl->hFont = GetStockObject(SYSTEM_FONT);
555 else
556 lphl->hFont = (HFONT)wParam;
557 if (lphc->hWndEdit)
558 SendMessage16(lphc->hWndEdit,WM_SETFONT,lphl->hFont,0);
559 return 0;
562 /***********************************************************************
563 * CBGetLBTextLen
565 static LRESULT CBGetLBTextLen(HWND hwnd, WPARAM wParam, LPARAM lParam)
567 LPHEADLIST lphl = ComboGetListHeader(hwnd);
568 LPLISTSTRUCT lpls = ListBoxGetItem(lphl,wParam);
570 if (lpls == NULL || !lphl->HasStrings) return LB_ERR;
571 return strlen(lpls->itemText);
574 /***********************************************************************
575 * CBGetLBText
577 static LRESULT CBGetLBText(HWND hwnd, WPARAM wParam, LPARAM lParam)
579 LPHEADLIST lphl = ComboGetListHeader(hwnd);
580 return ListBoxGetText(lphl, wParam, (LPSTR)PTR_SEG_TO_LIN(lParam));
583 /***********************************************************************
584 * CBGetItemData
586 static LRESULT CBGetItemData(HWND hwnd, WPARAM wParam, LPARAM lParam)
588 LPHEADLIST lphl = ComboGetListHeader(hwnd);
589 return ListBoxGetItemData(lphl, wParam);
592 /***********************************************************************
593 * CBSetItemData
595 static LRESULT CBSetItemData(HWND hwnd, WPARAM wParam, LPARAM lParam)
597 LPHEADLIST lphl = ComboGetListHeader(hwnd);
598 return ListBoxSetItemData(lphl, wParam, lParam);
601 /***********************************************************************
602 * CBShowDropDown
604 static LRESULT CBShowDropDown(HWND hwnd, WPARAM wParam, LPARAM lParam)
606 LPHEADCOMBO lphc = ComboGetStorageHeader(hwnd);
607 RECT32 rect;
609 if ((lphc->dwStyle & 3) == CBS_SIMPLE) return LB_ERR;
611 wParam = !!wParam;
612 if (wParam != lphc->DropDownVisible) {
613 lphc->DropDownVisible = wParam;
614 GetWindowRect32(hwnd,&rect);
615 SetWindowPos(lphc->hWndLBox, 0, rect.left, rect.top+lphc->LBoxTop, 0, 0,
616 SWP_NOSIZE | (wParam ? SWP_SHOWWINDOW : SWP_HIDEWINDOW));
617 if (!wParam) SetFocus(hwnd);
619 return 0;
623 /***********************************************************************
624 * CBCheckSize
626 static BOOL CBCheckSize(HWND hwnd)
628 LPHEADCOMBO lphc = ComboGetStorageHeader(hwnd);
629 LPHEADLIST lphl = ComboGetListHeader(hwnd);
630 LONG cstyle = GetWindowLong(hwnd,GWL_STYLE);
631 RECT16 cRect,wRect;
633 /* TODO - The size of combo's and their listboxes is still broken */
635 if (lphc->hWndLBox == 0) return FALSE;
637 GetClientRect16(hwnd,&cRect);
638 GetWindowRect16(hwnd,&wRect);
640 dprintf_combo(stddeb,"CBCheckSize: cRect %d,%d-%d,%d wRect %d,%d-%d,%d\n",
641 cRect.left,cRect.top,cRect.right,cRect.bottom,
642 wRect.left,wRect.top,wRect.right,wRect.bottom);
643 if ((cstyle & 3) == CBS_SIMPLE ) return TRUE ;
644 if ((cRect.bottom - cRect.top) >
645 (lphl->StdItemHeight + 2*SYSMETRICS_CYBORDER)) {
646 SetWindowPos(hwnd, 0, 0, 0,
647 cRect.right-cRect.left,
648 lphl->StdItemHeight+2*SYSMETRICS_CYBORDER,
649 SWP_NOMOVE | SWP_NOZORDER | SWP_NOREDRAW | SWP_NOACTIVATE );
650 GetClientRect16(hwnd,&cRect);
651 GetWindowRect16(hwnd,&wRect);
654 switch (cstyle & 3) {
655 case CBS_SIMPLE:
656 break;
657 case CBS_DROPDOWN:
658 case CBS_DROPDOWNLIST:
659 lphc->RectButton.right = cRect.right;
660 lphc->RectButton.left = cRect.right - 2*SYSMETRICS_CXBORDER - 4
661 - CBitWidth;
662 lphc->RectButton.top = cRect.top;
663 lphc->RectButton.bottom = cRect.bottom;
664 break;
665 default:
666 fprintf(stderr,"CBCheckSize: style %lx not recognized!\n",cstyle);
667 return FALSE;
670 CBLCheckSize(hwnd);
671 return TRUE;
674 /***********************************************************************
675 * CBCommand
677 static LRESULT CBCommand(HWND hwnd, WPARAM wParam, LPARAM lParam)
679 LPHEADCOMBO lphc = ComboGetStorageHeader(hwnd);
680 LPHEADLIST lphl = ComboGetListHeader(hwnd);
681 char buffer[256];
682 WORD newFocused;
683 WORD id;
684 if (lphc->hWndEdit) /* interdependence only used for CBS_SIMPLE and CBS_DROPDOWN styles */
686 switch (wParam)
688 case ID_CLB: /* update EDIT window */
689 if (HIWORD(lParam)==CBN_SELCHANGE)
690 if (lphl->HasStrings)
692 ListBoxGetText(lphl,lphl->ItemFocused, buffer);
693 dprintf_combo(stddeb,"CBCommand: update Edit: %s\n",buffer);
694 SetWindowText32A( lphc->hWndEdit, buffer );
696 break;
697 case ID_EDIT: /* update LISTBOX window */
698 id=GetWindowWord(hwnd,GWW_ID);
699 switch (HIWORD(lParam))
701 case EN_UPDATE:GetWindowText32A(lphc->hWndEdit,buffer,255);
702 if (*buffer)
704 newFocused=ListBoxFindString(lphl, -1, MAKE_SEGPTR(buffer));
705 dprintf_combo(stddeb,"CBCommand: new selection #%d is= %s\n",
706 newFocused,buffer);
707 if (newFocused != (WORD)LB_ERR)
708 { /* if found something */
709 ListBoxSetCurSel(lphl, newFocused);
710 ListBoxSendNotification(lphl, CBN_SELCHANGE);
711 InvalidateRect32(hwnd, NULL, TRUE);
714 SendMessage16(GetParent(hwnd),WM_COMMAND,id,
715 MAKELONG(hwnd, CBN_EDITUPDATE));
716 break;
717 case EN_CHANGE:SendMessage16(GetParent(hwnd),WM_COMMAND,id,
718 MAKELONG(hwnd, CBN_EDITCHANGE));
719 break;
720 case EN_ERRSPACE:SendMessage16(GetParent(hwnd),WM_COMMAND,id,
721 MAKELONG(hwnd, CBN_ERRSPACE));
722 break;
724 break;
727 return 0;
731 /***********************************************************************
732 * ComboWndProc
734 LRESULT ComboBoxWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
736 switch(message) {
737 case WM_NCCREATE: return CBNCCreate(hwnd, wParam, lParam);
738 case WM_CREATE: return CBCreate(hwnd, wParam, lParam);
739 case WM_DESTROY: return CBDestroy(hwnd, wParam, lParam);
740 case WM_GETDLGCODE: return CBGetDlgCode(hwnd, wParam, lParam);
741 case WM_KEYDOWN: return CBKeyDown(hwnd, wParam, lParam);
742 case WM_CHAR: return CBChar(hwnd, wParam, lParam);
743 case WM_SETFONT: return CBSetFont(hwnd, wParam, lParam);
744 case WM_SETREDRAW: return CBSetRedraw(hwnd, wParam, lParam);
745 case WM_PAINT: return CBPaint(hwnd, wParam, lParam);
746 case WM_LBUTTONDOWN: return CBLButtonDown(hwnd, wParam, lParam);
747 case WM_SETFOCUS: return CBSetFocus(hwnd, wParam, lParam);
748 case WM_KILLFOCUS: return CBKillFocus(hwnd, wParam, lParam);
749 case WM_SIZE: return CBCheckSize(hwnd);
750 case WM_COMMAND: return CBCommand(hwnd, wParam, lParam);
751 case CB_RESETCONTENT: return CBResetContent(hwnd, wParam, lParam);
752 case CB_DIR: return CBDir(hwnd, wParam, lParam);
753 case CB_ADDSTRING: return CBAddString(hwnd, wParam, lParam);
754 case CB_INSERTSTRING: return CBInsertString(hwnd, wParam, lParam);
755 case CB_DELETESTRING: return CBDeleteString(hwnd, wParam, lParam);
756 case CB_FINDSTRING: return CBFindString(hwnd, wParam, lParam);
757 case CB_GETCOUNT: return CBGetCount(hwnd, wParam, lParam);
758 case CB_GETCURSEL: return CBGetCurSel(hwnd, wParam, lParam);
759 case CB_GETITEMDATA: return CBGetItemData(hwnd, wParam, lParam);
760 case CB_GETITEMHEIGHT: return CBGetItemHeight(hwnd, wParam, lParam);
761 case CB_GETLBTEXT: return CBGetLBText(hwnd, wParam, lParam);
762 case CB_GETLBTEXTLEN: return CBGetLBTextLen(hwnd, wParam, lParam);
763 case CB_SELECTSTRING: return CBSelectString(hwnd, wParam, lParam);
764 case CB_SETITEMDATA: return CBSetItemData(hwnd, wParam, lParam);
765 case CB_SETCURSEL: return CBSetCurSel(hwnd, wParam, lParam);
766 case CB_SETITEMHEIGHT: return CBSetItemHeight(hwnd, wParam, lParam);
767 case CB_SHOWDROPDOWN: return CBShowDropDown(hwnd, wParam, lParam);
769 return DefWindowProc16(hwnd, message, wParam, lParam);
772 /*--------------------------------------------------------------------*/
773 /* ComboLBox code starts here */
775 HWND CLBoxGetCombo(HWND hwnd)
777 #ifdef WINELIB32
778 return (HWND)GetWindowLong(hwnd,0);
779 #else
780 return (HWND)GetWindowWord(hwnd,0);
781 #endif
784 LPHEADLIST CLBoxGetListHeader(HWND hwnd)
786 return ComboGetListHeader(CLBoxGetCombo(hwnd));
789 /***********************************************************************
790 * CBLCreate
792 static LRESULT CBLCreate( HWND hwnd, WPARAM wParam, LPARAM lParam )
794 CREATESTRUCT16 *createStruct = (CREATESTRUCT16 *)PTR_SEG_TO_LIN(lParam);
795 #ifdef WINELIB32
796 SetWindowLong(hwnd,0,(LONG)createStruct->lpCreateParams);
797 #else
798 SetWindowWord(hwnd,0,LOWORD(createStruct->lpCreateParams));
799 #endif
800 return 0;
803 /***********************************************************************
804 * CBLGetDlgCode
806 static LRESULT CBLGetDlgCode( HWND hwnd, WPARAM wParam, LPARAM lParam )
808 return DLGC_WANTARROWS | DLGC_WANTCHARS;
811 /***********************************************************************
812 * CBLKeyDown
814 static LRESULT CBLKeyDown( HWND hwnd, WPARAM wParam, LPARAM lParam )
816 LPHEADLIST lphl = CLBoxGetListHeader(hwnd);
817 WORD newFocused = lphl->ItemFocused;
819 switch(wParam) {
820 case VK_HOME:
821 newFocused = 0;
822 break;
823 case VK_END:
824 newFocused = lphl->ItemsCount - 1;
825 break;
826 case VK_UP:
827 if (newFocused > 0) newFocused--;
828 break;
829 case VK_DOWN:
830 newFocused++;
831 break;
832 case VK_PRIOR:
833 if (newFocused > lphl->ItemsVisible) {
834 newFocused -= lphl->ItemsVisible;
835 } else {
836 newFocused = 0;
838 break;
839 case VK_NEXT:
840 newFocused += lphl->ItemsVisible;
841 break;
842 default:
843 return 0;
846 if (newFocused >= lphl->ItemsCount)
847 newFocused = lphl->ItemsCount - 1;
849 ListBoxSetCurSel(lphl, newFocused);
850 ListBoxSendNotification(lphl, CBN_SELCHANGE);
851 SendMessage16(GetParent(hwnd), WM_COMMAND,ID_CLB,MAKELONG(0,CBN_SELCHANGE));
852 lphl->ItemFocused = newFocused;
853 ListBoxScrollToFocus(lphl);
854 SetScrollPos(hwnd, SB_VERT, lphl->FirstVisible, TRUE);
855 InvalidateRect32( hwnd, NULL, TRUE );
856 return 0;
859 /***********************************************************************
860 * CBLChar
862 static LRESULT CBLChar( HWND hwnd, WPARAM wParam, LPARAM lParam )
864 return 0;
867 /***********************************************************************
868 * CBLPaint
870 static LRESULT CBLPaint( HWND hwnd, WPARAM wParam, LPARAM lParam )
872 LPHEADLIST lphl = CLBoxGetListHeader(hwnd);
873 LPLISTSTRUCT lpls;
874 PAINTSTRUCT16 ps;
875 HBRUSH hBrush;
876 HFONT hOldFont;
877 WND * wndPtr = WIN_FindWndPtr(hwnd);
878 HWND combohwnd = CLBoxGetCombo(hwnd);
879 HDC16 hdc;
880 RECT16 rect;
881 int i, top, height;
883 top = 0;
884 hdc = BeginPaint16( hwnd, &ps );
886 if (!IsWindowVisible(hwnd) || !lphl->bRedrawFlag) {
887 EndPaint16(hwnd, &ps);
888 return 0;
891 hOldFont = SelectObject(hdc, lphl->hFont);
892 /* listboxes should be white */
893 hBrush = GetStockObject(WHITE_BRUSH);
895 GetClientRect16(hwnd, &rect);
896 FillRect16(hdc, &rect, hBrush);
897 CBLCheckSize(hwnd);
899 lpls = lphl->lpFirst;
901 lphl->ItemsVisible = 0;
902 for(i = 0; i < lphl->ItemsCount; i++) {
903 if (lpls == NULL) break;
905 if (i >= lphl->FirstVisible) {
906 height = lpls->mis.itemHeight;
907 /* must have enough room to draw entire item */
908 if (top > (rect.bottom-height+1)) break;
910 lpls->itemRect.top = top;
911 lpls->itemRect.bottom = top + height;
912 lpls->itemRect.left = rect.left;
913 lpls->itemRect.right = rect.right;
915 dprintf_listbox(stddeb,"drawing item: %d %d %d %d %d\n",
916 rect.left,top,rect.right,top+height,lpls->itemState);
917 if (lphl->OwnerDrawn) {
918 ListBoxDrawItem (combohwnd, lphl, hdc, lpls, &lpls->itemRect, ODA_DRAWENTIRE, 0);
919 if (lpls->itemState)
920 ListBoxDrawItem (combohwnd, lphl, hdc, lpls, &lpls->itemRect, ODA_SELECT, ODS_SELECTED);
921 } else {
922 ListBoxDrawItem (combohwnd, lphl, hdc, lpls, &lpls->itemRect, ODA_DRAWENTIRE,
923 lpls->itemState);
925 if ((lphl->ItemFocused == i) && GetFocus() == hwnd)
926 ListBoxDrawItem (combohwnd, lphl, hdc, lpls, &lpls->itemRect, ODA_FOCUS, ODS_FOCUS);
928 top += height;
929 lphl->ItemsVisible++;
932 lpls = lpls->lpNext;
935 if (wndPtr->dwStyle & WS_VSCROLL)
936 SetScrollRange(hwnd, SB_VERT, 0, ListMaxFirstVisible(lphl), TRUE);
938 SelectObject(hdc,hOldFont);
939 EndPaint16( hwnd, &ps );
940 return 0;
944 /***********************************************************************
945 * CBLKillFocus
947 static LRESULT CBLKillFocus( HWND hwnd, WPARAM wParam, LPARAM lParam )
949 /* SendMessage16(CLBoxGetCombo(hwnd),CB_SHOWDROPDOWN,0,0);*/
950 return 0;
953 /***********************************************************************
954 * CBLActivate
956 static LRESULT CBLActivate( HWND hwnd, WPARAM wParam, LPARAM lParam )
958 if (wParam == WA_INACTIVE)
959 SendMessage16(CLBoxGetCombo(hwnd),CB_SHOWDROPDOWN,0,0);
960 return 0;
963 /***********************************************************************
964 * CBLLButtonDown
966 static LRESULT CBLLButtonDown( HWND hwnd, WPARAM wParam, LPARAM lParam )
968 LPHEADLIST lphl = CLBoxGetListHeader(hwnd);
969 int y;
970 RECT16 rectsel;
972 SetFocus(hwnd);
973 SetCapture(hwnd);
975 lphl->PrevFocused = lphl->ItemFocused;
977 y = ListBoxFindMouse(lphl, LOWORD(lParam), HIWORD(lParam));
978 if (y == -1)
979 return 0;
981 ListBoxSetCurSel(lphl, y);
982 ListBoxGetItemRect(lphl, y, &rectsel);
984 InvalidateRect32( hwnd, NULL, TRUE );
985 return 0;
988 /***********************************************************************
989 * CBLLButtonUp
991 static LRESULT CBLLButtonUp( HWND hwnd, WPARAM wParam, LPARAM lParam )
993 LPHEADLIST lphl = CLBoxGetListHeader(hwnd);
995 if (GetCapture() == hwnd) ReleaseCapture();
997 if(!lphl)
999 fprintf(stdnimp,"CBLLButtonUp: CLBoxGetListHeader returned NULL!\n");
1001 else if (lphl->PrevFocused != lphl->ItemFocused)
1003 SendMessage16(CLBoxGetCombo(hwnd),CB_SETCURSEL,lphl->ItemFocused,0);
1004 SendMessage16(GetParent(hwnd), WM_COMMAND,ID_CLB,MAKELONG(0,CBN_SELCHANGE));
1005 ListBoxSendNotification(lphl, CBN_SELCHANGE);
1008 SendMessage16(CLBoxGetCombo(hwnd),CB_SHOWDROPDOWN,0,0);
1010 return 0;
1013 /***********************************************************************
1014 * CBLMouseMove
1016 static LRESULT CBLMouseMove( HWND hwnd, WPARAM wParam, LPARAM lParam )
1018 LPHEADLIST lphl = CLBoxGetListHeader(hwnd);
1019 short y;
1020 WORD wRet;
1021 RECT16 rect, rectsel;
1023 y = SHIWORD(lParam);
1024 wRet = ListBoxFindMouse(lphl, LOWORD(lParam), HIWORD(lParam));
1025 ListBoxGetItemRect(lphl, wRet, &rectsel);
1026 GetClientRect16(hwnd, &rect);
1028 dprintf_combo(stddeb,"CBLMouseMove: hwnd %04x wp %x lp %lx y %d if %d wret %d %d,%d-%d,%d\n",
1029 hwnd,wParam,lParam,y,lphl->ItemFocused,wRet,rectsel.left,rectsel.top,rectsel.right,rectsel.bottom);
1031 if ((wParam & MK_LBUTTON) != 0) {
1032 if (y < CBLMM_EDGE) {
1033 if (lphl->FirstVisible > 0) {
1034 lphl->FirstVisible--;
1035 SetScrollPos(hwnd, SB_VERT, lphl->FirstVisible, TRUE);
1036 ListBoxSetCurSel(lphl, wRet);
1037 InvalidateRect32( hwnd, NULL, TRUE );
1038 return 0;
1041 else if (y >= (rect.bottom-CBLMM_EDGE)) {
1042 if (lphl->FirstVisible < ListMaxFirstVisible(lphl)) {
1043 lphl->FirstVisible++;
1044 SetScrollPos(hwnd, SB_VERT, lphl->FirstVisible, TRUE);
1045 ListBoxSetCurSel(lphl, wRet);
1046 InvalidateRect32( hwnd, NULL, TRUE );
1047 return 0;
1050 else {
1051 if ((short) wRet == lphl->ItemFocused) return 0;
1052 ListBoxSetCurSel(lphl, wRet);
1053 InvalidateRect32( hwnd, NULL, TRUE );
1057 return 0;
1060 /***********************************************************************
1061 * CBLVScroll
1063 static LRESULT CBLVScroll( HWND hwnd, WPARAM wParam, LPARAM lParam )
1065 LPHEADLIST lphl = CLBoxGetListHeader(hwnd);
1066 int y;
1068 y = lphl->FirstVisible;
1070 switch(wParam) {
1071 case SB_LINEUP:
1072 if (lphl->FirstVisible > 0)
1073 lphl->FirstVisible--;
1074 break;
1076 case SB_LINEDOWN:
1077 lphl->FirstVisible++;
1078 break;
1080 case SB_PAGEUP:
1081 if (lphl->FirstVisible > lphl->ItemsVisible) {
1082 lphl->FirstVisible -= lphl->ItemsVisible;
1083 } else {
1084 lphl->FirstVisible = 0;
1086 break;
1088 case SB_PAGEDOWN:
1089 lphl->FirstVisible += lphl->ItemsVisible;
1090 break;
1092 case SB_THUMBTRACK:
1093 lphl->FirstVisible = LOWORD(lParam);
1094 break;
1097 if (lphl->FirstVisible > ListMaxFirstVisible(lphl))
1098 lphl->FirstVisible = ListMaxFirstVisible(lphl);
1100 if (y != lphl->FirstVisible) {
1101 SetScrollPos(hwnd, SB_VERT, lphl->FirstVisible, TRUE);
1102 InvalidateRect32( hwnd, NULL, TRUE );
1105 return 0;
1109 /***********************************************************************
1110 * CBLCheckSize
1112 static BOOL CBLCheckSize(HWND hwnd)
1114 LPHEADCOMBO lphc = ComboGetStorageHeader(hwnd);
1115 LPHEADLIST lphl = ComboGetListHeader(hwnd);
1116 LPLISTSTRUCT lpls;
1117 HWND hWndLBox;
1118 RECT16 cRect,wRect,lRect,lwRect;
1119 int totheight;
1120 char className[80];
1122 GetClassName32A(hwnd,className,80);
1123 fflush(stddeb);
1124 if (strncmp(className,"COMBOBOX",8)) return FALSE;
1125 if ((hWndLBox = lphc->hWndLBox) == 0) return FALSE;
1126 dprintf_combo(stddeb,"CBLCheckSize headers hw %04x lb %04x name %s\n",
1127 hwnd,hWndLBox,className);
1129 GetClientRect16(hwnd,&cRect);
1130 GetWindowRect16(hwnd,&wRect);
1131 GetClientRect16(hWndLBox,&lRect);
1132 GetWindowRect16(hWndLBox,&lwRect);
1134 dprintf_combo(stddeb,"CBLCheckSize: init cRect %d,%d-%d,%d wRect %d,%d-%d,%d\n",
1135 cRect.left,cRect.top,cRect.right,cRect.bottom,
1136 wRect.left,wRect.top,wRect.right,wRect.bottom);
1137 dprintf_combo(stddeb," lRect %d,%d-%d,%d lwRect %d,%d-%d,%d\n",
1138 lRect.left,lRect.top,lRect.right,lRect.bottom,
1139 lwRect.left,lwRect.top,lwRect.right,lwRect.bottom);
1140 fflush(stddeb);
1142 totheight = 0;
1143 for (lpls=lphl->lpFirst; lpls != NULL; lpls=lpls->lpNext)
1144 totheight += lpls->mis.itemHeight;
1146 /* TODO: This isn't really what windows does */
1147 if (lRect.bottom-lRect.top < 3*lphl->StdItemHeight) {
1148 dprintf_combo(stddeb," Changing; totHeight %d StdItemHght %d\n",
1149 totheight,lphl->StdItemHeight);
1150 SetWindowPos(hWndLBox, 0, lRect.left, lRect.top,
1151 lwRect.right-lwRect.left, totheight+2*SYSMETRICS_CYBORDER,
1152 SWP_NOMOVE | SWP_NOZORDER | SWP_NOREDRAW | SWP_NOACTIVATE );
1154 return TRUE;
1158 /***********************************************************************
1159 * ComboLBoxWndProc
1161 LRESULT ComboLBoxWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
1163 switch(message) {
1164 case WM_CREATE: return CBLCreate(hwnd, wParam, lParam);
1165 case WM_GETDLGCODE: return CBLGetDlgCode(hwnd, wParam, lParam);
1166 case WM_KEYDOWN: return CBLKeyDown(hwnd, wParam, lParam);
1167 case WM_CHAR: return CBLChar(hwnd, wParam, lParam);
1168 case WM_PAINT: return CBLPaint(hwnd, wParam, lParam);
1169 case WM_KILLFOCUS: return CBLKillFocus(hwnd, wParam, lParam);
1170 case WM_ACTIVATE: return CBLActivate(hwnd, wParam, lParam);
1171 case WM_LBUTTONDOWN: return CBLLButtonDown(hwnd, wParam, lParam);
1172 case WM_LBUTTONUP: return CBLLButtonUp(hwnd, wParam, lParam);
1173 case WM_MOUSEMOVE: return CBLMouseMove(hwnd, wParam, lParam);
1174 case WM_VSCROLL: return CBLVScroll(hwnd, wParam, lParam);
1175 case WM_SIZE: return CBLCheckSize(hwnd);
1177 return DefWindowProc16(hwnd, message, wParam, lParam);
1180 /************************************************************************
1181 * DlgDirSelectComboBox [USER.194]
1183 BOOL DlgDirSelectComboBox(HWND hDlg, LPSTR lpStr, INT nIDLBox)
1185 fprintf(stdnimp,"DlgDirSelectComboBox(%04x, '%s', %d) \n",
1186 hDlg, lpStr, nIDLBox);
1187 return TRUE;
1190 static INT32 COMBO_DlgDirList( HWND32 hDlg, LPARAM path, INT32 idCBox,
1191 INT32 idStatic, UINT32 wType, BOOL32 unicode )
1193 LRESULT res = 0;
1195 if (idCBox)
1197 SendDlgItemMessage32A( hDlg, idCBox, CB_RESETCONTENT, 0, 0 );
1198 if (unicode)
1199 res = SendDlgItemMessage32W( hDlg, idCBox, CB_DIR, wType, path );
1200 else
1201 res = SendDlgItemMessage32A( hDlg, idCBox, CB_DIR, wType, path );
1203 if (idStatic)
1205 char temp[512] = "A:\\";
1206 int drive = DRIVE_GetCurrentDrive();
1207 temp[0] += drive;
1208 lstrcpyn( temp + 3, DRIVE_GetDosCwd(drive), sizeof(temp)-3 );
1209 AnsiLower( temp );
1210 SetDlgItemText32A( hDlg, idStatic, temp );
1212 return (res >= 0);
1216 /***********************************************************************
1217 * DlgDirListComboBox16 (USER.195)
1219 INT16 DlgDirListComboBox16( HWND16 hDlg, LPCSTR path, INT16 idCBox,
1220 INT16 idStatic, UINT16 wType )
1222 dprintf_combo( stddeb,"DlgDirListComboBox16(%04x,'%s',%d,%d,%04x)\n",
1223 hDlg, path, idCBox, idStatic, wType );
1224 return COMBO_DlgDirList( hDlg, (LPARAM)path, idCBox,
1225 idStatic, wType, FALSE );
1229 /***********************************************************************
1230 * DlgDirListComboBox32A (USER32.143)
1232 INT32 DlgDirListComboBox32A( HWND32 hDlg, LPCSTR path, INT32 idCBox,
1233 INT32 idStatic, UINT32 wType )
1235 dprintf_combo( stddeb,"DlgDirListComboBox32A(%08x,'%s',%d,%d,%08X)\n",
1236 hDlg, path, idCBox, idStatic, wType );
1237 return COMBO_DlgDirList( hDlg, (LPARAM)path, idCBox,
1238 idStatic, wType, FALSE );
1242 /***********************************************************************
1243 * DlgDirListComboBox32W (USER32.144)
1245 INT32 DlgDirListComboBox32W( HWND32 hDlg, LPCWSTR path, INT32 idCBox,
1246 INT32 idStatic, UINT32 wType )
1248 dprintf_combo( stddeb,"DlgDirListComboBox32W(%08x,%p,%d,%d,%08X)\n",
1249 hDlg, path, idCBox, idStatic, wType );
1250 return COMBO_DlgDirList( hDlg, (LPARAM)path, idCBox,
1251 idStatic, wType, TRUE );