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

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

  
#if !defined RQBUTTON_H
#define RQBUTTON_H

#include <windows.h>
#include "rqfont.h"
#include "rqcontrol.h"
#include "rqtooltip.h"
#include "rqdefs.h"

class RQButton: public RQControl
{
protected:
    HWND handle;
    char *caption;

    void messageHandler(HWND, UINT, WPARAM, LPARAM);
    HWND getHandle() { return handle; }
    RQControl* getParent() { return parent; }

public:
    RQButton();
    RQButton(char const*);
    ~RQButton();

    // Button properties
    RQFont font;
    RQToolTip toolTip;
    void  setParent(RQControl&);
    void  setAlign(ALIGN);
    ALIGN getAlign();
    void  setCaption(char*);
    char const* getCaption();

    // Button events
    void (*onClick)(RQButton&);
    void (*onMouseMove)(int x, int y, int shifts, RQButton&);
};

#endif
© Tue 2024-5-21  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0 Last modified:2013-08-20 12:34:39