From: Luigino on 8 Mar 2010 04:44 Hello everyone, I'm trying to draw a legenda on memDC like: colour square : description | colour square : description |.... since I need to apply an offset, is there a function or something to calculate the relative length of strings on graphic surface?... I think a character correspond to certain dot pitch length multiplied to n-chars of the string... Thanks Ciao Luigi
From: Mikel on 8 Mar 2010 05:17 On 8 mar, 10:44, Luigino <npul...(a)rocketmail.com> wrote: > Hello everyone, > > I'm trying to draw a legenda on memDC like: > > colour square : description | colour square : description |.... > > since I need to apply an offset, is there a function or something to > calculate the relative length of strings on graphic surface?... > I think a character correspond to certain dot pitch length multiplied > to n-chars of the string... > > Thanks > Ciao > Luigi Take a look at CDC::GetTextExtent CDC::GetOutputTextExtent and similar ones
From: David Lowndes on 8 Mar 2010 05:17 >since I need to apply an offset, is there a function or something to >calculate the relative length of strings on graphic surface?... Have a look at the GetTextExtentPoint32 API. Dave
From: Luigino on 8 Mar 2010 05:44 On 8 Mar, 11:17, David Lowndes <Dav...(a)example.invalid> wrote: > >since I need to apply an offset, is there a function or something to > >calculate the relative length of strings on graphic surface?... > > Have a look at the GetTextExtentPoint32 API. > > Dave Tryed it! and it worked! Thanks Dave!! :-)
|
Pages: 1 Prev: What is the best way to drive (time) animations? Next: Text output and kerning? |