From d9dfb7ca868efdf07fd52b197937e22cc053dbd4 Mon Sep 17 00:00:00 2001 From: paul Date: Fri, 15 Apr 2011 13:04:12 +0000 Subject: [PATCH] win32: fix win32dialogs compilation with recent fpc 2.5.1 on win64 platform (based on patch of Cyrax, issue #0019163) git-svn-id: trunk@30301 - --- lcl/interfaces/win32/win32wsdialogs.pp | 6 +++--- lcl/interfaces/win32/win32wsextdlgs.pp | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lcl/interfaces/win32/win32wsdialogs.pp b/lcl/interfaces/win32/win32wsdialogs.pp index 82d4a37473..3d7d2e185b 100644 --- a/lcl/interfaces/win32/win32wsdialogs.pp +++ b/lcl/interfaces/win32/win32wsdialogs.pp @@ -154,7 +154,7 @@ type {$endif} function OpenFileDialogCallBack(Wnd: HWND; uMsg: UINT; wParam: WPARAM; - lParam: LPARAM): UINT; stdcall; + lParam: LPARAM): UINT_PTR; stdcall; function SaveApplicationState: TApplicationState; procedure RestoreApplicationState(AState: TApplicationState); @@ -480,7 +480,7 @@ end; } function OpenFileDialogCallBack(Wnd: HWND; uMsg: UINT; wParam: WPARAM; - lParam: LPARAM): UINT; stdcall; + lParam: LPARAM): UINT_PTR; stdcall; var OpenFileNotify: LPOFNOTIFY; OpenFileName: Windows.POPENFILENAME; @@ -701,7 +701,7 @@ begin {$endif} nMaxFile := FileNameBufferLen + 1; // Size in TCHARs - lpfnHook := @OpenFileDialogCallBack; + lpfnHook := LPOFNHOOKPROC(@OpenFileDialogCallBack); Flags := GetFlagsFromOptions(AOpenDialog.Options); New(DialogRec); // new initializes the filename fields, because ansistring and widestring diff --git a/lcl/interfaces/win32/win32wsextdlgs.pp b/lcl/interfaces/win32/win32wsextdlgs.pp index 1b65511af1..2c0be9c0b4 100644 --- a/lcl/interfaces/win32/win32wsextdlgs.pp +++ b/lcl/interfaces/win32/win32wsextdlgs.pp @@ -99,7 +99,7 @@ implementation {$R *.res} function OpenPictureDialogCallBack(hWnd: Handle; uMsg: UINT; wParam: WPARAM; - lParam: LPARAM): UINT; stdcall; + lParam: LPARAM): UINT_PTR; stdcall; var OpenFileName: Windows.POPENFILENAME; DialogRec: POpenFileDialogRec; @@ -162,7 +162,7 @@ begin Move(PChar(AnsiString(ResName))^, lpTemplateName^, Length(ResName)); end; Flags := Flags or OFN_ENABLETEMPLATE; - lpfnHook := @OpenPictureDialogCallBack; + lpfnHook := LPOFNHOOKPROC(@OpenPictureDialogCallBack); end; end;