Text getting truncated
-
Hello, I am finding an issue where in I have a Text which is longer than a single line with no spaces. This text is not displayed completely in the tool tip. It gets truncated. I make use of CDC for the tooltip display rectangle, CDC* pDC = GetDC(); CRect rect(0, 0, 0, 0); CString sComment = "this is a comment bigggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg comment 2 2 2"; pDC->DrawText(sComment, &rect, DT_CALCRECT | DT_LEFT | DT_WORDBREAK | DT_NOPREFIX | DT_TOP); int iheight = rect.Height(); // It wont return the correct rectangle height //Output is this is a comment biggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg Can anyone tell me what the issue is. Thank you, ~ Vikram
If you don't like the clipped text, then why didn't you specify the
DT_NOCLIP
formt? :)If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles] -
Hello, I am finding an issue where in I have a Text which is longer than a single line with no spaces. This text is not displayed completely in the tool tip. It gets truncated. I make use of CDC for the tooltip display rectangle, CDC* pDC = GetDC(); CRect rect(0, 0, 0, 0); CString sComment = "this is a comment bigggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg comment 2 2 2"; pDC->DrawText(sComment, &rect, DT_CALCRECT | DT_LEFT | DT_WORDBREAK | DT_NOPREFIX | DT_TOP); int iheight = rect.Height(); // It wont return the correct rectangle height //Output is this is a comment biggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg Can anyone tell me what the issue is. Thank you, ~ Vikram
Interestingly this is an exact duplicate of this question[^], even though the ids are different. I cannot believe that two different CP members randomly created exactly the same issue in the last few days. Are you (or the other person) perhaps a sock puppet?
Just say 'NO' to evaluated arguments for diadic functions! Ash
-
If you don't like the clipped text, then why didn't you specify the
DT_NOCLIP
formt? :)If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles]I need the text to be displayed on multiple lines, but i need to avoid text truncation.
-
I need the text to be displayed on multiple lines, but i need to avoid text truncation.
I suppose you got the wrong height because you've passed an empty rectangle to the function. :)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles] -
Interestingly this is an exact duplicate of this question[^], even though the ids are different. I cannot believe that two different CP members randomly created exactly the same issue in the last few days. Are you (or the other person) perhaps a sock puppet?
Just say 'NO' to evaluated arguments for diadic functions! Ash
or the user simply changed his name ?
Watched code never compiles.
-
or the user simply changed his name ?
Watched code never compiles.
-
Well, a simple view of both user entries shows this not to be the case.
Just say 'NO' to evaluated arguments for diadic functions! Ash
then, a very strange case of telepathy :wtf:
-
then, a very strange case of telepathy :wtf:
...or collective conciousness...hell the borg are coming!
> The problem with computers is that they do what you tell them to do and not what you want them to do. < > Leela: Fry, you're wasting your life sitting in front of that TV. You need to get out and see the real world. Fry: But this is HDTV. It's got better resolution than the real world <
-
Interestingly this is an exact duplicate of this question[^], even though the ids are different. I cannot believe that two different CP members randomly created exactly the same issue in the last few days. Are you (or the other person) perhaps a sock puppet?
Just say 'NO' to evaluated arguments for diadic functions! Ash
Or team members in a race to please the boss (chetana is usually a girl's name and vikram a boy's)
...byte till it megahertz... my donation to web rubbish
-
Or team members in a race to please the boss (chetana is usually a girl's name and vikram a boy's)
...byte till it megahertz... my donation to web rubbish