Google Groups unterstützt keine neuen Usenet-Beiträge oder ‑Abos mehr. Bisherige Inhalte sind weiterhin sichtbar.

CListCtrl funny stuff (bug or incorrect use?)

1 Aufruf
Direkt zur ersten ungelesenen Nachricht

Andrew Kaspick

ungelesen,
16.06.1999, 03:00:0016.06.99
an
Has anybody seen the following problem before and if so do you know how to
fix it?

I've actually got this in a CListView, but I can't see how that would
matter.

This is my problem....
I fill my list box up so that a scroll bar appears and then I scroll to the
bottom and then resize the list control so that I can see every item. But
when I do this the very top item jumps down one position leaving an empty
space at the top.

It seems to occur in the code I use when I resize, if I comment out the
SetColumnWidth calls everything seems to work fine.

void CTaskDebuggerView::OnSize(UINT nType, int cx, int cy)
{
CListCtrl& ListCtrl = GetListCtrl();

ListCtrl.SetColumnWidth(0, cx * 0.3);
ListCtrl.SetColumnWidth(1, cx * 0.2);
ListCtrl.SetColumnWidth(2, cx * 0.5);

CListView::OnSize(nType, cx, cy);
}

Thanks for the help,
Andrew


David Lowndes

ungelesen,
17.06.1999, 03:00:0017.06.99
an
>I fill my list box up so that a scroll bar appears and then I scroll to the
>bottom and then resize the list control so that I can see every item. But
>when I do this the very top item jumps down one position leaving an empty
>space at the top.

Andrew,

I think I've seen others mention similar problems. Do you have an
up-to-date version of Comctl32.dll?

See if updating the DLL fixes the problem or not.

The last record I have, the updated DLL was available at:

http://msdn.microsoft.com/developer/downloads/files/40comupd.htm

Dave
----
My address is altered to discourage junk mail.
Please post responses to the newsgroup thread,
there's no need for follow-up email copies.

Markus Hagn

ungelesen,
17.06.1999, 03:00:0017.06.99
an
Have you tried this?

void CTaskDebuggerView::OnSize(UINT nType, int cx, int cy)
{

CListView::OnSize(nType, cx, cy);

CListCtrl& ListCtrl = GetListCtrl();

ListCtrl.SetColumnWidth(0, cx * 0.3);
ListCtrl.SetColumnWidth(1, cx * 0.2);
ListCtrl.SetColumnWidth(2, cx * 0.5);
}

Andrew Kaspick schrieb in Nachricht <#xkMy1Au#GA.164@cppssbbsa03>...


>Has anybody seen the following problem before and if so do you know how to
>fix it?
>
>I've actually got this in a CListView, but I can't see how that would
>matter.
>
>This is my problem....

>I fill my list box up so that a scroll bar appears and then I scroll to the
>bottom and then resize the list control so that I can see every item. But
>when I do this the very top item jumps down one position leaving an empty
>space at the top.
>

0 neue Nachrichten