Einzelnen Beitrag anzeigen

walharth

Registriert seit: 12. Nov 2006
13 Beiträge
 
Delphi 10.4 Sydney
 
#5

Re: TToolBar97 Anzeige-Problem unter Windows Vista

  Alt 24. Mär 2008, 08:52
Vielen Dank erstmal, für eure Antworten.

Ich denke dass iregndwas in diesem Teil des Source codes verändert werden muss, weiss aber nicht wie und was...
Delphi-Quellcode:
function TCustomToolWindow97.GetFloatingBorderSize: TPoint;
{ Returns size of a thick border. Note that, depending on the Windows version,
  this may not be the same as the actual window metrics since it draws its
  own border }

const
  XMetrics: array[Boolean] of Integer = (SM_CXDLGFRAME, SM_CXFRAME);
  YMetrics: array[Boolean] of Integer = (SM_CYDLGFRAME, SM_CYFRAME);
begin
  Result.X := GetSystemMetrics(XMetrics[Resizable]);
  Result.Y := GetSystemMetrics(YMetrics[Resizable]);
end;

procedure TCustomToolWindow97.GetFloatingNCArea (var TopLeft, BottomRight: TPoint);
begin
  with GetFloatingBorderSize do begin
    TopLeft.X := X;
    TopLeft.Y := Y;
    if ShowCaption then
      Inc (TopLeft.Y, GetSmallCaptionHeight);
    BottomRight.X := X;
    BottomRight.Y := Y;
  end;
end;

function GetCaptionRect (const Control: TCustomToolWindow97;
  const AdjustForBorder, MinusCloseButton: Boolean): TRect;
begin
  Result := Rect(0, 0, Control.ClientWidth, GetSmallCaptionHeight-1);
  if MinusCloseButton then
    Dec (Result.Right, Result.Bottom);
  if AdjustForBorder then
    with Control.GetFloatingBorderSize do
      OffsetRect (Result, X, Y);
end;

function GetSmallCaptionHeight: Integer;
{ Returns height of the caption of a small window }
begin
  if NewStyleControls then
    Result := GetSystemMetrics(SM_CYSMCAPTION)
  else
    { Win 3.x doesn't support small captions, so, like Office 97, use the size
      of normal captions minus one }

    Result := GetSystemMetrics(SM_CYCAPTION) - 1;
end;

Ich wäre euch sehr dankbar für eine Lösung des Problems.
Vielen Dank im Voraus,

mfg,
Walter

[edit=Sharky]Delphi-Tags gesetzt. Mfg, Sharky[/edit]
  Mit Zitat antworten Zitat