More bitmap fixes.
[wine] / programs / progman / dialog.c
1 /*
2  * Program Manager
3  *
4  * Copyright 1996 Ulrich Schmid
5  */
6
7 #include "windows.h"
8 #include "commdlg.h"
9 #include "progman.h"
10
11 static BOOL    DIALOG_BrowsePrograms(HWND, LPSTR, INT);
12 static BOOL    DIALOG_BrowseSymbols(HWND, LPSTR, INT);
13 static LRESULT DIALOG_NEW_DlgProc(HWND, UINT, WPARAM, LPARAM);
14 static LRESULT DIALOG_COPY_MOVE_DlgProc(HWND, UINT, WPARAM, LPARAM);
15 static LRESULT DIALOG_GROUP_DlgProc(HWND, UINT, WPARAM, LPARAM);
16 static LRESULT DIALOG_PROGRAM_DlgProc(HWND, UINT, WPARAM, LPARAM);
17 static LRESULT DIALOG_SYMBOL_DlgProc(HWND, UINT, WPARAM, LPARAM);
18 static LRESULT DIALOG_EXECUTE_DlgProc(HWND, UINT, WPARAM, LPARAM);
19
20 /***********************************************************************
21  *
22  *           DIALOG_New
23  */
24
25 static struct
26 {
27   INT nDefault;
28 } New;
29
30 INT DIALOG_New(INT nDefault)
31 {
32   WNDPROC lpfnDlg = MakeProcInstance(DIALOG_NEW_DlgProc, Globals.hInstance);
33   INT ret;
34
35   New.nDefault = nDefault;
36
37   ret = DialogBox(Globals.hInstance,  STRING_NEW_Xx,
38                   Globals.hMainWnd, lpfnDlg);
39   FreeProcInstance(lpfnDlg);
40   return ret;
41 }
42
43 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
44  *
45  *           DIALOG_NEW_DlgProc
46  */
47
48 static LRESULT DIALOG_NEW_DlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
49 {
50   switch (msg)
51     {
52     case WM_INITDIALOG:
53       CheckRadioButton(hDlg, PM_NEW_GROUP, PM_NEW_PROGRAM, New.nDefault);
54       break;
55
56     case WM_COMMAND:
57       switch (wParam)
58         {
59         case PM_NEW_GROUP:
60         case PM_NEW_PROGRAM:
61           CheckRadioButton(hDlg, PM_NEW_GROUP, PM_NEW_PROGRAM, wParam);
62           return TRUE;
63
64         case IDOK:
65           EndDialog(hDlg, IsDlgButtonChecked(hDlg, PM_NEW_GROUP) ?
66                     PM_NEW_GROUP : PM_NEW_PROGRAM);
67           return TRUE;
68
69         case IDCANCEL:
70           EndDialog(hDlg, IDCANCEL);
71           return TRUE;
72         }
73     }
74   return FALSE;
75 }
76
77 /***********************************************************************
78  *
79  *           DIALOG_CopyMove
80  */
81
82 static struct
83 {
84   LPCSTR lpszProgramName, lpszFromGroupName;
85   HLOCAL hToGroup;
86 } CopyMove;
87
88 HLOCAL DIALOG_CopyMove(LPCSTR lpszProgramName, LPCSTR lpszFromGroupName,
89                      BOOL bMove)
90 {
91   WNDPROC lpfnDlg = MakeProcInstance(DIALOG_COPY_MOVE_DlgProc, Globals.hInstance);
92   INT ret;
93
94   CopyMove.lpszProgramName   = lpszProgramName;
95   CopyMove.lpszFromGroupName = lpszFromGroupName;
96   CopyMove.hToGroup          = 0;
97
98   ret = DialogBox(Globals.hInstance,
99                   bMove ? STRING_MOVE_Xx : STRING_COPY_Xx,
100                   Globals.hMainWnd, lpfnDlg);
101   FreeProcInstance(lpfnDlg);
102
103   return((ret == IDOK) ? CopyMove.hToGroup : 0);
104 }
105
106 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
107  *
108  *           DIALOG_COPY_MOVE_DlgProc
109  */
110
111 static LRESULT DIALOG_COPY_MOVE_DlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
112 {
113   HLOCAL hGroup;
114
115   switch (msg)
116     {
117     case WM_INITDIALOG:
118       /* List all group names */
119       for (hGroup = GROUP_FirstGroup(); hGroup; hGroup = GROUP_NextGroup(hGroup))
120         SendDlgItemMessage(hDlg, PM_TO_GROUP, CB_ADDSTRING, 0,
121                            (LPARAM) GROUP_GroupName(hGroup));
122
123       SetDlgItemText(hDlg, PM_PROGRAM,    (LPSTR)CopyMove.lpszProgramName);
124       SetDlgItemText(hDlg, PM_FROM_GROUP, (LPSTR)CopyMove.lpszFromGroupName);
125       break;
126
127     case WM_COMMAND:
128       switch (wParam)
129         {
130         case IDOK:
131         {
132           /* Get selected group */
133           INT nCurSel    = SendDlgItemMessage(hDlg, PM_TO_GROUP, CB_GETCURSEL, 0, 0);
134           INT nLen       = SendDlgItemMessage(hDlg, PM_TO_GROUP, CB_GETLBTEXTLEN, nCurSel, 0);
135           HLOCAL hBuffer = LocalAlloc(LMEM_FIXED, nLen + 1);
136           LPSTR   buffer = LocalLock(hBuffer);
137
138           SendDlgItemMessage(hDlg, PM_TO_GROUP, CB_GETLBTEXT, nCurSel, (LPARAM)buffer);
139           for (hGroup = GROUP_FirstGroup(); hGroup; hGroup = GROUP_NextGroup(hGroup))
140             if (!lstrcmp(buffer, GROUP_GroupName(hGroup))) break;
141           LocalFree(hBuffer);
142
143           CopyMove.hToGroup = hGroup;
144           EndDialog(hDlg, IDOK);
145           return TRUE;
146         }
147
148         case IDCANCEL:
149           EndDialog(hDlg, IDCANCEL);
150           return TRUE;
151         }
152     }
153   return FALSE;
154 }
155
156 /***********************************************************************
157  *
158  *           DIALOG_Delete
159  */
160
161 BOOL DIALOG_Delete(UINT ids_text_s, LPCSTR lpszName)
162 {
163   return (IDYES == MAIN_MessageBoxIDS_s(ids_text_s, lpszName, IDS_DELETE,
164                                         MB_YESNO | MB_DEFBUTTON2));
165 }
166
167
168 /***********************************************************************
169  *
170  *           DIALOG_GroupAttributes
171  */
172
173 static struct
174 {
175   LPSTR lpszTitle, lpszGrpFile;
176   INT   nSize;
177 } GroupAttributes;
178
179 BOOL DIALOG_GroupAttributes(LPSTR lpszTitle, LPSTR lpszGrpFile, INT nSize)
180 {
181   WNDPROC lpfnDlg = MakeProcInstance(DIALOG_GROUP_DlgProc, Globals.hInstance);
182   INT ret;
183
184   GroupAttributes.nSize       = nSize;
185   GroupAttributes.lpszTitle   = lpszTitle;
186   GroupAttributes.lpszGrpFile = lpszGrpFile;
187
188   ret = DialogBox(Globals.hInstance,  STRING_GROUP_Xx,
189                   Globals.hMainWnd, lpfnDlg);
190   FreeProcInstance(lpfnDlg);
191   return(ret == IDOK);
192 }
193
194 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
195  *
196  *           DIALOG_GROUP_DlgProc
197  */
198
199 static LRESULT DIALOG_GROUP_DlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
200 {
201   switch (msg)
202     {
203     case WM_INITDIALOG:
204       SetDlgItemText(hDlg, PM_DESCRIPTION, GroupAttributes.lpszTitle);
205       SetDlgItemText(hDlg, PM_FILE, GroupAttributes.lpszGrpFile);
206       break;
207
208     case WM_COMMAND:
209       switch (wParam)
210         {
211         case IDOK:
212           GetDlgItemText(hDlg, PM_DESCRIPTION, GroupAttributes.lpszTitle,
213                          GroupAttributes.nSize);
214           GetDlgItemText(hDlg, PM_FILE, GroupAttributes.lpszGrpFile,
215                          GroupAttributes.nSize);
216           EndDialog(hDlg, IDOK);
217           return TRUE;
218
219         case IDCANCEL:
220           EndDialog(hDlg, IDCANCEL);
221           return TRUE;
222         }
223     }
224   return FALSE;
225 }
226
227 /***********************************************************************
228  *
229  *           DIALOG_ProgramAttributes
230  */
231
232 static struct
233 {
234   LPSTR lpszTitle, lpszCmdLine, lpszWorkDir, lpszIconFile, lpszTmpIconFile;
235   INT   nSize;
236   INT   *lpnCmdShow;
237   INT   *lpnHotKey;
238   HWND  hSelGroupWnd;
239   HICON *lphIcon, hTmpIcon;
240   INT   *lpnIconIndex, nTmpIconIndex;
241 } ProgramAttributes;
242
243 BOOL DIALOG_ProgramAttributes(LPSTR lpszTitle, LPSTR lpszCmdLine,
244                               LPSTR lpszWorkDir, LPSTR lpszIconFile,
245                               HICON *lphIcon, INT *lpnIconIndex,
246                               INT *lpnHotKey, INT *lpnCmdShow, INT nSize)
247 {
248   CHAR szTmpIconFile[MAX_PATHNAME_LEN];
249   WNDPROC lpfnDlg = MakeProcInstance(DIALOG_PROGRAM_DlgProc, Globals.hInstance);
250   INT ret;
251
252   ProgramAttributes.nSize = nSize;
253   ProgramAttributes.lpszTitle = lpszTitle;
254   ProgramAttributes.lpszCmdLine = lpszCmdLine;
255   ProgramAttributes.lpszWorkDir = lpszWorkDir;
256   ProgramAttributes.lpszIconFile = lpszIconFile;
257   ProgramAttributes.lpnCmdShow = lpnCmdShow;
258   ProgramAttributes.lpnHotKey = lpnHotKey;
259   ProgramAttributes.lphIcon = lphIcon;
260   ProgramAttributes.lpnIconIndex = lpnIconIndex;
261
262 #if 0
263   ProgramAttributes.hTmpIcon = 0;
264 #else
265   ProgramAttributes.hTmpIcon = *lphIcon;
266 #endif
267   ProgramAttributes.nTmpIconIndex = *lpnIconIndex;
268   ProgramAttributes.lpszTmpIconFile = szTmpIconFile;
269   lstrcpyn(ProgramAttributes.lpszTmpIconFile, lpszIconFile, MAX_PATHNAME_LEN);
270
271   ret = DialogBox(Globals.hInstance,  STRING_PROGRAM_Xx,
272                   Globals.hMainWnd, lpfnDlg);
273   FreeProcInstance(lpfnDlg);
274
275   return(ret == IDOK);
276 }
277
278 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
279  *
280  *           DIALOG_PROGRAM_DlgProc
281  */
282
283 static LRESULT DIALOG_PROGRAM_DlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
284 {
285   CHAR buffer[MAX_STRING_LEN];
286   switch (msg)
287     {
288     case WM_INITDIALOG:
289       SetDlgItemText(hDlg, PM_DESCRIPTION, ProgramAttributes.lpszTitle);
290       SetDlgItemText(hDlg, PM_COMMAND_LINE, ProgramAttributes.lpszCmdLine);
291       SetDlgItemText(hDlg, PM_DIRECTORY, ProgramAttributes.lpszWorkDir);
292       if (!*ProgramAttributes.lpnHotKey)
293         {
294           LoadString(Globals.hInstance, IDS_NO_HOT_KEY, buffer, sizeof(buffer));
295           SetDlgItemText(hDlg, PM_HOT_KEY, buffer);
296         }
297
298       CheckDlgButton(hDlg, PM_SYMBOL,
299                      (*ProgramAttributes.lpnCmdShow == SW_SHOWMINIMIZED));
300       SendDlgItemMessage(hDlg, PM_ICON, STM_SETICON,
301                          (WPARAM) ProgramAttributes.hTmpIcon, 0);
302       break;
303
304     case WM_COMMAND:
305       switch (wParam)
306         {
307         case PM_SYMBOL:
308           CheckDlgButton(hDlg, PM_SYMBOL, !IsDlgButtonChecked(hDlg, PM_SYMBOL));
309           return TRUE;
310
311         case PM_BROWSE:
312           {
313             CHAR filename[MAX_PATHNAME_LEN];
314             if (DIALOG_BrowsePrograms(hDlg, filename, sizeof(filename)))
315               SetDlgItemText(hDlg, PM_COMMAND_LINE, filename);
316             return TRUE;
317           }
318
319         case PM_OTHER_SYMBOL:
320           {
321             DIALOG_Symbol(&ProgramAttributes.hTmpIcon,
322                           ProgramAttributes.lpszTmpIconFile,
323                           &ProgramAttributes.nTmpIconIndex,
324                           MAX_PATHNAME_LEN);
325
326             SendDlgItemMessage(hDlg, PM_ICON, STM_SETICON,
327                                (WPARAM) ProgramAttributes.hTmpIcon, 0);
328             return TRUE;
329           }
330
331         case IDOK:
332           GetDlgItemText(hDlg, PM_DESCRIPTION,
333                          ProgramAttributes.lpszTitle,
334                          ProgramAttributes.nSize);
335           GetDlgItemText(hDlg, PM_COMMAND_LINE,
336                          ProgramAttributes.lpszCmdLine,
337                          ProgramAttributes.nSize);
338           GetDlgItemText(hDlg, PM_DIRECTORY,
339                          ProgramAttributes.lpszWorkDir,
340                          ProgramAttributes.nSize);
341
342           if (ProgramAttributes.hTmpIcon)
343             {
344 #if 0
345               if (*ProgramAttributes.lphIcon)
346                 DestroyIcon(*ProgramAttributes.lphIcon);
347 #endif
348               *ProgramAttributes.lphIcon = ProgramAttributes.hTmpIcon;
349               *ProgramAttributes.lpnIconIndex = ProgramAttributes.nTmpIconIndex;
350               lstrcpyn(ProgramAttributes.lpszIconFile,
351                        ProgramAttributes.lpszTmpIconFile,
352                        ProgramAttributes.nSize);
353             }
354
355           *ProgramAttributes.lpnCmdShow =
356             IsDlgButtonChecked(hDlg, PM_SYMBOL) ?
357             SW_SHOWMINIMIZED : SW_SHOWNORMAL;
358           EndDialog(hDlg, IDOK);
359           return TRUE;
360
361         case IDCANCEL:
362           EndDialog(hDlg, IDCANCEL);
363           return TRUE;
364         }
365       return FALSE;
366     }
367   return FALSE;
368 }
369
370 /***********************************************************************
371  *
372  *           DIALOG_Symbol
373  */
374
375 static struct
376 {
377   LPSTR  lpszIconFile;
378   INT    nSize;
379   HICON  *lphIcon;
380   INT    *lpnIconIndex;
381 } Symbol;
382
383 VOID DIALOG_Symbol(HICON *lphIcon, LPSTR lpszIconFile,
384                    INT *lpnIconIndex, INT nSize)
385 {
386   WNDPROC lpfnDlg = MakeProcInstance(DIALOG_SYMBOL_DlgProc, Globals.hInstance);
387
388   Symbol.nSize = nSize;
389   Symbol.lpszIconFile = lpszIconFile;
390   Symbol.lphIcon = lphIcon;
391   Symbol.lpnIconIndex = lpnIconIndex;
392
393   DialogBox(Globals.hInstance, STRING_SYMBOL_Xx,
394             Globals.hMainWnd, lpfnDlg);
395   FreeProcInstance(lpfnDlg);
396 }
397
398 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
399  *
400  *           DIALOG_SYMBOL_DlgProc
401  */
402
403 static LRESULT DIALOG_SYMBOL_DlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
404 {
405   switch (msg)
406     {
407     case WM_INITDIALOG:
408       SetDlgItemText(hDlg, PM_ICON_FILE, Symbol.lpszIconFile);
409       SendDlgItemMessage(hDlg, PM_SYMBOL_LIST, CB_SETITEMHEIGHT, 0, (LPARAM) 32);
410       SendDlgItemMessage(hDlg, PM_SYMBOL_LIST, CB_ADDSTRING, 0, (LPARAM)*Symbol.lphIcon);
411       SendDlgItemMessage(hDlg, PM_SYMBOL_LIST, CB_ADDSTRING, 0, (LPARAM)Globals.hDefaultIcon);
412       SendDlgItemMessage(hDlg, PM_SYMBOL_LIST, CB_SETCURSEL, 0, 0);
413       return TRUE;
414
415     case WM_MEASUREITEM:
416       {
417         PMEASUREITEMSTRUCT measure = (PMEASUREITEMSTRUCT) lParam;
418         measure->itemWidth = 32;
419         measure->itemHeight = 32;
420         return TRUE;
421       }
422
423     case WM_DRAWITEM:
424       {
425         PDRAWITEMSTRUCT dis = (PDRAWITEMSTRUCT) lParam;
426         DrawIcon(dis->hDC, dis->rcItem.left, dis->rcItem.top, (HICON)dis->itemData);
427         return TRUE;
428       }
429
430     case WM_COMMAND:
431       switch (wParam)
432         {
433         case PM_BROWSE:
434           {
435             CHAR filename[MAX_PATHNAME_LEN];
436             if (DIALOG_BrowseSymbols(hDlg, filename, sizeof(filename)))
437               SetDlgItemText(hDlg, PM_ICON_FILE, filename);
438             return TRUE;
439           }
440
441         case PM_HELP:
442           MAIN_MessageBoxIDS(IDS_NOT_IMPLEMENTED, IDS_ERROR, MB_OK);
443           return TRUE;
444
445         case IDOK:
446           {
447             INT nCurSel = SendDlgItemMessage(hDlg, PM_SYMBOL_LIST, CB_GETCURSEL, 0, 0);
448
449             GetDlgItemText(hDlg, PM_ICON_FILE, Symbol.lpszIconFile, Symbol.nSize);
450
451             *Symbol.lphIcon = (HICON)SendDlgItemMessage(hDlg, PM_SYMBOL_LIST,
452                                                         CB_GETITEMDATA,
453                                                         (WPARAM) nCurSel, 0);
454 #if 0
455             *Symbol.lphIcon = CopyIcon(*Symbol.lphIcon);
456 #endif
457
458             EndDialog(hDlg, IDOK);
459             return TRUE;
460           }
461
462         case IDCANCEL:
463           EndDialog(hDlg, IDCANCEL);
464           return TRUE;
465         }
466     }
467   return FALSE;
468 }
469
470 /***********************************************************************
471  *
472  *           DIALOG_Execute
473  */
474
475 VOID DIALOG_Execute()
476 {
477   WNDPROC lpfnDlg = MakeProcInstance(DIALOG_EXECUTE_DlgProc, Globals.hInstance);
478   DialogBox(Globals.hInstance, STRING_EXECUTE_Xx,
479             Globals.hMainWnd, lpfnDlg);
480   FreeProcInstance(lpfnDlg);
481 }
482
483 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
484  *
485  *           DIALOG_EXECUTE_DlgProc
486  */
487
488 static LRESULT DIALOG_EXECUTE_DlgProc(HWND hDlg, UINT msg,
489                                       WPARAM wParam, LPARAM lParam)
490 {
491   switch (msg)
492     {
493     case WM_COMMAND:
494       switch (wParam)
495         {
496         case PM_SYMBOL:
497           CheckDlgButton(hDlg, PM_SYMBOL, !IsDlgButtonChecked(hDlg, PM_SYMBOL));
498           return TRUE;
499
500         case PM_BROWSE:
501           {
502             CHAR filename[MAX_PATHNAME_LEN];
503             if (DIALOG_BrowsePrograms(hDlg, filename, sizeof(filename)))
504               SetDlgItemText(hDlg, PM_COMMAND, filename);
505             return TRUE;
506           }
507
508         case PM_HELP:
509           MAIN_MessageBoxIDS(IDS_NOT_IMPLEMENTED, IDS_ERROR, MB_OK);
510           return TRUE;
511
512         case IDOK:
513           {
514             CHAR cmdline[MAX_PATHNAME_LEN];
515             GetDlgItemText(hDlg, PM_COMMAND, cmdline, sizeof(cmdline));
516
517             WinExec(cmdline, IsDlgButtonChecked(hDlg, PM_SYMBOL) ?
518                     SW_SHOWMINIMIZED : SW_SHOWNORMAL);
519             if (Globals.bMinOnRun) CloseWindow(Globals.hMainWnd);
520
521             EndDialog(hDlg, IDOK);
522             return TRUE;
523           }
524
525         case IDCANCEL:
526           EndDialog(hDlg, IDCANCEL);
527           return TRUE;
528         }
529     }
530   return FALSE;
531 }
532
533 /***********************************************************************
534  *
535  *           DIALOG_Browse
536  */
537
538 static BOOL DIALOG_Browse(HWND hDlg, LPCSTR lpszzFilter,
539                           LPSTR lpstrFile, INT nMaxFile)
540 {
541   OPENFILENAME openfilename;
542
543   /* FIXME is this correct ? */
544   openfilename.lStructSize       = 0;
545   openfilename.hwndOwner         = hDlg;
546   openfilename.hInstance         = Globals.hInstance;
547   openfilename.lpstrFilter       = (LPSTR)lpszzFilter;
548   openfilename.lpstrCustomFilter = 0;
549   openfilename.nMaxCustFilter    = 0;
550   openfilename.nFilterIndex      = 0;
551   openfilename.lpstrFile         = lpstrFile;
552   openfilename.nMaxFile          = sizeof(lpstrFile);
553   openfilename.lpstrFileTitle    = 0;
554   openfilename.nMaxFileTitle     = 0;
555   openfilename.lpstrInitialDir   = 0;
556   openfilename.lpstrTitle        = 0;
557   openfilename.Flags             = 0;
558   openfilename.nFileOffset       = 0;
559   openfilename.nFileExtension    = 0;
560   openfilename.lpstrDefExt       = 0;
561   openfilename.lCustData         = 0;
562   openfilename.lpfnHook          = 0;
563   openfilename.lpTemplateName    = 0;
564   return GetOpenFileName(&openfilename);
565 }
566
567 /***********************************************************************
568  *
569  *           DIALOG_AddFilterItem
570  */
571
572 static VOID DIALOG_AddFilterItem(LPSTR *p, UINT ids, LPCSTR filter)
573 {
574   LoadString(Globals.hInstance, ids, *p, MAX_STRING_LEN);
575   *p += strlen(*p) + 1;
576   lstrcpy(*p, filter);
577   *p += strlen(*p) + 1;
578   **p = '\0';
579 }
580
581 /***********************************************************************
582  *
583  *           DIALOG_BrowsePrograms
584  */
585
586 static BOOL DIALOG_BrowsePrograms(HWND hDlg, LPSTR lpszFile, INT nMaxFile)
587 {
588   CHAR  szzFilter[2 * MAX_STRING_LEN + 100];
589   LPSTR p = szzFilter;
590
591   DIALOG_AddFilterItem(&p, IDS_PROGRAMS,  "*.exe;*.pif;*.com;*.bat");
592   DIALOG_AddFilterItem(&p, IDS_ALL_FILES, "*.*");
593
594   return(DIALOG_Browse(hDlg, szzFilter, lpszFile, nMaxFile));
595 }
596
597 /***********************************************************************
598  *
599  *           DIALOG_BrowseSymbols
600  */
601
602 static BOOL DIALOG_BrowseSymbols(HWND hDlg, LPSTR lpszFile, INT nMaxFile)
603 {
604   CHAR  szzFilter[5 * MAX_STRING_LEN + 100];
605   LPSTR p = szzFilter;
606
607   DIALOG_AddFilterItem(&p, IDS_SYMBOL_FILES,  "*.ico;*.exe;*.dll");
608   DIALOG_AddFilterItem(&p, IDS_PROGRAMS,      "*.exe");
609   DIALOG_AddFilterItem(&p, IDS_LIBRARIES_DLL, "*.dll");
610   DIALOG_AddFilterItem(&p, IDS_SYMBOLS_ICO,   "*.ico");
611   DIALOG_AddFilterItem(&p, IDS_ALL_FILES,     "*.*");
612
613   return(DIALOG_Browse(hDlg, szzFilter, lpszFile, nMaxFile));
614 }
615
616 /* Local Variables:    */
617 /* c-file-style: "GNU" */
618 /* End:                */