I'm trying to learn a little more about simple win32 programming with the comdlg and comcrtl. I ripped Andriy's browse dialog from notepad to make this work however execution of the selected file is still is broken. If this is accepted I will see what else I can do with the winelib programs. Changelog: Partial fix for browse dialog in Program Manager. cvs diff -u dialog.c Index: dialog.c =================================================================== RCS file: /home/wine/wine/programs/progman/dialog.c,v retrieving revision 1.5 diff -u -r1.5 dialog.c --- dialog.c 10 Mar 2002 00:21:19 -0000 1.5 +++ dialog.c 21 Aug 2002 19:26:18 -0000 @@ -2,6 +2,7 @@ * Program Manager * * Copyright 1996 Ulrich Schmid + * Copyright 2002 Andriy Palamarchuk * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -550,31 +551,43 @@ static BOOL DIALOG_Browse(HWND hDlg, LPCSTR lpszzFilter, LPSTR lpstrFile, INT nMaxFile) + { - OPENFILENAME openfilename; + OPENFILENAME openfilename; + + CHAR szPath[MAX_PATH]; + CHAR szDir[MAX_PATH]; + CHAR szDefaultExt[] = "exe"; + + ZeroMemory(&openfilename, sizeof(openfilename)); + + GetCurrentDirectory(sizeof(szDir), szDir); + lstrcpy(szPath,"*.exe"); + + /* FIXME is this correct ? */ + openfilename.lStructSize = sizeof(openfilename); + openfilename.hwndOwner = Globals.hMainWnd; + openfilename.hInstance = Globals.hInstance; + openfilename.lpstrFile = szPath; + openfilename.nMaxFile = sizeof(szPath); + openfilename.lpstrInitialDir = szDir; + openfilename.Flags = 0; + openfilename.lpstrDefExt = szDefaultExt; + openfilename.lpstrCustomFilter = 0; + openfilename.nMaxCustFilter = 0; + openfilename.nFilterIndex = 0; + openfilename.lpstrFileTitle = 0; + openfilename.nMaxFileTitle = 0; + openfilename.lpstrInitialDir = 0; + openfilename.lpstrTitle = 0; + openfilename.nFileOffset = 0; + openfilename.nFileExtension = 0; + openfilename.lCustData = 0; + openfilename.lpfnHook = 0; + openfilename.lpTemplateName = 0; - /* FIXME is this correct ? */ - openfilename.lStructSize = 0; - openfilename.hwndOwner = hDlg; - openfilename.hInstance = Globals.hInstance; - openfilename.lpstrFilter = (LPSTR)lpszzFilter; - openfilename.lpstrCustomFilter = 0; - openfilename.nMaxCustFilter = 0; - openfilename.nFilterIndex = 0; - openfilename.lpstrFile = lpstrFile; - openfilename.nMaxFile = nMaxFile; - openfilename.lpstrFileTitle = 0; - openfilename.nMaxFileTitle = 0; - openfilename.lpstrInitialDir = 0; - openfilename.lpstrTitle = 0; - openfilename.Flags = 0; - openfilename.nFileOffset = 0; - openfilename.nFileExtension = 0; - openfilename.lpstrDefExt = 0; - openfilename.lCustData = 0; - openfilename.lpfnHook = 0; - openfilename.lpTemplateName = 0; - return GetOpenFileName(&openfilename); + return GetOpenFileName(&openfilename); + /* FIXME */ } /*********************************************************************** __________________________________________________ Do You Yahoo!? HotJobs - Search Thousands of New Jobs http://www.hotjobs.com