May 7th, 2002 09:11 AM
#1
SOLUTION: How to hide the scrollbars on CListCtrl without loosing the functonality to scroll :)
m_pl = CListCtrl!!!
RECT ierect;
int cxvs, cyvs;
//m_pl.GetWindowRect (&ierect);
m_pl.GetClientRect(&ierect);
cxvs = GetSystemMetrics (SM_CXVSCROLL);
cyvs = GetSystemMetrics (SM_CYVSCROLL);
m_pl.SetWindowPos (0, ierect.left, ierect.top, ierect.right+cxvs, ierect.bottom+cyvs, SWP_NOMOVE | SWP_NOZORDER);
ierect.bottom -= ierect.top+cyvs;
//ierect.bottom -= (ierect.top-ierect.bottom);
ierect.right -= ierect.left;
ierect.top = 0;
ierect.left = 0;
HRGN iehrgn = CreateRectRgn (ierect.left, ierect.top, ierect.right-2, ierect.bottom);
m_pl.SetWindowRgn (iehrgn, false);
There are some trial and error to get it nice into your code, but I think it is a great solution to make a CListCtrl blend into the backround and make your own scrollbars (if needed )
ListCtrl is good, but it just got better!
Regards Large , aka Lars.
Visit me at: http://lars.werner.no/
Mail: large@writeme.com
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules
Click Here to Expand Forum to Full Width
Bookmarks