#if !defined RQCONTROL_H
#define RQCONTROL_H
#include <windows.h>
#include "rqobject.h"
#include "rqdefs.h"
typedef enum {alNone, alTop, alBottom, alLeft, alRight, alClient} ALIGN;
class RQControl: public RQObject
{
private:
HINSTANCE hInstance;
protected:
int32 style;
int16 left, top, width, height;
ALIGN align;
bool enabled;
bool visible;
HDC hdc;
RQControl *parent;
public:
RQControl();
~RQControl();
virtual HINSTANCE getInstance() { return hInstance; }
void setInstance(HINSTANCE hInst) { hInstance = hInst; }
virtual HWND getHandle() { return 0; }
virtual int32 getID() { return ID; }
virtual void addControl(RQControl&) {}
virtual void deleteControl(RQControl&) {}
virtual void messageHandler(HWND, UINT, WPARAM, LPARAM) {}
virtual void setTop(int16 y);
virtual void setLeft(int16 x);
virtual void setWidth(int16 w);
virtual void setHeight(int16 h);
virtual void setHDC(HDC hdc);
virtual int16 getTop() { return top; }
virtual int16 getLeft() { return left; }
virtual int16 getWidth() { return width; }
virtual int16 getHeight() { return height; }
virtual HDC getHDC() { return hdc; }
virtual void moveControl(int16 x, int16 y, int16 w, int16 h);
virtual void setEnabled(bool);
virtual bool getEnabled() { return enabled; }
virtual void setVisible(bool);
virtual bool getVisible() { return visible; }
virtual void destroyHandle();
virtual RQControl* getParent() { return parent; }
virtual void repaint() {}
static int32 controlCount;
int32 tag, ID;
};
#endif
|