source: trunk/src/user32/windlg.cpp@ 2668

Last change on this file since 2668 was 2668, checked in by cbratschi, 26 years ago

ported WinHelpA from WINE

File size: 22.7 KB
Line 
1/* $Id: windlg.cpp,v 1.15 2000-02-06 17:39:35 cbratschi Exp $ */
2/*
3 * Win32 dialog apis for OS/2
4 *
5 * Copyright 1999 Sander van Leeuwen
6 *
7 * Parts based on Wine code (990815; window\dialog.c)
8 *
9 * Copyright 1993, 1994, 1996 Alexandre Julliard
10 *
11 * Project Odin Software License can be found in LICENSE.TXT
12 *
13 */
14#include <ctype.h>
15#include <wchar.h>
16#include <os2win.h>
17#include <misc.h>
18#include <stdio.h>
19#include <string.h>
20#include <stdlib.h>
21#include <limits.h>
22#include <errno.h>
23#include "win32wbase.h"
24#include "win32dlg.h"
25#include <heapstring.h>
26#include <win\drive.h>
27
28static INT DIALOG_DlgDirListW( HWND hDlg, LPWSTR spec, INT idLBox, INT idStatic, UINT attrib, BOOL combo );
29static INT DIALOG_DlgDirList( HWND hDlg, LPSTR spec, INT idLBox, INT idStatic, UINT attrib, BOOL combo );
30static BOOL DIALOG_DlgDirSelect( HWND hwnd, LPSTR str, INT len, INT id, BOOL win32, BOOL unicode, BOOL combo );
31
32//******************************************************************************
33//******************************************************************************
34HWND WIN32API CreateDialogParamA(HINSTANCE hInst, LPCSTR lpszTemplate,
35 HWND hwndOwner, DLGPROC dlgproc,
36 LPARAM lParamInit)
37{
38 HANDLE hrsrc = FindResourceA( hInst, lpszTemplate, RT_DIALOGA );
39
40 if (!hrsrc)
41 return 0;
42
43 return CreateDialogIndirectParamA(hInst, (LPCDLGTEMPLATEA)LoadResource(hInst, hrsrc),
44 hwndOwner, dlgproc, lParamInit);
45}
46//******************************************************************************
47//******************************************************************************
48HWND WIN32API CreateDialogParamW(HINSTANCE hInst, LPCWSTR lpszTemplate,
49 HWND hwndOwner, DLGPROC dlgproc,
50 LPARAM lParamInit)
51{
52 HANDLE hrsrc = FindResourceW( hInst, lpszTemplate, RT_DIALOGW );
53
54 if (!hrsrc)
55 return 0;
56
57 return CreateDialogIndirectParamW(hInst, (LPCDLGTEMPLATEW)LoadResource(hInst, hrsrc),
58 hwndOwner, dlgproc, lParamInit);
59}
60//******************************************************************************
61//******************************************************************************
62HWND WIN32API CreateDialogIndirectParamA(HINSTANCE hInst,
63 LPCDLGTEMPLATEA dlgtemplate,
64 HWND hwndParent, DLGPROC dlgproc,
65 LPARAM lParamInit)
66{
67 Win32Dialog *dialog;
68
69 dprintf(("CreateDialogIndirectParamA: %x %x %x %x %x", hInst, dlgtemplate, hwndParent, dlgproc, lParamInit));
70
71 if (!dlgtemplate) return 0;
72
73 dialog = new Win32Dialog(hInst, (LPCSTR)dlgtemplate, hwndParent, dlgproc, lParamInit, FALSE);
74
75 if(dialog == NULL)
76 {
77 dprintf(("Win32Dialog creation failed!!"));
78 return 0;
79 }
80 if(GetLastError() != 0)
81 {
82 dprintf(("Win32Dialog error found!!"));
83 delete dialog;
84 return 0;
85 }
86 return dialog->getWindowHandle();
87}
88//******************************************************************************
89//******************************************************************************
90HWND WIN32API CreateDialogIndirectParamW(HINSTANCE hInst,
91 LPCDLGTEMPLATEW dlgtemplate,
92 HWND hwndParent, DLGPROC dlgproc,
93 LPARAM lParamInit)
94{
95 Win32Dialog *dialog;
96
97 dprintf(("CreateDialogIndirectParamW: %x %x %x %x %x", hInst, dlgtemplate, hwndParent, dlgproc, lParamInit));
98
99 if (!dlgtemplate) return 0;
100
101 dialog = new Win32Dialog(hInst, (LPCSTR)dlgtemplate, hwndParent, dlgproc, lParamInit, TRUE);
102
103 if(dialog == NULL)
104 {
105 dprintf(("Win32Dialog creation failed!!"));
106 return 0;
107 }
108 if(GetLastError() != 0)
109 {
110 dprintf(("Win32Dialog error found!!"));
111 delete dialog;
112 return 0;
113 }
114 return dialog->getWindowHandle();
115}
116//******************************************************************************
117//******************************************************************************
118INT WIN32API DialogBoxIndirectParamA(HINSTANCE hInst,
119 LPCDLGTEMPLATEA dlgtemplate,
120 HWND hwndParent, DLGPROC dlgproc,
121 LPARAM lParamInit)
122{
123 HWND hwnd = CreateDialogIndirectParamA(hInst, dlgtemplate, hwndParent, dlgproc,
124 lParamInit);
125 if (hwnd)
126 {
127 Win32Dialog *dialog;
128
129 dialog = (Win32Dialog *)Win32BaseWindow::GetWindowFromHandle(hwnd);
130 if(!dialog || !dialog->IsDialog()) {
131 dprintf(("DialogBoxIndirectParamA, dialog %x not found", hwnd));
132 SetLastError(ERROR_INVALID_WINDOW_HANDLE);
133 return 0;
134 }
135 return dialog->doDialogBox();
136 }
137 return -1;
138}
139//******************************************************************************
140//******************************************************************************
141INT WIN32API DialogBoxIndirectParamW(HINSTANCE hInst, LPCDLGTEMPLATEW dlgtemplate,
142 HWND hwndParent, DLGPROC dlgproc,
143 LPARAM lParamInit)
144{
145 HWND hwnd = CreateDialogIndirectParamW(hInst, dlgtemplate, hwndParent, dlgproc,
146 lParamInit);
147 if (hwnd)
148 {
149 Win32Dialog *dialog;
150
151 dialog = (Win32Dialog *)Win32BaseWindow::GetWindowFromHandle(hwnd);
152 if(!dialog || !dialog->IsDialog()) {
153 dprintf(("DialogBoxIndirectParamW, dialog %x not found", hwnd));
154 SetLastError(ERROR_INVALID_WINDOW_HANDLE);
155 return 0;
156 }
157 return dialog->doDialogBox();
158 }
159 return -1;
160}
161//******************************************************************************
162//******************************************************************************
163int WIN32API DialogBoxParamA(HINSTANCE hInst, LPCSTR lpszTemplate, HWND hwndOwner,
164 DLGPROC dlgproc, LPARAM lParamInit)
165{
166 HWND hwnd = CreateDialogParamA( hInst, lpszTemplate, hwndOwner, dlgproc, lParamInit);
167
168 if (hwnd)
169 {
170 Win32Dialog *dialog;
171
172 dialog = (Win32Dialog *)Win32BaseWindow::GetWindowFromHandle(hwnd);
173 if(!dialog || !dialog->IsDialog()) {
174 dprintf(("DialogBoxParamA, dialog %x not found", hwnd));
175 SetLastError(ERROR_INVALID_WINDOW_HANDLE);
176 return 0;
177 }
178 return dialog->doDialogBox();
179 }
180 return -1;
181}
182//******************************************************************************
183//******************************************************************************
184int WIN32API DialogBoxParamW(HINSTANCE hInst, LPCWSTR lpszTemplate, HWND hwndOwner,
185 DLGPROC dlgproc, LPARAM lParamInit)
186{
187 HWND hwnd = CreateDialogParamW( hInst, lpszTemplate, hwndOwner, dlgproc, lParamInit);
188
189 if (hwnd)
190 {
191 Win32Dialog *dialog;
192
193 dialog = (Win32Dialog *)Win32BaseWindow::GetWindowFromHandle(hwnd);
194 if(!dialog || !dialog->IsDialog()) {
195 dprintf(("DialogBoxParamW, dialog %x not found", hwnd));
196 SetLastError(ERROR_INVALID_WINDOW_HANDLE);
197 return 0;
198 }
199 return dialog->doDialogBox();
200 }
201 return -1;
202}
203/***********************************************************************
204 * MapDialogRect32 (USER32.382)
205 */
206BOOL WIN32API MapDialogRect(HWND hwndDlg, LPRECT rect)
207{
208 Win32Dialog *dialog;
209
210 dialog = (Win32Dialog *)Win32BaseWindow::GetWindowFromHandle(hwndDlg);
211 if(!dialog || !dialog->IsDialog()) {
212 dprintf(("MapDialogRect, window %x not found", hwndDlg));
213 SetLastError(ERROR_INVALID_WINDOW_HANDLE);
214 return 0;
215 }
216 dprintf(("USER32: MapDialogRect\n"));
217 return dialog->MapDialogRect(rect);
218}
219//******************************************************************************
220//******************************************************************************
221BOOL WIN32API IsDlgButtonChecked( HWND hwnd, UINT id)
222{
223 dprintf(("USER32: IsDlgButtonChecked\n"));
224
225 return (BOOL)SendDlgItemMessageA(hwnd, id,BM_GETCHECK,0,0);
226}
227//******************************************************************************
228//******************************************************************************
229HWND WIN32API GetNextDlgTabItem(HWND hwndDlg, HWND hwndCtrl, BOOL fPrevious)
230{
231 Win32BaseWindow *window;
232
233 window = (Win32BaseWindow*)Win32BaseWindow::GetWindowFromHandle(hwndDlg);
234 if(!window) {
235 dprintf(("GetNextDlgTabItem, window %x not found", hwndDlg));
236 SetLastError(ERROR_INVALID_WINDOW_HANDLE);
237 return 0;
238 }
239 dprintf(("USER32: GetNextDlgTabItem\n"));
240 return window->getNextDlgTabItem(hwndCtrl, fPrevious);
241}
242//******************************************************************************
243//Can be used for any parent-child pair
244//******************************************************************************
245HWND WIN32API GetDlgItem(HWND hwnd, int id)
246{
247 Win32BaseWindow *dlgcontrol, *window;
248
249 window = (Win32Dialog *)Win32BaseWindow::GetWindowFromHandle(hwnd);
250 if(!window) {
251 dprintf(("GetDlgItem, window %x not found", hwnd));
252 SetLastError(ERROR_INVALID_WINDOW_HANDLE);
253 return 0;
254 }
255 dlgcontrol = window->FindWindowById(id);
256 if(dlgcontrol) {
257 dprintf(("USER32: GetDlgItem %x %d returned %x\n", hwnd, id, dlgcontrol->getWindowHandle()));
258 return dlgcontrol->getWindowHandle();
259 }
260 dprintf(("USER32: GetDlgItem %x %d NOT FOUND!\n", hwnd, id));
261 SetLastError(ERROR_INVALID_PARAMETER);
262 return 0;
263}
264//******************************************************************************
265//******************************************************************************
266int WIN32API GetDlgCtrlID(HWND hwnd)
267{
268 Win32BaseWindow *dlgcontrol;
269
270 dlgcontrol = Win32BaseWindow::GetWindowFromHandle(hwnd);
271 if(!dlgcontrol) {
272 dprintf(("GetDlgCtrlID, control %x not found", hwnd));
273 SetLastError(ERROR_INVALID_WINDOW_HANDLE);
274 return 0;
275 }
276 dprintf(("USER32: GetDlgCtrlID\n"));
277 return dlgcontrol->getWindowId();
278}
279//******************************************************************************
280//******************************************************************************
281BOOL WIN32API EndDialog(HWND hwnd, int retval)
282{
283 Win32Dialog *dialog;
284
285 dialog = (Win32Dialog *)Win32BaseWindow::GetWindowFromHandle(hwnd);
286 if(!dialog || !dialog->IsDialog()) {
287 dprintf(("GetDlgItem, window %x not found", hwnd));
288 SetLastError(ERROR_INVALID_WINDOW_HANDLE);
289 return 0;
290 }
291 dprintf(("USER32: EndDialog\n"));
292 return dialog->endDialog(retval);
293}
294//******************************************************************************
295//******************************************************************************
296BOOL WIN32API CheckDlgButton( HWND hwnd, int id, UINT check)
297{
298 dprintf(("USER32: CheckDlgButton\n"));
299
300 return (BOOL)SendDlgItemMessageA(hwnd, id, BM_SETCHECK, check,0);
301}
302//******************************************************************************
303//******************************************************************************
304BOOL WIN32API CheckRadioButton( HWND hDlg, UINT nIDFirstButton, UINT nIDLastButton, UINT nIDCheckButton)
305{
306 dprintf(("USER32: CheckRadioButton\n"));
307
308 //CB: check radio buttons in interval
309 if (nIDFirstButton > nIDLastButton)
310 {
311 SetLastError(ERROR_INVALID_PARAMETER);
312 return (FALSE);
313 }
314
315 for (UINT x = nIDFirstButton;x <= nIDLastButton;x++)
316 {
317 SendDlgItemMessageA(hDlg,x,BM_SETCHECK,(x == nIDCheckButton) ? BST_CHECKED : BST_UNCHECKED,0);
318 }
319
320 return (TRUE);
321}
322//******************************************************************************
323//******************************************************************************
324UINT WIN32API GetDlgItemTextA(HWND hwnd, int id, LPSTR lpszName, UINT cch)
325{
326 return SendDlgItemMessageA( hwnd, id, WM_GETTEXT, cch, (LPARAM)lpszName);
327}
328//*****************************************************************************
329//*****************************************************************************
330UINT WIN32API GetDlgItemTextW(HWND hwnd, int id, LPWSTR lpszName, UINT cch)
331{
332 return SendDlgItemMessageW( hwnd, id, WM_GETTEXT, cch, (LPARAM)lpszName);
333}
334//******************************************************************************
335//******************************************************************************
336BOOL WIN32API SetDlgItemInt( HWND hwnd, int idControl, UINT uValue, BOOL fSigned)
337{
338 char str[20];
339
340 dprintf(("USER32: SetDlgItemInt\n"));
341
342 if (fSigned)
343 sprintf( str, "%d", (INT)uValue );
344 else sprintf( str, "%u", uValue );
345
346 return SendDlgItemMessageA( hwnd, idControl, WM_SETTEXT, 0, (LPARAM)str );
347}
348//******************************************************************************
349//******************************************************************************
350BOOL WIN32API SetDlgItemTextA( HWND hwnd, int id, LPCSTR lpszName)
351{
352 return SendDlgItemMessageA( hwnd, id, WM_SETTEXT, 0, (LPARAM)lpszName );
353}
354//******************************************************************************
355//******************************************************************************
356BOOL WIN32API SetDlgItemTextW( HWND hwnd, int id, LPCWSTR lpszName)
357{
358 return SendDlgItemMessageW( hwnd, id, WM_SETTEXT, 0, (LPARAM)lpszName );
359}
360//******************************************************************************
361//******************************************************************************
362UINT WIN32API GetDlgItemInt(HWND hwnd, INT id, BOOL *translated, BOOL fSigned)
363{
364 char str[30];
365 char * endptr;
366 long result = 0;
367
368 dprintf(("USER32: GetDlgItemInt\n"));
369 if (translated) *translated = FALSE;
370
371 if (!SendDlgItemMessageA(hwnd, id, WM_GETTEXT, sizeof(str), (LPARAM)str))
372 return 0;
373
374 if (fSigned)
375 {
376 result = strtol( str, &endptr, 10 );
377 if (!endptr || (endptr == str)) /* Conversion was unsuccessful */
378 return 0;
379 if (((result == LONG_MIN) || (result == LONG_MAX)) && (errno==ERANGE))
380 return 0;
381 }
382 else
383 {
384 result = strtoul( str, &endptr, 10 );
385 if (!endptr || (endptr == str)) /* Conversion was unsuccessful */
386 return 0;
387 if ((result == ULONG_MAX) && (errno == ERANGE)) return 0;
388 }
389 if (translated) *translated = TRUE;
390 return (UINT)result;
391}
392//******************************************************************************
393//******************************************************************************
394HWND WIN32API GetNextDlgGroupItem( HWND hwnd, HWND hwndCtrl, BOOL fPrevious)
395{
396 Win32BaseWindow *window;
397
398 window = Win32BaseWindow::GetWindowFromHandle(hwnd);
399 if(!window) {
400 dprintf(("GetNextDlgGroupItem, window %x not found", hwnd));
401 SetLastError(ERROR_INVALID_WINDOW_HANDLE);
402 return 0;
403 }
404 dprintf(("USER32: GetNextDlgGroupItem\n"));
405 return window->getNextDlgGroupItem(hwndCtrl, fPrevious);
406}
407/***********************************************************************
408 * GetDialogBaseUnits (USER.243) (USER32.233)
409 */
410DWORD WIN32API GetDialogBaseUnits(void)
411{
412 return Win32Dialog::GetDialogBaseUnits();
413}
414//******************************************************************************
415//******************************************************************************
416INT WIN32API DlgDirListA(HWND hDlg, LPSTR spec, INT idLBox, INT idStatic, UINT attrib )
417{
418 return DIALOG_DlgDirList( hDlg, spec, idLBox, idStatic, attrib, FALSE );
419}
420//******************************************************************************
421//******************************************************************************
422int WIN32API DlgDirListW(HWND hDlg, LPWSTR spec, INT idLBox, INT idStatic, UINT attrib )
423{
424 return DIALOG_DlgDirListW( hDlg, spec, idLBox, idStatic, attrib, FALSE );
425}
426//******************************************************************************
427//******************************************************************************
428INT WIN32API DlgDirListComboBoxA(HWND hDlg, LPSTR spec, INT idCBox, INT idStatic, UINT attrib )
429{
430 return DIALOG_DlgDirList( hDlg, spec, idCBox, idStatic, attrib, TRUE );
431}
432//******************************************************************************
433//******************************************************************************
434INT WIN32API DlgDirListComboBoxW( HWND hDlg, LPWSTR spec, INT idCBox, INT idStatic, UINT attrib )
435{
436 return DIALOG_DlgDirListW( hDlg, spec, idCBox, idStatic, attrib, TRUE );
437}
438//******************************************************************************
439//******************************************************************************
440BOOL WIN32API DlgDirSelectComboBoxExA(HWND hwnd, LPSTR str, INT len, INT id )
441{
442 return DIALOG_DlgDirSelect( hwnd, str, len, id, TRUE, FALSE, TRUE );
443}
444//******************************************************************************
445//******************************************************************************
446BOOL WIN32API DlgDirSelectComboBoxExW(HWND hwnd, LPWSTR str, INT len, INT id)
447{
448 return DIALOG_DlgDirSelect( hwnd, (LPSTR)str, len, id, TRUE, TRUE, TRUE );
449}
450//******************************************************************************
451//******************************************************************************
452BOOL WIN32API DlgDirSelectExA(HWND hwnd, LPSTR str, INT len, INT id)
453{
454 return DIALOG_DlgDirSelect( hwnd, str, len, id, TRUE, FALSE, FALSE );
455}
456//******************************************************************************
457//******************************************************************************
458BOOL WIN32API DlgDirSelectExW(HWND hwnd, LPWSTR str, INT len, INT id)
459{
460 return DIALOG_DlgDirSelect( hwnd, (LPSTR)str, len, id, TRUE, TRUE, FALSE );
461}
462/**********************************************************************
463 * DIALOG_DlgDirSelect
464 *
465 * Helper function for DlgDirSelect*
466 */
467static BOOL DIALOG_DlgDirSelect( HWND hwnd, LPSTR str, INT len,
468 INT id, BOOL win32, BOOL unicode,
469 BOOL combo )
470{
471 char *buffer, *ptr;
472 INT item, size;
473 BOOL ret;
474 HWND listbox = GetDlgItem( hwnd, id );
475
476 if (!listbox) return FALSE;
477
478 item = SendMessageA(listbox, combo ? CB_GETCURSEL
479 : LB_GETCURSEL, 0, 0 );
480 if (item == LB_ERR) return FALSE;
481 size = SendMessageA(listbox, combo ? CB_GETLBTEXTLEN
482 : LB_GETTEXTLEN, 0, 0 );
483 if (size == LB_ERR) return FALSE;
484
485 if (!(buffer = (char *)malloc( size+1 ))) return FALSE;
486
487 SendMessageA( listbox, combo ? CB_GETLBTEXT : LB_GETTEXT,
488 item, (LPARAM)buffer );
489
490 if ((ret = (buffer[0] == '[')) != 0) /* drive or directory */
491 {
492 if (buffer[1] == '-') /* drive */
493 {
494 buffer[3] = ':';
495 buffer[4] = 0;
496 ptr = buffer + 2;
497 }
498 else
499 {
500 buffer[strlen(buffer)-1] = '\\';
501 ptr = buffer + 1;
502 }
503 }
504 else ptr = buffer;
505
506 if (unicode) lstrcpynAtoW( (LPWSTR)str, ptr, len );
507 else lstrcpynA( str, ptr, len );
508
509 free( buffer );
510 return ret;
511}
512
513
514/**********************************************************************
515 * DIALOG_DlgDirList
516 *
517 * Helper function for DlgDirList*
518 */
519static INT DIALOG_DlgDirList( HWND hDlg, LPSTR spec, INT idLBox,
520 INT idStatic, UINT attrib, BOOL combo )
521{
522 int drive;
523 HWND hwnd;
524 LPSTR orig_spec = spec;
525
526#define SENDMSG(msg,wparam,lparam) \
527 ((attrib & DDL_POSTMSGS) ? PostMessageA( hwnd, msg, wparam, lparam ) \
528 : SendMessageA( hwnd, msg, wparam, lparam ))
529
530 if (spec && spec[0] && (spec[1] == ':'))
531 {
532 drive = _toupper( spec[0] ) - 'A';
533 spec += 2;
534 if (!DRIVE_SetCurrentDrive( drive )) return FALSE;
535 }
536 else drive = DRIVE_GetCurrentDrive();
537
538 /* If the path exists and is a directory, chdir to it */
539 if (!spec || !spec[0] || DRIVE_Chdir( drive, spec )) spec = "*.*";
540 else
541 {
542 char *p, *p2;
543 p = spec;
544 if ((p2 = strrchr( p, '\\' )) != 0) p = p2;
545 if ((p2 = strrchr( p, '/' )) != 0) p = p2;
546 if (p != spec)
547 {
548 char sep = *p;
549 *p = 0;
550 if (!DRIVE_Chdir( drive, spec ))
551 {
552 *p = sep; /* Restore the original spec */
553 return FALSE;
554 }
555 spec = p + 1;
556 }
557 }
558
559 if (idLBox && ((hwnd = GetDlgItem( hDlg, idLBox )) != 0))
560 {
561 SENDMSG( combo ? CB_RESETCONTENT : LB_RESETCONTENT, 0, 0 );
562 if (attrib & DDL_DIRECTORY)
563 {
564 if (!(attrib & DDL_EXCLUSIVE))
565 {
566 if (SENDMSG( combo ? CB_DIR : LB_DIR,
567 attrib & ~(DDL_DIRECTORY | DDL_DRIVES),
568 (LPARAM)spec ) == LB_ERR)
569 return FALSE;
570 }
571 if (SENDMSG( combo ? CB_DIR : LB_DIR,
572 (attrib & (DDL_DIRECTORY | DDL_DRIVES)) | DDL_EXCLUSIVE,
573 (LPARAM)"*.*" ) == LB_ERR)
574 return FALSE;
575 }
576 else
577 {
578 if (SENDMSG( combo ? CB_DIR : LB_DIR, attrib,
579 (LPARAM)spec ) == LB_ERR)
580 return FALSE;
581 }
582 }
583
584 if (idStatic && ((hwnd = GetDlgItem( hDlg, idStatic )) != 0))
585 {
586 char temp[512], curpath[512];
587 int drive = DRIVE_GetCurrentDrive();
588 strcpy( temp, "A:\\" );
589 temp[0] += drive;
590 lstrcpynA( temp + 3, DRIVE_GetDosCwd(curpath, drive), sizeof(temp)-3 );
591 CharLowerA( temp );
592 /* Can't use PostMessage() here, because the string is on the stack */
593 SetDlgItemTextA( hDlg, idStatic, temp );
594 }
595
596 if (orig_spec && (spec != orig_spec))
597 {
598 /* Update the original file spec */
599 char *p = spec;
600 while ((*orig_spec++ = *p++) != 0);
601 }
602
603 return TRUE;
604#undef SENDMSG
605}
606
607
608/**********************************************************************
609 * DIALOG_DlgDirListW
610 *
611 * Helper function for DlgDirList*32W
612 */
613static INT DIALOG_DlgDirListW( HWND hDlg, LPWSTR spec, INT idLBox,
614 INT idStatic, UINT attrib, BOOL combo )
615{
616 if (spec)
617 {
618 LPSTR specA = HEAP_strdupWtoA( GetProcessHeap(), 0, spec );
619 INT ret = DIALOG_DlgDirList( hDlg, specA, idLBox, idStatic,
620 attrib, combo );
621 lstrcpyAtoW( spec, specA );
622 HeapFree( GetProcessHeap(), 0, specA );
623 return ret;
624 }
625 return DIALOG_DlgDirList( hDlg, NULL, idLBox, idStatic, attrib, combo );
626}
627//******************************************************************************
628//******************************************************************************
629
Note: See TracBrowser for help on using the repository browser.