Is there a simple way to center the text of a tooltip within a window?
I have code to calculate the center of the window. However, if the tooltip is, "This is my tooltip to display.", then "This" is put in the center, and the remaining text is right of center. I want the center of the text string put in the center of the window.
My only thought is to somehow calculate the pixel length of the tooltip, but I'm not sure how to do that. I'm not sure how Windows determines what font and font size to use for a tooltip either.
Centering tooltip text within a window
2 replies to this topic