Hello,
I am not quite familiar with MFC and I am having problems with scrollbars.
I have a class that derives from CStatic.
class CMyStatic : public CStatic
I set up a horizontal scrollbar for it.
SCROLLINFO si;
si.cbSize = sizeof(SCROLLIN FO);
si.fMask = SIF_PAGE | SIF_RANGE;
si.nPage = rFrame.Height() ;
si.nMax = rFrame.Height() + 8;
si.nMin = 0 ;
SetScrollInfo( SB_VERT, &si );
EnableScrollBar Ctrl( SB_VERT, TRUE );
I also have the OnHScroll, handled from my class
void CMyStatic::OnHS croll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar)
{
...
}
When I run this, the scrollbar appears but it doesn't do anything. It doesn't respond when I click it.
Any ideas why this is happening?
Thanks
I am not quite familiar with MFC and I am having problems with scrollbars.
I have a class that derives from CStatic.
class CMyStatic : public CStatic
I set up a horizontal scrollbar for it.
SCROLLINFO si;
si.cbSize = sizeof(SCROLLIN FO);
si.fMask = SIF_PAGE | SIF_RANGE;
si.nPage = rFrame.Height() ;
si.nMax = rFrame.Height() + 8;
si.nMin = 0 ;
SetScrollInfo( SB_VERT, &si );
EnableScrollBar Ctrl( SB_VERT, TRUE );
I also have the OnHScroll, handled from my class
void CMyStatic::OnHS croll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar)
{
...
}
When I run this, the scrollbar appears but it doesn't do anything. It doesn't respond when I click it.
Any ideas why this is happening?
Thanks
Comment