#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:
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&);
int showModal();
void close();
void center();
void repaint();
void (*onPaint)(RQForm&);
void (*onEndPaint)(RQForm&);
void (*onResize)(RQForm&);
void (*onMouseMove)(int x, int y, int shifts, RQForm&);
WNDPROC wndProc;
RQFont font;
RQCanvas canvas;
void setCaption(char const*);
char const* getCaption() { return caption; }
};
#endif
|