LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 100
Default How do you x-late GetTextExtentPoint32's units into the real world?

I know this gets asked regularly, but:

I've got a couple of text-centering and -wrapping demands that Excel
can't do automatically.

Exactly what do the units returned by GetTextExtentPoint32, and how do
you translate, convert, or otherwise use them to determine whether a
string fits horizontally inside a cell--taking into account font size
and attributes, screen resolution, etc.?

The best I can do now is to use an arbitrary conversion factor (which
varies between about 7.5-9.0, depending on column width)--and it STILL
returns the wrong result when I port the workbook to another system.

***

(One of my applications is: I have rows holding text in the first cell
of each row, with no blank rows separating each row of text. So I need
to wrap the text in each first cell, and indent the left side of the
second-and-on wrapped lines by say 3 spaces, leaving only the first
line out-dented. Maybe there's an easier way to do that than
programmatically?)

Thanks much.

***
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Units Produced / (finish time minus start time)=Units Per Hr Gary A Excel Worksheet Functions 1 February 10th 09 01:35 AM
Adjust scale of chart to match real world Pat B Charts and Charting in Excel 3 September 12th 07 05:26 PM
What in the world is it doing?? G Lykos Excel Programming 7 June 13th 06 12:44 PM
World Cup Bill[_37_] Excel Programming 0 December 20th 05 08:07 PM
Late Binding or Late Anything Piranha[_56_] Excel Programming 4 October 15th 05 03:42 AM


All times are GMT +1. The time now is 06:47 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"