在VC中分割窗口CSplitterWnd怎么把滚动条去掉
1个回答
展开全部
方法一:在CScrollView的子类中响应WM_CREATE,在OnCreate中添加:
int CPrintMapView::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CMainView::OnCreate(lpCreateStruct) == -1)
return -1;
// TODO: Add your specialized creation code here
InitializeFlatSB(this->m_hWnd);
FlatSB_EnableScrollBar(this->m_hWnd, SB_BOTH, ESB_DISABLE_BOTH);
// FlatSB_ShowScrollBar(this->m_hWnd, SB_BOTH, FALSE);
return 0;
}
方法二:在CScrollView的子类中响应WM_NcCalcSize,调整NCCALCSIZE_PARAMS
Void CPrintMapView::OnNcCalcSize(BOOL bCalcValidRects, NCCALCSIZE_PARAMS FAR* lpncsp)
{
// TODO: Add your message handler code here and/or call default
CSize sizeClient;
CSize sizeSb;
GetTrueClientSize(sizeClient, sizeSb);
lpncsp->rgrc[0].bottom += GetSystemMetrics(SM_CYHSCROLL);
lpncsp->rgrc[0].right += GetSystemMetrics(SM_CXVSCROLL);
CMainView::OnNcCalcSize(bCalcValidRects, lpncsp);
}
int CPrintMapView::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CMainView::OnCreate(lpCreateStruct) == -1)
return -1;
// TODO: Add your specialized creation code here
InitializeFlatSB(this->m_hWnd);
FlatSB_EnableScrollBar(this->m_hWnd, SB_BOTH, ESB_DISABLE_BOTH);
// FlatSB_ShowScrollBar(this->m_hWnd, SB_BOTH, FALSE);
return 0;
}
方法二:在CScrollView的子类中响应WM_NcCalcSize,调整NCCALCSIZE_PARAMS
Void CPrintMapView::OnNcCalcSize(BOOL bCalcValidRects, NCCALCSIZE_PARAMS FAR* lpncsp)
{
// TODO: Add your message handler code here and/or call default
CSize sizeClient;
CSize sizeSb;
GetTrueClientSize(sizeClient, sizeSb);
lpncsp->rgrc[0].bottom += GetSystemMetrics(SM_CYHSCROLL);
lpncsp->rgrc[0].right += GetSystemMetrics(SM_CXVSCROLL);
CMainView::OnNcCalcSize(bCalcValidRects, lpncsp);
}
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询