在Windows Platform SDK Documentation中CreateWindow()的函数原型如下:
HWND CreateWindow( 
    LPCTSTR lpClassName,
    LPCTSTR lpWindowName,
    DWORD dwStyle,
    int x,
    int y,
    int nWidth,
    int nHeight,
    HWND hWndParent,
    HMENU hMenu,
    HINSTANCE hInstance,
    LPVOID lpParam
);
其中形参
nWidth表述为Specifies the width, in device units, of the window.
nHeight表述为Specifies the height, in device units, of the window.
这里的device units指的是象素吗?
是不是设备坐标指的就是以象素为单位的坐标?
谢谢!

解决方案 »

  1.   

    逻辑坐标和设备坐标的转换就是映射模式所做的工作,但是在CreateWindow的时候指定的应该就是象素,即设备坐标。
      

  2.   

    你的理解是正确的。
    In all device coordinate systems, units are expressed in terms of pixels. Values on the horizontal x-axis increase from left to right, and values on the vertical y-axis increase from top to bottom.