I am using this code to scroll my window vertically:
ScrollWindow(cx, cy, nullptr, nullptr);
It works fine. But, I do have an issue with what it does with my status bar:
The status bar scrolls up when it should stay at the bottom. It is not critical because if you go to resize the window it will push it back to the bottom in OnSize
:
// Move status bar
if (m_StatusBar.GetSafeHwnd())
{
CRect rctCombo;
m_cbChairman.GetWindowRect(&rctCombo);
const int statusBarHeight = rctCombo.Height() + 4;
m_StatusBar.SetWindowPos(NULL, 0, cy - statusBarHeight, cx, statusBarHeight, SWP_NOZORDER | SWP_NOACTIVATE);
}
I won’t want to change the way I scroll as it works well, but can I keep the status bar at the bottom during scrolling?
This is how I initially display the status bar in the CDialog
:
RepositionBars(AFX_IDW_CONTROLBAR_FIRST, AFX_IDW_CONTROLBAR_LAST,
ID_INDICATOR_MEETING_TYPE);