win32: reduce warnings and hints

git-svn-id: trunk@30015 -
This commit is contained in:
paul 2011-03-25 09:04:25 +00:00
parent f5f836b7d6
commit 1106bb17a4
3 changed files with 10 additions and 12 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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;