How to prevent scrollbars in the CScrollView / CFormView class in MFC (Windows Mobile 6)

I am creating an application for Windows Mobile 6 using the interface of a single MFC document with the base class CFormView.

I put CBitmapButton in the Form / Dialog resource and placed them at the bottom. CBitmapButtons are great until a soft keyboard appears or the app is covered by other apps. In this case, unwanted scroll bars appear below and to the right of the screen.

How to remove these scroll bars? the dialog resource does not have the vertical scroll bar or horizontal scroll bar options.

Update: a CFormView derived from CScrollView, you must check CScrollView
Update: . Why should I use CFormView (derived from CScrollView) if I don't need a scrollbar? ans: because I want a view that can contain controls (buttons, text fields, etc.).

+3
source share
1 answer

Inside the MFC source code inside viewscrl.cpplies a function called void CScrollView::UpdateBars(). Inside this function there is gem, calledEnableScrollBarCtrl(SB_BOTH, FALSE);

Put this function call at the end OnInitialUpdate()and it will chase the scroll bars.

: OnSize() , OnSize()

+4

Source: https://habr.com/ru/post/1736418/


All Articles