From fa1810d49d4be6e295867a09407eaa7812ace500 Mon Sep 17 00:00:00 2001 From: paul Date: Mon, 18 Feb 2008 07:48:50 +0000 Subject: [PATCH] fix win32 compilation with fpc 2.2.1 git-svn-id: trunk@14178 - --- lcl/interfaces/win32/win32wsdialogs.pp | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/lcl/interfaces/win32/win32wsdialogs.pp b/lcl/interfaces/win32/win32wsdialogs.pp index c681f47460..2b03bae56e 100644 --- a/lcl/interfaces/win32/win32wsdialogs.pp +++ b/lcl/interfaces/win32/win32wsdialogs.pp @@ -27,6 +27,16 @@ unit Win32WSDialogs; interface uses +{$IF FPC_VERSION < 2} + {$DEFINE OLD_PLACE} +{$IFEND} +{$IF (FPC_VERSION = 2) AND (FPC_RELEASE < 2)} + {$DEFINE OLD_PLACE} +{$IFEND} +{$IF (FPC_VERSION = 2) AND (FPC_RELEASE = 2) AND (FPC_PATCH = 0)} + {$DEFINE OLD_PLACE} +{$IFEND} + //////////////////////////////////////////////////// // I M P O R T A N T //////////////////////////////////////////////////// @@ -35,8 +45,8 @@ uses //////////////////////////////////////////////////// // rtl Windows, ShellApi, ActiveX, SysUtils, Classes, -{$IFNDEF VER2_2} - commdlg, +{$IFNDEF OLD_PLACE} + CommDlg, {$ENDIF} // lcl LCLProc, LCLType, Dialogs, Controls, Graphics, Forms, @@ -759,7 +769,7 @@ begin begin LStructSize := sizeof(TChooseFont); HWndOwner := GetOwnerHandle(ACommonDialog); -{$ifndef ver2_2} +{$ifndef OLD_PLACE} LPLogFont := commdlg.PLOGFONT(@LF); {$else} LPLogFont := windows.PLOGFONT(@LF);