Code: Select all
void CCustomClass::OnMouseMove(CMyView* pView,...)
{
if(pView->GetStyle() & WS_HSCROLL)TRACE("\n WS_HSCROLL \n");
if(pView->GetStyle() & WS_VSCROLL)TRACE("\n WS_VSCROLL \n");
}
Code: Select all
void CCustomClass::OnMouseMove(CMyView* pView,...)
{
if(pView->GetStyle() & WS_HSCROLL)TRACE("\n WS_HSCROLL \n");
if(pView->GetStyle() & WS_VSCROLL)TRACE("\n WS_VSCROLL \n");
}
Code: Select all
void CScrollView::CheckScrollBars(BOOL& bHasHorzBar, BOOL& bHasVertBar) const
{
DWORD dwStyle = GetStyle();
CScrollBar* pBar = GetScrollBarCtrl(SB_VERT);
bHasVertBar = ((pBar != NULL) && pBar->IsWindowEnabled()) ||
(dwStyle & WS_VSCROLL);
pBar = GetScrollBarCtrl(SB_HORZ);
bHasHorzBar = ((pBar != NULL) && pBar->IsWindowEnabled()) ||
(dwStyle & WS_HSCROLL);
}