Prev: xy scatter plot
Next: Microphone
From: Mike Williams on 21 Apr 2010 18:05 "Nobody" <nobody(a)nobody.com> wrote in message news:ewFGJMY4KHA.5880(a)TK2MSFTNGP04.phx.gbl... > . . but the API function to use to show ellipses is DrawText() function > with DT_END_ELLIPSIS or DT_WORD_ELLIPSIS constants. DT_WORD_ELLIPSIS is okay but I'd be a bit careful with DT_END_ELLIPSIS if I were you because it has some very strange undocumented behavior (although that weird undocumented behaviour can be fixed by using it together with the DT_MODIFYSTRING flag once you know about it). Mike
From: Mike Williams on 22 Apr 2010 02:33 "Nobody" <nobody(a)nobody.com> wrote in message news:ewFGJMY4KHA.5880(a)TK2MSFTNGP04.phx.gbl... > . . the API function to use to show ellipses is DrawText() function > with DT_END_ELLIPSIS or DT_WORD_ELLIPSIS constants. Further to the remarks I previously posted, I mentioned some strange behaviour with DT_END_ELLIPSES without specifying what that behaviour actually was because it was just something "somewhere in the back of my mind" and I could not at the time recall the specific problem. Now I've had time to think about it some more I have remembered what it was, and it is not really a problem with the DT_END_ELLIPSES flag at all, but rather a coding mistake that is very easy to make, particularly if you are in the habit of pasting declarations and constants in from the KPD-Team API Viewer as a lot of people are. The problem is caused by using Const DT_END_ELLIPSIS As Long = &H8000 (without a trailing &) as you would get when you pasted it in from the API Viewer or as you might easily mistakenly type in yourself. This of course causes VB to do its normal thing and treat &H8000 as the Integer value -1, so that the Const will actually end up containing &HFFFF8000. The presence of all those extra FFFF flags causes the DrawText function to do some things that you might not be expecting, including some rather strange undocumented things (as is often the case when using extraneous flags) such as flipping leading numeric digits to the right side and, for example, drawing the text "10 seconds to blastoff" as "seconds to blastoff 10". Anyway, such a mistake is quite easy to make, especially if you paste stuff in from the API Viewer, so even though it is really a coding error rather than an "undocumented feature" it is still worth pointing out. Mike
From: Jim Mack on 22 Apr 2010 07:03 Mike Williams wrote: > > This of course causes VB to do its normal thing and treat > &H8000 as the Integer value -1 A strange bug indeed (-: -- Jim
From: Phil Hunt on 22 Apr 2010 12:35 Thanks, guys. "Phil Hunt" <aaa(a)aaa.com> wrote in message news:OfDyrKX4KHA.3644(a)TK2MSFTNGP06.phx.gbl... > Does anyone know how to avoid a column from truncation. > I know that you can resize the col, but how does the program know it is > being truncated. Plesae note I am not talking about wordwrap here. > > Thanks >
From: Mike Williams on 22 Apr 2010 13:38
"Jim Mack" <jmack(a)mdxi.nospam.com> wrote in message news:OBZiutg4KHA.420(a)TK2MSFTNGP02.phx.gbl... >> This of course causes VB to do its normal thing and treat >> &H8000 as the Integer value -1 > > A strange bug indeed (-: Yeah. I of course meant to say -32768. Mike |