2 * 16-bit dialog functions
4 * Copyright 1993, 1994, 1996, 2003 Alexandre Julliard
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.
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.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 #include "wine/port.h"
26 #include "wine/winuser16.h"
30 #include "wine/debug.h"
32 WINE_DEFAULT_DEBUG_CHANNEL(dialog);
34 /* Dialog control information */
65 /***********************************************************************
68 * Return the class and text of the control pointed to by ptr,
69 * fill the header structure and return a pointer to the next control.
71 static LPCSTR DIALOG_GetControl16( LPCSTR p, DLG_CONTROL_INFO *info )
73 static char buffer[10];
76 info->x = GET_WORD(p); p += sizeof(WORD);
77 info->y = GET_WORD(p); p += sizeof(WORD);
78 info->cx = GET_WORD(p); p += sizeof(WORD);
79 info->cy = GET_WORD(p); p += sizeof(WORD);
80 info->id = GET_WORD(p); p += sizeof(WORD);
81 info->style = GET_DWORD(p); p += sizeof(DWORD);
87 case 0x80: strcpy( buffer, "BUTTON" ); break;
88 case 0x81: strcpy( buffer, "EDIT" ); break;
89 case 0x82: strcpy( buffer, "STATIC" ); break;
90 case 0x83: strcpy( buffer, "LISTBOX" ); break;
91 case 0x84: strcpy( buffer, "SCROLLBAR" ); break;
92 case 0x85: strcpy( buffer, "COMBOBOX" ); break;
93 default: buffer[0] = '\0'; break;
95 info->className = buffer;
104 int_id = ((BYTE)*p == 0xff);
107 /* Integer id, not documented (?). Only works for SS_ICON controls */
108 info->windowName = (LPCSTR)(UINT)GET_WORD(p+1);
113 info->windowName = p;
117 if (*p) info->data = p + 1;
118 else info->data = NULL;
122 TRACE(" %s %s %d, %d, %d, %d, %d, %08lx, %p\n",
123 debugstr_a(info->className), debugstr_a(info->windowName),
124 info->id, info->x, info->y, info->cx, info->cy,
125 info->style, info->data );
131 /***********************************************************************
132 * DIALOG_CreateControls16
134 * Create the control windows for a dialog.
136 static BOOL DIALOG_CreateControls16( HWND hwnd, LPCSTR template,
137 const DLG_TEMPLATE *dlgTemplate, HINSTANCE16 hInst )
139 DIALOGINFO *dlgInfo = DIALOG_get_info( hwnd );
140 DLG_CONTROL_INFO info;
141 HWND hwndCtrl, hwndDefButton = 0;
142 INT items = dlgTemplate->nbItems;
147 HINSTANCE16 instance = hInst;
150 template = DIALOG_GetControl16( template, &info );
151 if (HIWORD(info.className) && !strcmp( info.className, "EDIT") &&
152 !(GetWindowLongW( hwnd, GWL_STYLE ) & DS_LOCALEDIT))
154 if (!dlgInfo->hDialogHeap)
156 dlgInfo->hDialogHeap = GlobalAlloc16(GMEM_FIXED, 0x10000);
157 if (!dlgInfo->hDialogHeap)
159 ERR("Insufficient memory to create heap for edit control\n" );
162 LocalInit16(dlgInfo->hDialogHeap, 0, 0xffff);
164 instance = dlgInfo->hDialogHeap;
167 segptr = MapLS( info.data );
168 hwndCtrl = WIN_Handle32( CreateWindowEx16( WS_EX_NOPARENTNOTIFY,
169 info.className, info.windowName,
170 info.style | WS_CHILD,
171 MulDiv(info.x, dlgInfo->xBaseUnit, 4),
172 MulDiv(info.y, dlgInfo->yBaseUnit, 8),
173 MulDiv(info.cx, dlgInfo->xBaseUnit, 4),
174 MulDiv(info.cy, dlgInfo->yBaseUnit, 8),
175 HWND_16(hwnd), (HMENU16)info.id,
176 instance, (LPVOID)segptr ));
181 if (dlgTemplate->style & DS_NOFAILCREATE) continue;
185 /* Send initialisation messages to the control */
186 if (dlgInfo->hUserFont) SendMessageA( hwndCtrl, WM_SETFONT,
187 (WPARAM)dlgInfo->hUserFont, 0 );
188 if (SendMessageA(hwndCtrl, WM_GETDLGCODE, 0, 0) & DLGC_DEFPUSHBUTTON)
190 /* If there's already a default push-button, set it back */
191 /* to normal and use this one instead. */
193 SendMessageA( hwndDefButton, BM_SETSTYLE,
194 BS_PUSHBUTTON,FALSE );
195 hwndDefButton = hwndCtrl;
196 dlgInfo->idResult = GetWindowLongA( hwndCtrl, GWL_ID );
204 /***********************************************************************
205 * DIALOG_ParseTemplate16
207 * Fill a DLG_TEMPLATE structure from the dialog template, and return
208 * a pointer to the first control.
210 static LPCSTR DIALOG_ParseTemplate16( LPCSTR p, DLG_TEMPLATE * result )
212 result->style = GET_DWORD(p); p += sizeof(DWORD);
213 result->nbItems = (unsigned char) *p++;
214 result->x = GET_WORD(p); p += sizeof(WORD);
215 result->y = GET_WORD(p); p += sizeof(WORD);
216 result->cx = GET_WORD(p); p += sizeof(WORD);
217 result->cy = GET_WORD(p); p += sizeof(WORD);
219 TRACE("DIALOG %d, %d, %d, %d\n", result->x, result->y, result->cx, result->cy );
220 TRACE(" STYLE %08lx\n", result->style );
222 /* Get the menu name */
227 result->menuName = 0;
231 result->menuName = (LPCSTR)(UINT)GET_WORD( p + 1 );
233 TRACE(" MENU %04x\n", LOWORD(result->menuName) );
236 result->menuName = p;
237 TRACE(" MENU '%s'\n", p );
242 /* Get the class name */
246 result->className = p;
247 TRACE(" CLASS '%s'\n", result->className );
249 else result->className = DIALOG_CLASS_ATOMA;
252 /* Get the window caption */
256 TRACE(" CAPTION '%s'\n", result->caption );
258 /* Get the font name */
260 if (result->style & DS_SETFONT)
262 result->pointSize = GET_WORD(p);
264 result->faceName = p;
266 TRACE(" FONT %d,'%s'\n", result->pointSize, result->faceName );
272 /***********************************************************************
273 * DIALOG_CreateIndirect16
275 * Creates a dialog box window
277 * modal = TRUE if we are called from a modal dialog box.
278 * (it's more compatible to do it here, as under Windows the owner
279 * is never disabled if the dialog fails because of an invalid template)
281 static HWND DIALOG_CreateIndirect16( HINSTANCE16 hInst, LPCVOID dlgTemplate,
282 HWND owner, DLGPROC16 dlgProc, LPARAM param,
288 DLG_TEMPLATE template;
289 DIALOGINFO * dlgInfo;
290 BOOL ownerEnabled = TRUE;
292 DWORD units = GetDialogBaseUnits();
294 /* Parse dialog template */
296 dlgTemplate = DIALOG_ParseTemplate16( dlgTemplate, &template );
298 /* Initialise dialog extra data */
300 if (!(dlgInfo = HeapAlloc( GetProcessHeap(), 0, sizeof(*dlgInfo) ))) return 0;
301 dlgInfo->hwndFocus = 0;
302 dlgInfo->hUserFont = 0;
304 dlgInfo->xBaseUnit = LOWORD(units);
305 dlgInfo->yBaseUnit = HIWORD(units);
306 dlgInfo->idResult = 0;
308 dlgInfo->hDialogHeap = 0;
312 if (template.menuName)
314 dlgInfo->hMenu = HMENU_32(LoadMenu16( hInst, template.menuName ));
317 /* Create custom font if needed */
319 if (template.style & DS_SETFONT)
321 /* We convert the size to pixels and then make it -ve. This works
322 * for both +ve and -ve template.pointSize */
326 pixels = MulDiv(template.pointSize, GetDeviceCaps(dc , LOGPIXELSY), 72);
328 dlgInfo->hUserFont = CreateFontA( -pixels, 0, 0, 0, FW_DONTCARE,
329 FALSE, FALSE, FALSE, DEFAULT_CHARSET, 0, 0,
330 PROOF_QUALITY, FF_DONTCARE, template.faceName );
331 if (dlgInfo->hUserFont)
334 if (DIALOG_GetCharSize( dlgInfo->hUserFont, &charSize ))
336 dlgInfo->xBaseUnit = charSize.cx;
337 dlgInfo->yBaseUnit = charSize.cy;
340 TRACE("units = %d,%d\n", dlgInfo->xBaseUnit, dlgInfo->yBaseUnit );
343 /* Create dialog main window */
345 rect.left = rect.top = 0;
346 rect.right = MulDiv(template.cx, dlgInfo->xBaseUnit, 4);
347 rect.bottom = MulDiv(template.cy, dlgInfo->yBaseUnit, 8);
348 if (template.style & DS_MODALFRAME) exStyle |= WS_EX_DLGMODALFRAME;
349 AdjustWindowRectEx( &rect, template.style, (dlgInfo->hMenu != 0), exStyle );
350 rect.right -= rect.left;
351 rect.bottom -= rect.top;
353 if (template.x == CW_USEDEFAULT16)
355 rect.left = rect.top = CW_USEDEFAULT16;
359 if (template.style & DS_CENTER)
361 rect.left = (GetSystemMetrics(SM_CXSCREEN) - rect.right) / 2;
362 rect.top = (GetSystemMetrics(SM_CYSCREEN) - rect.bottom) / 2;
366 rect.left += MulDiv(template.x, dlgInfo->xBaseUnit, 4);
367 rect.top += MulDiv(template.y, dlgInfo->yBaseUnit, 8);
369 if ( !(template.style & WS_CHILD) )
373 if( !(template.style & DS_ABSALIGN) )
374 ClientToScreen( owner, (POINT *)&rect );
376 /* try to fit it into the desktop */
378 if( (dX = rect.left + rect.right + GetSystemMetrics(SM_CXDLGFRAME)
379 - GetSystemMetrics(SM_CXSCREEN)) > 0 ) rect.left -= dX;
380 if( (dY = rect.top + rect.bottom + GetSystemMetrics(SM_CYDLGFRAME)
381 - GetSystemMetrics(SM_CYSCREEN)) > 0 ) rect.top -= dY;
382 if( rect.left < 0 ) rect.left = 0;
383 if( rect.top < 0 ) rect.top = 0;
389 ownerEnabled = DIALOG_DisableOwner( owner );
390 if (ownerEnabled) dlgInfo->flags |= DF_OWNERENABLED;
393 hwnd = WIN_Handle32( CreateWindowEx16(exStyle, template.className,
394 template.caption, template.style & ~WS_VISIBLE,
395 rect.left, rect.top, rect.right, rect.bottom,
396 HWND_16(owner), HMENU_16(dlgInfo->hMenu),
400 if (dlgInfo->hUserFont) DeleteObject( dlgInfo->hUserFont );
401 if (dlgInfo->hMenu) DestroyMenu( dlgInfo->hMenu );
402 if (modal && (dlgInfo->flags & DF_OWNERENABLED)) DIALOG_EnableOwner(owner);
403 HeapFree( GetProcessHeap(), 0, dlgInfo );
406 wndPtr = WIN_GetPtr( hwnd );
407 wndPtr->flags |= WIN_ISDIALOG;
408 WIN_ReleasePtr( wndPtr );
410 SetWindowLongW( hwnd, DWL_WINE_DIALOGINFO, (LONG)dlgInfo );
411 SetWindowLong16( HWND_16(hwnd), DWL_DLGPROC, (LONG)dlgProc );
413 if (dlgInfo->hUserFont)
414 SendMessageA( hwnd, WM_SETFONT, (WPARAM)dlgInfo->hUserFont, 0 );
416 /* Create controls */
418 if (DIALOG_CreateControls16( hwnd, dlgTemplate, &template, hInst ))
420 HWND hwndPreInitFocus;
422 /* Send initialisation messages and set focus */
424 dlgInfo->hwndFocus = GetNextDlgTabItem( hwnd, 0, FALSE );
426 hwndPreInitFocus = GetFocus();
427 if (SendMessageA( hwnd, WM_INITDIALOG, (WPARAM)dlgInfo->hwndFocus, param ))
429 /* check where the focus is again,
430 * some controls status might have changed in WM_INITDIALOG */
431 dlgInfo->hwndFocus = GetNextDlgTabItem( hwnd, 0, FALSE);
432 if( dlgInfo->hwndFocus )
433 SetFocus( dlgInfo->hwndFocus );
437 /* If the dlgproc has returned FALSE (indicating handling of keyboard focus)
438 but the focus has not changed, set the focus where we expect it. */
439 if ((GetFocus() == hwndPreInitFocus) &&
440 (GetWindowLongW( hwnd, GWL_STYLE ) & WS_VISIBLE))
442 dlgInfo->hwndFocus = GetNextDlgTabItem( hwnd, 0, FALSE);
443 if( dlgInfo->hwndFocus )
444 SetFocus( dlgInfo->hwndFocus );
448 if (template.style & WS_VISIBLE && !(GetWindowLongW( hwnd, GWL_STYLE ) & WS_VISIBLE))
450 ShowWindow( hwnd, SW_SHOWNORMAL ); /* SW_SHOW doesn't always work */
454 if( IsWindow(hwnd) ) DestroyWindow( hwnd );
455 if (modal && ownerEnabled) DIALOG_EnableOwner(owner);
460 /***********************************************************************
461 * DialogBox (USER.87)
463 INT16 WINAPI DialogBox16( HINSTANCE16 hInst, LPCSTR dlgTemplate,
464 HWND16 owner, DLGPROC16 dlgProc )
466 return DialogBoxParam16( hInst, dlgTemplate, owner, dlgProc, 0 );
470 /**************************************************************************
471 * EndDialog (USER.88)
473 BOOL16 WINAPI EndDialog16( HWND16 hwnd, INT16 retval )
475 return EndDialog( WIN_Handle32(hwnd), retval );
479 /***********************************************************************
480 * CreateDialog (USER.89)
482 HWND16 WINAPI CreateDialog16( HINSTANCE16 hInst, LPCSTR dlgTemplate,
483 HWND16 owner, DLGPROC16 dlgProc )
485 return CreateDialogParam16( hInst, dlgTemplate, owner, dlgProc, 0 );
489 /**************************************************************************
490 * GetDlgItem (USER.91)
492 HWND16 WINAPI GetDlgItem16( HWND16 hwndDlg, INT16 id )
494 return HWND_16( GetDlgItem( WIN_Handle32(hwndDlg), (UINT16) id ));
498 /**************************************************************************
499 * SetDlgItemText (USER.92)
501 void WINAPI SetDlgItemText16( HWND16 hwnd, INT16 id, SEGPTR lpString )
503 SendDlgItemMessage16( hwnd, id, WM_SETTEXT, 0, (LPARAM)lpString );
507 /**************************************************************************
508 * GetDlgItemText (USER.93)
510 INT16 WINAPI GetDlgItemText16( HWND16 hwnd, INT16 id, SEGPTR str, UINT16 len )
512 return (INT16)SendDlgItemMessage16( hwnd, id, WM_GETTEXT, len, (LPARAM)str );
516 /**************************************************************************
517 * SetDlgItemInt (USER.94)
519 void WINAPI SetDlgItemInt16( HWND16 hwnd, INT16 id, UINT16 value, BOOL16 fSigned )
521 SetDlgItemInt( WIN_Handle32(hwnd), (UINT)(UINT16)id,
522 (UINT)(fSigned ? (INT16) value : (UINT16) value), fSigned );
526 /**************************************************************************
527 * GetDlgItemInt (USER.95)
529 UINT16 WINAPI GetDlgItemInt16( HWND16 hwnd, INT16 id, BOOL16 *translated, BOOL16 fSigned )
534 if (translated) *translated = FALSE;
535 result = GetDlgItemInt( WIN_Handle32(hwnd), (UINT)(UINT16)id, &ok, fSigned );
539 if (((INT)result < -32767) || ((INT)result > 32767)) return 0;
543 if (result > 65535) return 0;
545 if (translated) *translated = TRUE;
546 return (UINT16)result;
550 /**************************************************************************
551 * CheckRadioButton (USER.96)
553 BOOL16 WINAPI CheckRadioButton16( HWND16 hwndDlg, UINT16 firstID,
554 UINT16 lastID, UINT16 checkID )
556 return CheckRadioButton( WIN_Handle32(hwndDlg), firstID, lastID, checkID );
560 /**************************************************************************
561 * CheckDlgButton (USER.97)
563 BOOL16 WINAPI CheckDlgButton16( HWND16 hwnd, INT16 id, UINT16 check )
565 SendDlgItemMessage16( hwnd, id, BM_SETCHECK16, check, 0 );
570 /**************************************************************************
571 * IsDlgButtonChecked (USER.98)
573 UINT16 WINAPI IsDlgButtonChecked16( HWND16 hwnd, UINT16 id )
575 return (UINT16)SendDlgItemMessage16( hwnd, id, BM_GETCHECK16, 0, 0 );
579 /**************************************************************************
580 * DlgDirSelect (USER.99)
582 BOOL16 WINAPI DlgDirSelect16( HWND16 hwnd, LPSTR str, INT16 id )
584 return DlgDirSelectEx16( hwnd, str, 128, id );
588 /**************************************************************************
589 * DlgDirList (USER.100)
591 INT16 WINAPI DlgDirList16( HWND16 hDlg, LPSTR spec, INT16 idLBox,
592 INT16 idStatic, UINT16 attrib )
594 /* according to Win16 docs, DDL_DRIVES should make DDL_EXCLUSIVE
595 * be set automatically (this is different in Win32, and
596 * DIALOG_DlgDirList sends Win32 messages to the control,
598 if (attrib & DDL_DRIVES) attrib |= DDL_EXCLUSIVE;
599 return DlgDirListA( WIN_Handle32(hDlg), spec, idLBox, idStatic, attrib );
603 /**************************************************************************
604 * SendDlgItemMessage (USER.101)
606 LRESULT WINAPI SendDlgItemMessage16( HWND16 hwnd, INT16 id, UINT16 msg,
607 WPARAM16 wParam, LPARAM lParam )
609 HWND16 hwndCtrl = GetDlgItem16( hwnd, id );
610 if (hwndCtrl) return SendMessage16( hwndCtrl, msg, wParam, lParam );
615 /**************************************************************************
616 * MapDialogRect (USER.103)
618 void WINAPI MapDialogRect16( HWND16 hwnd, LPRECT16 rect )
621 MapDialogRect( WIN_Handle32(hwnd), &rect32 );
622 rect->left = rect32.left;
623 rect->right = rect32.right;
624 rect->top = rect32.top;
625 rect->bottom = rect32.bottom;
629 /**************************************************************************
630 * DlgDirSelectComboBox (USER.194)
632 BOOL16 WINAPI DlgDirSelectComboBox16( HWND16 hwnd, LPSTR str, INT16 id )
634 return DlgDirSelectComboBoxEx16( hwnd, str, 128, id );
638 /**************************************************************************
639 * DlgDirListComboBox (USER.195)
641 INT16 WINAPI DlgDirListComboBox16( HWND16 hDlg, LPSTR spec, INT16 idCBox,
642 INT16 idStatic, UINT16 attrib )
644 return DlgDirListComboBoxA( WIN_Handle32(hDlg), spec, idCBox, idStatic, attrib );
648 /***********************************************************************
649 * DialogBoxIndirect (USER.218)
651 INT16 WINAPI DialogBoxIndirect16( HINSTANCE16 hInst, HANDLE16 dlgTemplate,
652 HWND16 owner, DLGPROC16 dlgProc )
654 return DialogBoxIndirectParam16( hInst, dlgTemplate, owner, dlgProc, 0 );
658 /***********************************************************************
659 * CreateDialogIndirect (USER.219)
661 HWND16 WINAPI CreateDialogIndirect16( HINSTANCE16 hInst, LPCVOID dlgTemplate,
662 HWND16 owner, DLGPROC16 dlgProc )
664 return CreateDialogIndirectParam16( hInst, dlgTemplate, owner, dlgProc, 0);
668 /**************************************************************************
669 * GetNextDlgGroupItem (USER.227)
671 HWND16 WINAPI GetNextDlgGroupItem16( HWND16 hwndDlg, HWND16 hwndCtrl,
674 return HWND_16( GetNextDlgGroupItem( WIN_Handle32(hwndDlg), WIN_Handle32(hwndCtrl), fPrevious ));
678 /**************************************************************************
679 * GetNextDlgTabItem (USER.228)
681 HWND16 WINAPI GetNextDlgTabItem16( HWND16 hwndDlg, HWND16 hwndCtrl,
684 return HWND_16( GetNextDlgTabItem( WIN_Handle32(hwndDlg), WIN_Handle32(hwndCtrl), fPrevious ));
688 /***********************************************************************
689 * DialogBoxParam (USER.239)
691 INT16 WINAPI DialogBoxParam16( HINSTANCE16 hInst, LPCSTR template,
692 HWND16 owner16, DLGPROC16 dlgProc, LPARAM param )
700 if (!(hRsrc = FindResource16( hInst, template, RT_DIALOGA ))) return 0;
701 if (!(hmem = LoadResource16( hInst, hRsrc ))) return 0;
702 if ((data = LockResource16( hmem )))
704 HWND owner = WIN_Handle32(owner16);
705 hwnd = DIALOG_CreateIndirect16( hInst, data, owner, dlgProc, param, TRUE );
706 if (hwnd) ret = DIALOG_DoDialogBox( hwnd, owner );
707 GlobalUnlock16( hmem );
709 FreeResource16( hmem );
714 /***********************************************************************
715 * DialogBoxIndirectParam (USER.240)
717 INT16 WINAPI DialogBoxIndirectParam16( HINSTANCE16 hInst, HANDLE16 dlgTemplate,
718 HWND16 owner16, DLGPROC16 dlgProc, LPARAM param )
720 HWND hwnd, owner = WIN_Handle32( owner16 );
723 if (!(ptr = GlobalLock16( dlgTemplate ))) return -1;
724 hwnd = DIALOG_CreateIndirect16( hInst, ptr, owner, dlgProc, param, TRUE );
725 GlobalUnlock16( dlgTemplate );
726 if (hwnd) return DIALOG_DoDialogBox( hwnd, owner );
731 /***********************************************************************
732 * CreateDialogParam (USER.241)
734 HWND16 WINAPI CreateDialogParam16( HINSTANCE16 hInst, LPCSTR dlgTemplate,
735 HWND16 owner, DLGPROC16 dlgProc, LPARAM param )
742 TRACE("%04x,%s,%04x,%08lx,%ld\n",
743 hInst, debugstr_a(dlgTemplate), owner, (DWORD)dlgProc, param );
745 if (!(hRsrc = FindResource16( hInst, dlgTemplate, RT_DIALOGA ))) return 0;
746 if (!(hmem = LoadResource16( hInst, hRsrc ))) return 0;
747 if (!(data = LockResource16( hmem ))) hwnd = 0;
748 else hwnd = CreateDialogIndirectParam16( hInst, data, owner, dlgProc, param );
749 FreeResource16( hmem );
754 /***********************************************************************
755 * CreateDialogIndirectParam (USER.242)
757 HWND16 WINAPI CreateDialogIndirectParam16( HINSTANCE16 hInst, LPCVOID dlgTemplate,
758 HWND16 owner, DLGPROC16 dlgProc, LPARAM param )
760 if (!dlgTemplate) return 0;
761 return HWND_16( DIALOG_CreateIndirect16( hInst, dlgTemplate, WIN_Handle32(owner),
762 dlgProc, param, FALSE ));
766 /**************************************************************************
767 * DlgDirSelectEx (USER.422)
769 BOOL16 WINAPI DlgDirSelectEx16( HWND16 hwnd, LPSTR str, INT16 len, INT16 id )
771 return DlgDirSelectExA( WIN_Handle32(hwnd), str, len, id );
775 /**************************************************************************
776 * DlgDirSelectComboBoxEx (USER.423)
778 BOOL16 WINAPI DlgDirSelectComboBoxEx16( HWND16 hwnd, LPSTR str, INT16 len,
781 return DlgDirSelectComboBoxExA( WIN_Handle32(hwnd), str, len, id );