- long GetLeft() const { return x; }
- long GetTop() const { return y; }
- long GetBottom() const { return y + height; }
- long GetRight() const { return x + width; }
+ // MFC-like functions
+
+ int GetLeft() const { return x; }
+ int GetTop() const { return y; }
+ int GetBottom() const { return y + height - 1; }
+ int GetRight() const { return x + width - 1; }
+
+ void SetLeft(int left) { x = left; }
+ void SetRight(int right) { width = right - x + 1; }
+ void SetTop(int top) { y = top; }
+ void SetBottom(int bottom) { height = bottom - y + 1; }