[lazarus] GTK team: please specify!

Marc Weustink marc.weustink at cuperus.nl
Fri Oct 31 10:30:23 EST 2003


+ From: Mattias Gaertner [mailto:nc-gaertnma at netcologne.de]
+ Sent: vrijdag 31 oktober 2003 16:22
+
+ On Fri, 31 Oct 2003 15:57:32 +0100
+ "Marc Weustink" <marc.weustink at cuperus.nl> wrote:
+
+ > From your example:
+ > Icon at 50,50.
+ > DC of groupbox at 30,30
+ >
+ > Suggestion:
+ >
+ > hwnd := GetWindowFromDC(GroupboxDC)
+ > P := Point(50, 50)
+ > MapWindowPoints(Form.Handle, hwnd, @P, 1)
+ >
+ > Now P should have the coords relative to the GroupBoxDC
+
+ ok.
+ For optimization, I think, we should add a new interface
+ function, which use as default these 3 lines. For example function
+ MapWindowDCPositionToScreen(DC: HDC; const DCPosition: TPoint; var
+ ScreenPosition: TPoint): boolean;

Ehm... my lines calculate the position relative to the form, not the
screen.
(or at leasdt that was what I had in mind).

+ The gtk will override it.

Why ?

GetWindowFromDC and MapWindowPoints are already widgetset dependant
functions.

Marc






More information about the Lazarus mailing list