GDI 映射模式
MM_TEXT 1逻辑单位 = 1像素
MM_LOMETRIC 1逻辑单位 = 0.1mm
MM_HIMETRIC 1逻辑单位 = 0.01mm
MM_LOENGLISH 1逻辑单位 = 0.01 in = 0.254mm
MM_HIENGLISH 1逻辑单位 = 0.001 in = 0.0254mm
MM_TWIPS 1逻辑单位 = 1/1440 in = 0.0176mm
默认映射模式:MM_TEXT
MM_LOMETRIC
MM_HIMETRIC
MM_LOENGLISH
MM_HIENGLISH
MM_TWIPS
除MM_TEXT外的默认坐标轴
1 case WM_PAINT:2 hdc = BeginPaint(hWnd, &ps);3 // TODO: 在此添加任意绘图代码...4 SetMapMode(hdc, MM_LOMETRIC);5 Rectangle(hdc, 100, -100, 200, -200);6 SetMapMode(hdc, MM_TEXT); //使用完后改回默认映射模式7 EndPaint(hWnd, &ps);8 break;