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

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

  
#if !defined RQMENUITEM_H
#define RQMENUITEM_H

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

class RQMenuItem;

class RQMenuList
{
public:
    RQMenuList();
    ~RQMenuList();

    int addToList(RQMenuItem&);
    RQMenuItem *findControl(HMENU);

    RQMenuItem **controlList;
    int32 count;
};

class RQMenuItem: public RQControl
{
private:
    char *caption;
    bool checked;

protected:
    void messageHandler(HWND, UINT, WPARAM, LPARAM);

public:
    RQMenuItem();
    RQMenuItem(const char*);
    ~RQMenuItem();
    bool isPopup;

    HWND getHandle() { return (HWND)hMenu; }
    virtual void update();

    RQMenuList menuList;
    RQMenuItem *parentMenu;
    HMENU hMenu, hParentMenu;
    void setCaption(const char*);
    const char* getCaption();
    void setChecked(bool checked);
    bool getChecked();
    void setEnabled(bool enabled);
    bool getEnabled();
    virtual void addMenu(RQMenuItem&);

    // MenuItem events
    void (*onClick)(RQMenuItem&);
};

#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:43