Can you not use GetWindowRect
Code:
;preserve eax and ebx
push eax
push ebx
;get the address of a rect structure
lea ebx, A_Rect_Structure
;fill it with the windows rectangle
push ebx
push HWND_OF_Window
call GetWindowRect
;Translate the coordinates into window coordinates
push ebx
push HWND_OF_Window
call ScreenToClient
inc ebx, 8
push ebx
push HWND_OF_Window
call GetWindowRect
;restore eax and ebx
pop ebx
pop eax
I don't know If you have to clear the parameters off the call stack after calling an API, I didn't but If you need to you can. After this code the Left and Bottom parts of the Rect structure should be the window's width and height respectivley.