G
Guest
I have a small rectangle into which I want to display a maximum of 2 lines of text. If the text overflows that second line I want to display the ellipse at the end. The problem is the text drawing functions don't draw an ellipse at the end of the text when the text is displayed on two lines, so I have decided to perform 2 seperate DrawText operations to draw it myself. The only problem is, DrawTextEx does not return anything about the draw operation so when I draw that first line of text I do not know where to begin the second
The DrawTextEx() function is documented to have 2 means of providing the information I need, only neither of them work. The first is to look at the uiLengthDrawn member of the DRAWTEXTPARAMS function but it is always incorrect. The value returned is neither the number of characters processed or the total length of the original string. My second attempt was to use the DT_MODIFYSTRING flag but it does not change my string
What must I do to get back the string that was actually displayed? Will it always break the string at a word?
The DrawTextEx() function is documented to have 2 means of providing the information I need, only neither of them work. The first is to look at the uiLengthDrawn member of the DRAWTEXTPARAMS function but it is always incorrect. The value returned is neither the number of characters processed or the total length of the original string. My second attempt was to use the DT_MODIFYSTRING flag but it does not change my string
What must I do to get back the string that was actually displayed? Will it always break the string at a word?