General information
Category:
Reports & Report designer
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only