如果用selectobject()选入一个dc(HDC)的位图(HBITMAP)的尺寸大于该dc,那么多余的部分会被忽略么?
比如dc像素为2×2,位图像素为3×3

解决方案 »

  1.   

    DC有尺寸这个概念吗?窗口有大小,但是DC好像没有吧
      

  2.   

    int GetDeviceCaps(
      HDC hdc,     // handle to DC
      int nIndex   // index of capability
    );
    第二个参数去下面的值
    HORZSIZE     Width, in millimeters, of the physical screen. 
    VERTSIZE     Height, in millimeters, of the physical screen. 
    HORZRES      Width, in pixels, of the screen. 
    VERTRES      Height, in raster lines, of the screen. 这个函数得到的是hdc的尺寸吧?
      

  3.   

    如果你的DC是一个内存DC,难道它也有长度吗?一个DC与窗口关联起来之后就有长度,这个长度也是窗口的。
      

  4.   

    hdc有尺寸吗?
    GetDeviceCaps得出来是可以显示的尺寸...