The problem lies in the child view CView. Somehow, the MFC default creates PreCreateWindow function and implements horizontal and vertical scroll bars. I did not notice the problem before I posted the question.
Visual C++ hide Scrollbar
-
12-07-2023 - |
Pregunta
I am trying to hide my scrollbars in Mainframe windows so that all views will not display the vertical and horizontal bars. Here is the code.
void CMainFrame::OnPaint()
{
CPaintDC dc(this); // device context for painting
// TODO: Add your message handler code here
// Do not call CFrameWndEx::OnPaint() for painting messages
ShowScrollBar(SB_BOTH, FALSE);
#pragma comment(lib, "UxTheme.lib")
if (IsThemeActive()) ::SetWindowTheme(*this, NULL, _T("Scrollbar"));
}
I cannot make this work. Any suggestions?
Solución
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow