Re: SetColumnWidth fails in virtual CListCtrl (only in comctl32.dll)
OK, I tried compiling your example and when I double click on the header
thing it changed the size of the header instead of the column... Anyway, I
changed the way you were doing a few things to the code below and now it
works OK for me:
// ...
// TODO: Add extra initialization here
m_list.InsertColumn(0, L"First column", LVCFMT_LEFT, 200);
void CTemp11Dlg::OnLvnGetdispinfoList1(NMHDR *pNMHDR, LRESULT *pResult)
{
LV_DISPINFO* pDispInfo = (LV_DISPINFO*)pNMHDR;
LV_ITEM* pItem= &(pDispInfo)->item;
if (pItem->mask & LVIF_TEXT) { //valid text buffer?
switch(pItem->iSubItem) {
case 0:
wcsncpy_s(pItem->pszText,pItem->cchTextMax,L"ABCD",pItem->cchTextMax);
break;
default:
ASSERT(0);
break;
}
}
*pResult = 0;
}
Tom
"Tom Serface" <tom.nospam@camaswood.com> wrote in message
news:6D3229BA-9611-4EEF-8BFC-222BC29D89BD@microsoft.com...
Yes, I am running on Vista and my list controls work as expected so there
must be something else going on. I'll download your project and give it a
try here.
Tom
"Furas" <Furas@discussions.microsoft.com> wrote in message
news:B3FC9815-FC35-4C0E-A656-784054FD1391@microsoft.com...
So, to summarize your answer, you have no trouble with text truncation in
first column in a virtual listctrl, am i right? If you can, and I do
appreciate it very much, check-out http://www.grci.host.sk/mfc. I've
created
some screenshots and uploaded a sample application with source code.