Share via

How to remove horizontal scrollbar from CScrollView? The vertical must be remained!

Zoltán Hegedüs 101 Reputation points
2021-04-09T17:38:52.163+00:00

My English is not perfect. I do not use the horizontal scrollbar of CScrollView, how can I remove this? The vertical scrollbar must be remained! Thank you.

If the scrollbar is not required (the whole view is fit on the window), the scrollbar disappeares, but only if there is not splitter!

BOOL CChildFrame::OnCreateClient(CREATESTRUCT *, CCreateContext *pContext) {
 return m_wndSplitter.Create(this, 2, 1, CSize(60, 60), pContext);
}

Without this, menu item Split in Window menu is disabled, so, does not selectable: split view does not work. How can I enable automatic disappearing with splitter?

This is independent from the splitter is enabled (there is 2 views), or does not enabled: the not required splitter does not disapper even if only 1 view is exist.

The 2 views have own vertical scrollbar, but have shared horizontal scroll bar: they are scrolled at once. But I want to set different positions. How can I create own scroll bars?

Developer technologies | C++
Developer technologies | C++

A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.

0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. David Lowndes 4,726 Reputation points
    2021-04-09T17:46:03.473+00:00

    Have you tried using EnableScrollBarCtrl?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.