Archive: Using SetWindowPos to move a control


Using SetWindowPos to move a control
Hi,

I would like to find a find a way of moving the subtitle in the header of each page. I want to do this by script, rather than using a resource editor. I have done my best to get it done using SetWindowPos with the System plug-in, but with no luck. Either nothing happens, or the text disappears.

GetDlgItem $0 $HWNDPARENT 1038
System::Call "user32::SetWindowPos(i $0, i ${HWND_TOP}, i 50, i 10, i 0, i 0, i ${SWP_NOSIZE})"


Any ideas as to what I'm doing wrong? I've thought maybe it's trying to position it with screen coordinates, rather than client coordinates, but I have no idea how to overcome this. Could anyone provide me with a complete example?

Thanks in advance.

Brad.

1) Try to see if you are getting a usable value in $0.
2) Where are you calling this instructions?