Drawing Auto-adjusted proportioned text
-
Hi! I have a Box with certain width and height. The box has to contain a certain text that should be visible inside the box no matter how long it is. So, if the text is too small then it should take as much space in the box as possible. Its size should be inversly proportional to the text length. But I have to maintain its actual characters proportion too. Any body who has ever done it in MFC. I am using VC 8
-
Hi! I have a Box with certain width and height. The box has to contain a certain text that should be visible inside the box no matter how long it is. So, if the text is too small then it should take as much space in the box as possible. Its size should be inversly proportional to the text length. But I have to maintain its actual characters proportion too. Any body who has ever done it in MFC. I am using VC 8
-
You should at first draw the text in a memory DC and than make StretchBlt to the wanted size. Read MFC class CDC.
Greetings from Germany
But how to draw text in the DC memory?
modified on Thursday, October 16, 2008 6:38 AM
-
But how to draw text in the DC memory?
modified on Thursday, October 16, 2008 6:38 AM
-
Hi! I have a Box with certain width and height. The box has to contain a certain text that should be visible inside the box no matter how long it is. So, if the text is too small then it should take as much space in the box as possible. Its size should be inversly proportional to the text length. But I have to maintain its actual characters proportion too. Any body who has ever done it in MFC. I am using VC 8
I think that there isn't any GDI API function to make such job. try this link: http://msdn.microsoft.com/es-es/library/4acfw2ha(VS.80).aspx#_mfc_cdc_text_functions[^]