一般情况线条宽度最小也为1象素.但打印出来的时候还是很粗,怎么让它更细一些呢。word都做到了,0.5磅 0.25磅都比1象素要细。可怎么做到呢?请高手赐教,感激不尽!

解决方案 »

  1.   

    转换映射模式
    使用固定比例模式MM_TWIPS
      

  2.   

    1/1440英寸
    1个twip相当于1/20磅
      

  3.   

    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>>. */
      

  4.   

    问题是打印和显示的DPI是不同的。先搞明白这个再自己设计逻辑。
      

  5.   

    void CMyView::OnPrint(CDC* pDC)
    {
      CRect rectClient;
      GetClientRect(rectClient);  pDC->SetMapMode(MM_TWIPS);
      pDC->SetViewportOrg(rectClient.right /2 , rectClient.bottom / 2);
      ......
    }
      

  6.   

    去看看这篇文章吧
    http://dev.yesky.com/121/2018121.shtml
    关于坐标变换和坐标映射介绍的简明易懂