From: Colin Wilson Subject: Re: Anyone with experience of DrawTextParams? Date: 07 Oct 1999 00:00:00 GMT Message-ID: Content-Transfer-Encoding: 8bit References: <7thk7s$elv10@forums.borland.com> Content-Type: text/plain; charset=iso-8859-1 Organization: Another Netscape Collabra Server User Mime-Version: 1.0 Reply-To: colin@wilsonc.demon.co.uk Newsgroups: borland.public.delphi.graphics In article <7thk7s$elv10@forums.borland.com>, Sarah Lander wrote: > I can't seem to work out what I should put for cbSize. Has anyone got an > example? > Put in the size of the DrawTextParams structure - eg. procedure TForm1.Button1Click(Sender: TObject); var textParams : DrawTextParams; rect : TRect; begin textParams.cbSize := sizeof (textParams); textParams.iTabLength := 15; textParams.iLeftMargin := 1; textParams.iRightMargin := 1; rect := ClientRect; if DrawTextEx (Canvas.Handle, 'Test'#9'Test'#9'Test', -1, rect, DT_LEFT or DT_VCENTER or DT_EXPANDTABS or DT_SINGLELINE, @textParams) = 0 then RaiseLastWin32Error; end; Colin e-mail :colin@wilsonc.demon.co.uk web: http://www.wilsonc.demon.co.uk/delphi.htm