Kjetil Viggen
2010-01-18 13:22:01 UTC
Hi All
My application uses the MFC control CListCtrl (in List mode) to display a
list of items. The control automatically orders items in columns, where the
column width is determined by the longest text.
This works well on Windows XP and Vista, but fails on Windows 7. A long text
may be correctly displayed, while a short text in the same column may get
clipped. Usually the last couple of letters will be missing, and replaced by
"...". The problem seems to occur on all Windows 7 PCs, and can also be
easily reproduced in a simple MFC test application.
Examples:
"GENERAL FURNITURE", "DRAWERS" and "THOUSANDS OF CHAIRS" are not clipped.
"SHELVES" becomes "SHELV...".
"LAVA LAMPS" becomes "LAVA LAM..."
"LAV" becomes "L..."
I have only seen the problem for texts containing capital letters. Texts
containing L, V and A seem especially error prone.
The problem only occurs for specific fonts. Texts get clipped if I use
Arial, Calibri or Times New Roman, while when using Arial Black, Georgia or
MS Sans Serif all texts are correctly displayed. So changing font could be a
workaround, but as all the rest of the UI uses Arial I would rather not do
this.
Does anyone have a clue what is going on here, and even better - how to fix
it?
Regards,
Kjetil
My application uses the MFC control CListCtrl (in List mode) to display a
list of items. The control automatically orders items in columns, where the
column width is determined by the longest text.
This works well on Windows XP and Vista, but fails on Windows 7. A long text
may be correctly displayed, while a short text in the same column may get
clipped. Usually the last couple of letters will be missing, and replaced by
"...". The problem seems to occur on all Windows 7 PCs, and can also be
easily reproduced in a simple MFC test application.
Examples:
"GENERAL FURNITURE", "DRAWERS" and "THOUSANDS OF CHAIRS" are not clipped.
"SHELVES" becomes "SHELV...".
"LAVA LAMPS" becomes "LAVA LAM..."
"LAV" becomes "L..."
I have only seen the problem for texts containing capital letters. Texts
containing L, V and A seem especially error prone.
The problem only occurs for specific fonts. Texts get clipped if I use
Arial, Calibri or Times New Roman, while when using Arial Black, Georgia or
MS Sans Serif all texts are correctly displayed. So changing font could be a
workaround, but as all the rest of the UI uses Arial I would rather not do
this.
Does anyone have a clue what is going on here, and even better - how to fix
it?
Regards,
Kjetil