VoyForums

Login ] [ Contact Forum Admin ] [ Main index ] [ Post a new message ] [ Search | Check update time | Archives: 123[4]5678910 ]


[ Next Thread | Previous Thread | Next Message | Previous Message ]

Date Posted: 05:43:23 04/03/03 Thu
Author: Michel
Subject: Re: overlay labels
In reply to: Chandru 's message, "overlay labels" on 11:20:08 04/01/03 Tue


Hi Chandru,

If you don't want the text to be zoomed when the image is resized, you need to draw on the Canvas of the control being displayed. If the text is to be permanent, you can draw on TGraphic.Canvas.

For example, you can create a TCanvas on any windows control:

Canvas := TCanvas.Create;
Canvas.Handle := GetDC(Control.Handle);

Canvas.Font.Size := 10;
Canvas.Font.Name := 'Arial';
Canvas.Font.Style := [fsBold];
Canvas.Font.Color := clLime;
SetBkMode(Canvas.Handle, Windows.TRANSPARENT);

Canvas.TextOut(4, 2, 'Your text');

ReleaseDC(Control.Handle, Canvas.Handle);
Canvas.Free;

Best regards,

Michel

>how does one overlay static labels or static text on
>an image and keep them there as the user zooms in or
>out
>Thanks in advance for any help

[ Next Thread | Previous Thread | Next Message | Previous Message ]

[ Contact Forum Admin ]


Forum timezone: GMT-5
VF Version: 3.00b, ConfDB:
Before posting please read our privacy policy.
VoyForums(tm) is a Free Service from Voyager Info-Systems.
Copyright © 1998-2019 Voyager Info-Systems. All Rights Reserved.