可能一个是绝对的,screen coordination
一个是相对的,client coordination.

解决方案 »

  1.   

    有几个坐标的问题
    有逻辑坐标,设备坐标等说法
    CWnd的成员函数接收的都是设备坐标,也就是以屏幕左上角为原点
    逻辑坐标是相对窗口的左上角为原点
      

  2.   

    不是啊~~~
    在dialog editor 里面和 程序动态生成的时候一样。
    全是从dialog 的client area的左上角开始算(0,0)点,
    只是似乎他们的(1,1)点并不重合……
      

  3.   

    对话框编辑器中使用的单位是Dialog Units(DLU)——一种设备无关的长度单位。MSDN中对此的解释如下:
    The system defines the size and location of user interface elements in a window based on dialog units (DLUs), not pixels. A dialog unit is the device-independent measure to use for layout. One horizontal dialog unit is equal to one-fourth of the average character width for the current system font. One vertical dialog unit is equal to one-eighth of an average character height for the current system font. The default height for most single-line controls is 14 DLUs. Be careful if you use a pixel-based drawing program, because it may not provide an accurate representation when you translate your design into dialog units. If you do use a pixel-based drawing tool, you may want to take screen snapshots from a development tool that supports dialog units and use those images.