if( m_hAdjust->value + m_hAdjust->page_size > m_hAdjust->upper )
{
- m_hAdjust->value = m_hAdjust->upper - m_hAdjust->page_size;
- m_xScrollPosition = (int)m_hAdjust->value;
+ if (GetChildren().GetCount() == 0)
+ {
+ m_hAdjust->value = m_hAdjust->upper - m_hAdjust->page_size;
+ m_xScrollPosition = (int)m_hAdjust->value;
+ }
}
}
if( m_vAdjust->value + m_vAdjust->page_size > m_vAdjust->upper )
{
- m_vAdjust->value = m_vAdjust->upper - m_vAdjust->page_size;
- m_yScrollPosition = (int)m_vAdjust->value;
+ if (GetChildren().GetCount() == 0)
+ {
+ m_vAdjust->value = m_vAdjust->upper - m_vAdjust->page_size;
+ m_yScrollPosition = (int)m_vAdjust->value;
+ }
}
}