窗口、视口、视口原点到底是什么意思?
SetWindowExtEx(hDC,15,15,NULL); //设置窗口区域SetViewportExtEx(hDC,15,10,NULL); //设置视口区域
SetViewportOrgEx(hDC,120,120,NULL); //设置视口原点
//hPen=(HPEN)GetStockObject(NULL_PEN); //获取系统定义的空画笔
//SelectObject(hDC,hPen); //选择画笔
//DeleteObject(hPen);
hPen=CreatePen(PS_SOLID,2,RGB(255,0,0));//创建新的画笔
SelectObject(hDC,hPen); //选择画笔
//画系统坐标系,原点在视口原点
LineTo(hDC,200,0);
LineTo(hDC,195,-5);
MoveToEx(hDC,200,0,NULL);
LineTo(hDC,195,5);
MoveToEx(hDC,0,0,NULL);
LineTo(hDC,0,200);
LineTo(hDC,-5,195);
MoveToEx(hDC,0,200,NULL);
LineTo(hDC,5,195);
红色区域 窗口、视口、视口原点到底是什么意思?