SetMapMode(hdc, MM_HIENGLISH);/* x is to the right, y is to up(!!!). The Logical unit is 0.001 inch. So, if the width of line is 1, your will see the width of line is 0.001 inch on any device.P.S. 1). There is no printer in my office so that I'm not sure it can work. (It should be fine :-) 2). U can know more in the Chapter 5 (Basic Drawing) from <<Programming Windows, 5TH>>. */
使用固定比例模式MM_TWIPS
1个twip相当于1/20磅
1). There is no printer in my office so that I'm not sure it can work. (It should be fine :-)
2). U can know more in the Chapter 5 (Basic Drawing) from <<Programming Windows, 5TH>>. */
{
CRect rectClient;
GetClientRect(rectClient); pDC->SetMapMode(MM_TWIPS);
pDC->SetViewportOrg(rectClient.right /2 , rectClient.bottom / 2);
......
}
http://dev.yesky.com/121/2018121.shtml
关于坐标变换和坐标映射介绍的简明易懂