Partial fix for browse dialog in Program Manager.
This commit is contained in:
parent
9fd3538b45
commit
dd1484a219
|
@ -2,6 +2,7 @@
|
||||||
* Program Manager
|
* Program Manager
|
||||||
*
|
*
|
||||||
* Copyright 1996 Ulrich Schmid
|
* Copyright 1996 Ulrich Schmid
|
||||||
|
* Copyright 2002 Andriy Palamarchuk
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU Lesser General Public
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
@ -550,31 +551,43 @@ static BOOL CALLBACK DIALOG_EXECUTE_DlgProc(HWND hDlg, UINT msg,
|
||||||
|
|
||||||
static BOOL DIALOG_Browse(HWND hDlg, LPCSTR lpszzFilter,
|
static BOOL DIALOG_Browse(HWND hDlg, LPCSTR lpszzFilter,
|
||||||
LPSTR lpstrFile, INT nMaxFile)
|
LPSTR lpstrFile, INT nMaxFile)
|
||||||
{
|
|
||||||
OPENFILENAME openfilename;
|
|
||||||
|
|
||||||
/* FIXME is this correct ? */
|
{
|
||||||
openfilename.lStructSize = 0;
|
OPENFILENAME openfilename;
|
||||||
openfilename.hwndOwner = hDlg;
|
|
||||||
openfilename.hInstance = Globals.hInstance;
|
CHAR szPath[MAX_PATH];
|
||||||
openfilename.lpstrFilter = (LPSTR)lpszzFilter;
|
CHAR szDir[MAX_PATH];
|
||||||
openfilename.lpstrCustomFilter = 0;
|
CHAR szDefaultExt[] = "exe";
|
||||||
openfilename.nMaxCustFilter = 0;
|
|
||||||
openfilename.nFilterIndex = 0;
|
ZeroMemory(&openfilename, sizeof(openfilename));
|
||||||
openfilename.lpstrFile = lpstrFile;
|
|
||||||
openfilename.nMaxFile = nMaxFile;
|
GetCurrentDirectory(sizeof(szDir), szDir);
|
||||||
openfilename.lpstrFileTitle = 0;
|
lstrcpy(szPath,"*.exe");
|
||||||
openfilename.nMaxFileTitle = 0;
|
|
||||||
openfilename.lpstrInitialDir = 0;
|
/* FIXME is this correct ? */
|
||||||
openfilename.lpstrTitle = 0;
|
openfilename.lStructSize = sizeof(openfilename);
|
||||||
openfilename.Flags = 0;
|
openfilename.hwndOwner = Globals.hMainWnd;
|
||||||
openfilename.nFileOffset = 0;
|
openfilename.hInstance = Globals.hInstance;
|
||||||
openfilename.nFileExtension = 0;
|
openfilename.lpstrFile = szPath;
|
||||||
openfilename.lpstrDefExt = 0;
|
openfilename.nMaxFile = sizeof(szPath);
|
||||||
openfilename.lCustData = 0;
|
openfilename.lpstrInitialDir = szDir;
|
||||||
openfilename.lpfnHook = 0;
|
openfilename.Flags = 0;
|
||||||
openfilename.lpTemplateName = 0;
|
openfilename.lpstrDefExt = szDefaultExt;
|
||||||
return GetOpenFileName(&openfilename);
|
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;
|
||||||
|
|
||||||
|
return GetOpenFileName(&openfilename);
|
||||||
|
/* FIXME */
|
||||||
}
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
|
|
Loading…
Reference in New Issue