Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

CListCtrl funny stuff (bug or incorrect use?)

1 view
Skip to first unread message

Andrew Kaspick

unread,
Jun 16, 1999, 3:00:00 AM6/16/99
to
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

unread,
Jun 17, 1999, 3:00:00 AM6/17/99
to
>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

unread,
Jun 17, 1999, 3:00:00 AM6/17/99
to
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 new messages