From 1106bb17a429aff32e227a6f2973c8d1df536e3e Mon Sep 17 00:00:00 2001 From: paul Date: Fri, 25 Mar 2011 09:04:25 +0000 Subject: [PATCH] win32: reduce warnings and hints git-svn-id: trunk@30015 - --- lcl/interfaces/win32/win32proc.pp | 10 ---------- lcl/interfaces/win32/win32winapi.inc | 4 ++-- lcl/interfaces/win32/win32wsforms.pp | 8 ++++++++ 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/lcl/interfaces/win32/win32proc.pp b/lcl/interfaces/win32/win32proc.pp index 18ab820e74..6ab16d5c35 100644 --- a/lcl/interfaces/win32/win32proc.pp +++ b/lcl/interfaces/win32/win32proc.pp @@ -96,7 +96,6 @@ procedure GetWin32ControlPos(Window, Parent: HWND; var Left, Top: integer); procedure UpdateWindowStyle(Handle: HWnd; Style: integer; StyleMask: integer); function BorderStyleToWin32Flags(Style: TFormBorderStyle): DWORD; function BorderStyleToWin32FlagsEx(Style: TFormBorderStyle): DWORD; -function GetDesigningBorderStyle(const AForm: TCustomForm): TFormBorderStyle; function AllocWindowInfo(Window: HWND): PWin32WindowInfo; function DisposeWindowInfo(Window: HWND): boolean; @@ -916,15 +915,6 @@ begin end; end; -function GetDesigningBorderStyle(const AForm: TCustomForm): TFormBorderStyle; -{$NOTE Belongs in Win32WSForms, but is needed in windowproc} -begin - if csDesigning in AForm.ComponentState then - Result := bsSizeable - else - Result := AForm.BorderStyle; -end; - function AllocWindowInfo(Window: HWND): PWin32WindowInfo; var WindowInfo: PWin32WindowInfo; diff --git a/lcl/interfaces/win32/win32winapi.inc b/lcl/interfaces/win32/win32winapi.inc index 9fcc493ff7..c9d021b1f5 100644 --- a/lcl/interfaces/win32/win32winapi.inc +++ b/lcl/interfaces/win32/win32winapi.inc @@ -2234,8 +2234,8 @@ begin Width := Right - Left; Height := Bottom - Top; end; - Width := Width - 2 * Info.cxWindowBorders; - Height := Height - 2 * Info.cyWindowBorders; + Width := Width - 2 * Integer(Info.cxWindowBorders); + Height := Height - 2 * Integer(Info.cyWindowBorders); ExcludeCaption; //WriteLn('W = ', Width, ' H = ', Height); Exit; diff --git a/lcl/interfaces/win32/win32wsforms.pp b/lcl/interfaces/win32/win32wsforms.pp index 8b6fc5a8a4..ce13c1637f 100644 --- a/lcl/interfaces/win32/win32wsforms.pp +++ b/lcl/interfaces/win32/win32wsforms.pp @@ -231,6 +231,14 @@ end; { TWin32WSCustomForm } +function GetDesigningBorderStyle(const AForm: TCustomForm): TFormBorderStyle; +begin + if csDesigning in AForm.ComponentState then + Result := bsSizeable + else + Result := AForm.BorderStyle; +end; + function CalcBorderIconsFlags(const AForm: TCustomForm): DWORD; var BorderIcons: TBorderIcons;