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

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

  
#if !defined RQFORM_H
#define RQFORM_H

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


class RQForm: public RQControl
{
private:
    char *className;
    char *caption;
    WNDCLASS wndClass;
    HWND handle;
    RQList controlList, labelList;
    void createForm();
    void registerForm();

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

public:
    RQForm(RQApplication&, WNDPROC);
    ~RQForm();

    RQApplication *application;
    HINSTANCE getInstance() { return application->getInstance(); }
    HWND getHandle() { return handle; }
    void addControl(RQControl&);
    void deleteControl(RQControl&);

    // Form methods
    int  showModal();
    void close();
    void center();
    void repaint();

    // Form events
    void (*onPaint)(RQForm&);
    void (*onEndPaint)(RQForm&);
    void (*onResize)(RQForm&);
    void (*onMouseMove)(int x, int y, int shifts, RQForm&);
    WNDPROC wndProc;

    // Form properties
    RQFont font;
    RQCanvas canvas;
    void setCaption(char const*);
    char const* getCaption() { return caption; }
};

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