mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 18:19:08 +02:00
win32: fixed warning
git-svn-id: trunk@9813 -
This commit is contained in:
parent
3140af0ad5
commit
29c4abf8ee
@ -228,7 +228,7 @@ function OpenFileDialogCallBack(hwnd : Handle; uMsg : UINT; wParam: WPARAM;
|
|||||||
var
|
var
|
||||||
OpenFileNotify: LPOFNOTIFY;
|
OpenFileNotify: LPOFNOTIFY;
|
||||||
OpenFileName: POPENFILENAME;
|
OpenFileName: POPENFILENAME;
|
||||||
NeededSize: DWORD;
|
NeededSize: SizeInt;
|
||||||
FileNames: pstring;
|
FileNames: pstring;
|
||||||
begin
|
begin
|
||||||
if uMsg = WM_NOTIFY then begin
|
if uMsg = WM_NOTIFY then begin
|
||||||
@ -241,11 +241,11 @@ begin
|
|||||||
// GetFolderPath returns upper limit for the path, GetSpec for the files.
|
// GetFolderPath returns upper limit for the path, GetSpec for the files.
|
||||||
// This is not exact because the GetSpec returns the size for
|
// This is not exact because the GetSpec returns the size for
|
||||||
// '"file1.txt" "file2.txt"', so that size will be two bytes per filename
|
// '"file1.txt" "file2.txt"', so that size will be two bytes per filename
|
||||||
// more than needed in the lpStrFile buffer.
|
// more than needed in thlengthe lpStrFile buffer.
|
||||||
NeededSize := CommDlg_OpenSave_GetFolderPath(GetParent(hwnd), nil, 0) +
|
NeededSize := CommDlg_OpenSave_GetFolderPath(GetParent(hwnd), nil, 0) +
|
||||||
CommDlg_OpenSave_GetSpec(GetParent(hwnd), nil, 0);
|
CommDlg_OpenSave_GetSpec(GetParent(hwnd), nil, 0);
|
||||||
// test if we need to use our own storage
|
// test if we need to use our own storage
|
||||||
if OpenFileName^.nMaxFile<NeededSize then begin
|
if SizeInt(OpenFileName^.nMaxFile)<NeededSize then begin
|
||||||
if OpenFileName^.lCustData=0 then
|
if OpenFileName^.lCustData=0 then
|
||||||
OpenFileName^.lCustData := Windows.LParam(new(PString));
|
OpenFileName^.lCustData := Windows.LParam(new(PString));
|
||||||
FileNames := PString(OpenFileName^.lCustData);
|
FileNames := PString(OpenFileName^.lCustData);
|
||||||
|
Loading…
Reference in New Issue
Block a user