Guidance
指路人
g.yi.org
software / RapidQ / System / Win32 / Rapid-Q++ / rqcontrol.h

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
#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
掌柜推荐
 
 
¥477.00 ·
 
 
¥918.00 ·
 
 
¥370.00 ·
 
 
¥271.00 ·
 
 
¥995.00 ·
 
 
¥1,580.00 ·
© Sun 2024-11-24  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0 Last modified:2013-08-20 12:34:41