Get window position plus borders
How would I get a windows position, which includes its borders, of any window, whether that be a parent or child window? Now, I know about GetWindowRect, but that seems to be giving me the wrong coordinates. I tried using it on a button in a parent window with its x and y coordinates set to 0, and instead of the left and top returning 0, GetWindowRect took into account the absolute screen coordinates of the button, instead of the client coordinates plus the borders. Is there a function that does this, or a way to do this? I'm using c++. Thanks.