#ifndef CINSTALL_RECTCC_H
#define CINSTALL_RECTCC_H

/*
 * Copyright (c) 2001,2002, Gary R. Van Sickle.
 *
 *     This program is free software; you can redistribute it and/or modify
 *     it under the terms of the GNU General Public License as published by
 *     the Free Software Foundation; either version 2 of the License, or
 *     (at your option) any later version.
 *
 *     A copy of the GNU General Public License can be found at
 *     http://www.gnu.org/
 *
 * Written by Gary R. Van Sickle <g.r.vansickle@worldnet.att.net>
 *
 */


#include <windows.h>

struct RECTPP : public RECT
{
  int width() const { return right - left; };
  int height() const { return bottom - top; };
  RECTPP& operator=(const RECT & r)
  {
    right = r.right;
    left = r.left;
    top = r.top;
    bottom = r.bottom;
    return *this;
  };
  void offset(int x, int y)
  {
    left += x;
    right += x;
    top += y;
    bottom += y;
  };
  POINT center() const
  {
    POINT retval;
    retval.x = (left + right)/2;
    retval.y = (top + bottom)/2;
    return retval;
  }
};

#endif // CINSTALL_RECTCC_H
