Sunscreen
Sunscreen

Reputation: 3564

CListView Control has limited length for column text

When I set the column text for CListView more than 271 characters, the rest of my buffer is not present.

I set it through LV_COLUMN structure.

Is this a known issue for MFC 4.21?

Upvotes: 0

Views: 555

Answers (1)

Hans Passant
Hans Passant

Reputation: 941615

Here's yet another answer you won't like. It has nothing to do with your ancient version of MFC, it is a documented limitation for the list view control. From the SDK docs for the LVITEM structure's pszText member:

If the structure receives item attributes, pszText is a pointer to a buffer that receives the item text. Note that although the list-view control allows any length string to be stored as item text, only the first 260 TCHARs are displayed.

Upvotes: 1

Related Questions