Is there a way to writing text at the center of a control's window using
Call GetDC() on the window to get the DC handle associated with it, thenQuote:> Is there a way to writing text at the center of a control's window
> the hwnd?
X = (Surface.Width - Text.Width) \ 2
Y = (Surface.Height - Text.Height) \ 2
You can find out more about the GetTextExtentPoint32() call here:
Hope this helps,
- Microsoft Visual Basic MVP -
Please avoid posting the same message to several different groups.
If more than one group applies, then include them all on the To line
in a single message. Multiposting means the messages and replies
stay in the groups you posted to. Crossposting means the message
and replies are shared across all included groups.
Avoid multiposting, use crossposting sparingly.
It is better for all involved if all the replies are made visible in all the groups
you posted to. Also, avoid posting to non-relavent groups, please....
Dear OpenGL users,
I've got code from sgi (xfont.c) that opens and loads a font
and allows printing in an x-window; I've also read chapter 8 in the
"OpenGL Programming Guide." However, I need more control than OpenGL
seems to gives me (according to chapter 8). Specifically, I need to control
the size of the text I want to write into a window (I'm writing a utility
that graphs results and it needs axis labels, etc...), and short of
loading a new font, there's seems to be no way to do this.
Any hints about how I might proceed would be greatly appreciated.
Thanks for your time and trouble.
2. Texture maps