Quote Originally Posted by 2kaud View Post
You have checked, haven't you, that GetSize() and GetPosition() are returning the expected values?
yes.. i have tested now:
Code:
struct Position
{
	int X;
	int Y;
};

struct Size
{
	int Width;
	int Height;
};

Position GetPosition()
    {
        RECT LabelSize;
        GetWindowRect(hwnd,&LabelSize);
        Position crdSize = {LabelSize.left,LabelSize.top};
        return crdSize;
    }

Size GetSize()
    {
        RECT LabelSize;
        GetWindowRect(hwnd,&LabelSize);
        Size crdSize = {LabelSize.right-LabelSize.left,LabelSize.bottom-LabelSize.top};
        return crdSize;
    }