Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2003-10

Non-visual component drawing

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Micha Nelissen
M. wrote 17 lines
Mattias Gaertner wrote: >On Mon, 27 Oct 2003 16:23:16 +0100 >Micha Nelissen wrote: > >>On second thought, it does get executed, but GetDeviceSize is not >>implemented for win32, because it is not possible to retrieve the size >>of a device context given a specific handle. Please advise :(. > > >Is it possible to find out, if a handle is a window and return the size? The handle is a device context, an HDC. It is possible to find out the size of a window, for example using GetWindowRect, but that function wants an HWND, not an HDC.

Ok, I have implemented this using WindowFromDC and similar tricks.

However, now a new incompatibility surfaces: what coordinates is TInterfaceObject.GetWindowOrgEx supposed to return? In screen coordinates or in client? I have this feeling gtk returns relative to screen origin, while win32 returns relative to client origin.

Micha.

Reply by email