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

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

  
#if !defined RQEDIT_H
#define RQEDIT_H

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

class RQEdit: public RQControl
{
private:
    char *text;
    bool readOnly;
    word maxLength;
    HWND handle;

protected:
    // Message dispatcher
    void messageHandler(HWND, UINT, WPARAM, LPARAM);
    RQControl* getParent() { return parent; }

public:
    RQEdit();
    RQEdit(char*);
    ~RQEdit();

    // Edit properties
    RQFont font;
    void  setParent(RQControl&);
    void  setAlign(ALIGN);
    ALIGN getAlign();
    void  setText(char*);
    char const* getText();
    void  setReadOnly(bool);
    bool  getReadOnly();
    void  setMaxLength(word);
    word  getMaxLength();
    void  setSelStart(int32);
    int32 getSelStart();
    void  setSelLength(int32);
    int32 getSelLength();
    HWND  getHandle() { return handle; }

    // Edit events
    void (*onChange)(RQEdit&);
    void (*onKeyDown)(int vk, int shifts, RQEdit&);
    void (*onKeyPress)(byte ch, RQEdit&);
    void (*onKeyUp)(int vk, int shifts, RQEdit&);
};

#endif
掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Thu 2024-4-25  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0 Last modified:2013-08-20 12:34:42