如何捕获动态创建的cscrollview的滚动
1个回答
展开全部
class CDScrollView : public CScrollView {
public:
virtual void OnDraw(CDC* pDC) {
}
virtual void OnInitialUpdate();
};
********************************
ON_NOTIFY(WM_VSCROLL, 1112, &CTView::OnVS)
********************************
pView = new CDScrollView;//dynamic_cast<CScrollView*>(RUNTIME_CLASS(CScrollView)->CreateObject());
pView->Create(NULL, NULL, AFX_WS_DEFAULT_VIEW|WS_VSCROLL|WS_HSCROLL|WS_VISIBLE|WS_CHILD,CRect(10,10,500,300), this, 1112);
pView->OnInitialUpdate();
pView->ShowWindow(SW_SHOW);
m_Sdl = new CSdlWindow(pView->m_hWnd);
public:
virtual void OnDraw(CDC* pDC) {
}
virtual void OnInitialUpdate();
};
********************************
ON_NOTIFY(WM_VSCROLL, 1112, &CTView::OnVS)
********************************
pView = new CDScrollView;//dynamic_cast<CScrollView*>(RUNTIME_CLASS(CScrollView)->CreateObject());
pView->Create(NULL, NULL, AFX_WS_DEFAULT_VIEW|WS_VSCROLL|WS_HSCROLL|WS_VISIBLE|WS_CHILD,CRect(10,10,500,300), this, 1112);
pView->OnInitialUpdate();
pView->ShowWindow(SW_SHOW);
m_Sdl = new CSdlWindow(pView->m_hWnd);
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询