On Mon, 14 Sep 2015 18:16:19 +0200 Jürgen Hestermann <[email protected]> wrote:
>[...] > > If you had a look at the win32 implementation of GetTextExtentPoint then > > you would have seen that GetTextExtentPoint32 is used internally. > > > Realy? > Where do you find this? > I only find the opposite. > When I follow where Canvas.TextWidth comes from > I end up on in this function from "canvas.inc" (line 1763): > > function TCanvas.TextExtent(const Text: string): TSize; > begin > Result.cX := 0; > Result.cY := 0; > if Text='' then exit; > RequiredState([csHandleValid, csFontValid]); > GetTextExtentPoint(FHandle, PChar(Text), Length(Text), Result); > end; > > Even more, there is a function declaration for "GetTextExtendPoint32" > but it still uses "GetTextExtendPoint" (line 1162 in "intfbasewinapi.inc"): > > function TWidgetSet.GetTextExtentPoint32(DC: HDC; Str: PChar; Count: Integer; > var Size: TSize): Boolean; > begin > Result := GetTextExtentPoint(DC,Str,Count,Size); > end; TWidgetSet is the base class. TWin32WidgetSet overrides the base class TWidgetSet. Mattias -- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
