Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Hacking the FRX (Part V)
Message
 
To
04/04/2000 16:33:01
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00354913
Message ID:
00355271
Views:
34
Hi John --

Word does everything in points. Near as I can figure, 750 points more or less is standard form size for the selected Normal font. My problem is a three variable problem: The length of the data vs. the length of the textbox in the report vs. the dimensions of the Textbox Shape in Word.

And the point is? <g>

Well, the gettextextent call recommended elsewhere was a good call. But that'll give you pixels. To convert to points, things get weird, be definition.

As to your problems with device contexts, you could consider creating one in memory.

I've got a formula here to convert points to pixels, ought to be pretty easy to transform for the other direction:

-(m_Font.Size * GetDeviceCaps(hDC, LOGPIXELSY)) / 72

This is actually used for the lfHeight element of a LOGFONT structure, so the negative sign isn't useful in this direct context.

Then again, it's entirely possible I haven't caught Clue #1 what you're up to. :-)

Later... Karl
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform