Hi

How to get rid of "Font.Handle" in the following code?
"Font.Handle" is deprecated;.


  Font := TFont.Create;
  Font.Name := '';
  Font.CharSet := CS;
  DC := GetDC(0);
  try
    Save := SelectObject(DC, HGDIOBJ(Font.Handle));
    GetTextMetrics(DC, tm);

    ... do something ...

    SelectObject(DC, Save);
  Finally
    ReleaseDC(0, DC);
    Font.Free;
  end;


I haven't done much with graphics or fonts and this may be a stupid question.

Juha

--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to