X Specifies the new position of the left side of the window, in client coordinates. Y Specifies the new position of the top of the window, in client coordinates. If an owned window was created with the WS_OVERLAPPED style, SetWindowPos uses the parent window coordinates to reposition it. If the owned window was created using the WS_POPUP style, it is repositioned using screen coordinates.
看你的代码是基于屏幕的左上点rtSubItem.left + x - 2和rtSubItem.top + y - 31 rtSubItem.left是基于对话框的左坐标 加上x后 x是对话框在桌面中的左坐标所以结果就是基于屏幕的左上点
不对吧,rtSubItem.left是基于列表的左坐标
不是列表,是列表中的item在对话框中的位置
If an owned window was created with the WS_OVERLAPPED style, SetWindowPos uses the parent window coordinates to reposition it. If the owned window was created using the WS_POPUP style, it is repositioned using screen coordinates
If an owned window was created with the WS_CHILD style,SetWindowPos uses the parent window coordinates to reposition it? or, it is repositioned using screen coordinates?
Child windows must have a parent window and are confined to the client area of their parent. This is the major distinction between child windows and overlapped and pop-up windows. Child window parents can be top-level windows or other child windows. Child windows are positioned from their parent window's upper-left corner and not from the upper-left of the screen as are top-level windows. Child windows are clipped to the client area of their parent. Controls in a dialog box are child windows whose parent is the dialog box.A child window must have a parent window. The parent window can be an overlapped window, a pop-up window, or even another child window
x:以客户坐标指定窗口新位置的左边界
Y:以客户坐标指定窗口新位置的顶边界
Specifies the new position of the left side of the window, in client coordinates.
Y
Specifies the new position of the top of the window, in client coordinates. If an owned window was created with the WS_OVERLAPPED style, SetWindowPos uses the parent window coordinates to reposition it. If the owned window was created using the WS_POPUP style, it is repositioned using screen coordinates.
rtSubItem.left是基于对话框的左坐标
加上x后 x是对话框在桌面中的左坐标所以结果就是基于屏幕的左上点
不对吧,rtSubItem.left是基于列表的左坐标
不是列表,是列表中的item在对话框中的位置
If an owned window was created with the WS_CHILD style,SetWindowPos uses the parent window coordinates to reposition it? or, it is repositioned using screen coordinates?