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
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.
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.
>