I want to know as know the position of a control ( the X,Y coordinates ).
also I want know the height and widht properties
API to use?
we usually use GetWindowRect
http://msdn.microsoft.com/en-us/library/windows/desktop/ms633519%28v=vs.85%29.aspx
it returns a RECT
.DATA?
rc RECT <>
.CODE
INVOKE GetWindowRect,hWindow,offset rc
mov ecx,rc.right
mov edx,rc.bottom
sub ecx,rc.left
sub edx,rc.top
;ECX = width
;EDX = height
if it is the top window, the RECT values are screen coordinates
if it is a child window, the RECT values are client coordinates
you can use the function for all types of windows - buttons, etc
i don't think it works for menus, though
Another possibility is GetWindowInfo (http://msdn.microsoft.com/en-us/library/windows/desktop/ms633516(v=vs.85).aspx), although I don't recall ever testing it on a child window.
And for some purposes GetClientRect (http://msdn.microsoft.com/en-us/library/windows/desktop/ms633503(v=vs.85).aspx) might be useful.
thanks u dedndave,MichaelW :green
a couple more functions that come in handy...
ClientToScreen
http://msdn.microsoft.com/en-us/library/dd183434%28v=vs.85%29.aspx
ScreenToClient
http://msdn.microsoft.com/en-us/library/dd162952%28v=vs.85%29.aspx