15,979
社区成员
发帖
与我相关
我的任务
分享
void CYourView::OnPaint()
{
CPaintDC dc(this);
CRect rect;
GetClientRect(rect);
DocToClient(rect);
...
}
void CYourView::DocToClient(CRect& rect)
{
CClientDC dc(this);
OnPrepareDC(&dc, NULL);
dc.LPtoDP(rect);
rect.NormalizeRect();
rect.bottom += 1980;
//rect.top -= 198;
}
void CaaaView::OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint)
{
// TODO: Add your specialized code here and/or call the base class
// TODO: Add your specialized code here and/or call the base class
CScrollView::OnUpdate(pSender,lHint,pHint);
CSize sizeTotal;
sizeTotal.cx =100
sizeTotal.cy =200
SetScrollSizes(MM_TEXT, sizeTotal);
}