映射模式研究了好长时间啊,还没弄懂。。
下面的代码(VC 技术内幕4里的):
CRect rectClient;
GetClientRect(rectClient);
pDC->SetMapMode(MM_ANISOTROPIC);
pDC->SetWindowExt(1000, 1000);
pDC->SetViewportExt(rectClient.right, -rectClient.bottom); // 这里为什么要有一个负号!?
pDC->SetViewportOrg(rectClient.right/2, rectClient.bottom/2);
pDC->Ellipse(-500, -500, 500, 500);