Site Map

Home
About Rapid-Q
News Archive
Download Rapid-Q
Screen Shots
View Documentation
FAQs
Compatibility Issues
Knowledge Base
Links
Code Contributions
Coding Etiquette
EZBoard Public Forum
Rapid-Q Mailing List



Contact Me

E-mail:


  Rapid-Q Foundation Classes (WIP)

Rapid-Q++ or Rapid-Q Foundation Classes, are a set of C++ classes which wraps up most of the functionality of the WINAPI into Rapid-Q like components. Basically, these classes layout the foundation for a Rapid-Q to C++ translator, but for now I'm releasing just the classes. These classes can be used in most C++ compilers, such as MinGW and VC++. However, only the library files are released for now, ie. LIBRQ.A for MinGW and LIBRQ.LIB for VC++. If you're tired of using MFC or coding straight with WINAPI, these classes may help. You do not need to be a C++ guru to use these classes. If you know how to use Rapid-Q's components, programming in C++ with these classes should be fairly straight forward. Please note that Rapid-Q++ is still a work in progress and no support will be offered.


  Download Rapid-Q++

Headers, Libraries, and sample code Size Last Updated
Rapid-Q++ for MinGW and VC++ 90 KB September 15, 2000



  Rapid-Q++ Hierarchy

Currently these classes are available for your general use (I've scattered a few others, but they aren't for general use, except maybe for the RQString object if you wanted)...
RQObject
   |
   +--+ RQControl
            |
            |--+ RQApplication
            |--+ RQForm
            |--+ RQButton
            |--+ RQFont
            |--+ RQCanvas
            |--+ RQMainMenu
            |--+ RQMenuItem
            |--+ RQComboBox
            |--+ RQListBox
            +--+ RQEdit
            +--+ RQStatusBar
            +--+ RQLabel
Not all components are supported yet, nor do they have full functionality (ie. not as full as Rapid-Q). Some components may have additional functionality not found in Rapid-Q, and some maybe renamed differently.


  Future improvements

Rapid-Q++ isn't really on my priority list at the moment, although whenever I do get bored I tend to do a little bit of work on it here and there. I'm basically offerring these components with no support, so if you e-mail me about it, you won't get a response out of me. I didn't bother documenting the classes either, you'll just have to read the examples and include files to see what properties, methods, and events are supported. Having said that, each class is very similar to the Rapid-Q counterpart, so using these classes should be intuitive. My original plans for these classes was to convert your Rapid-Q BASIC Code to Rapid-Q++. This may or may not be implemented, there's obviously a lot more work to do...


  Using Rapid-Q++ with MinGW

As explained before, there's no support or documentation for these components. However, for those with limited exposure to C++, I mind as well explain a few things. First of all, you've heard me talk about MinGW, but I didn't explain exactly what that is, nor where to find it. MinGW (or Minimalist GNU For Windows) is a FREE Windows C/C++ compiler which can be found at www.mingw.org They release 2 versions, one that uses CRTDLL.DLL and the other MSVCRT.DLL. As far as Rapid-Q++ goes, you should download the MSVCRT version (but is not a requirement, just a suggestion). Don't worry about all the other files they may have listed, the 7MB download is enough. If you're worried about licenses and all that, don't. To sum it up, you can distribute your .EXEs without any royalties and without distributing your sources. MinGW is quite impressive, but some of their extended features can cause problems when porting to VC++. MinGW is more forgiving, such as token pasting and autodetecting your application. Once you've installed MinGW, make sure to modify your environment settings, ie. AUTOEXEC.BAT. Add an additional line to the end of your AUTOEXEC.BAT file. This depends on the location of course:
   SET PATH=C:\gcc-2.95.2\bin;%PATH%
Compiling your Rapid-Q++ applications is quite straight forward:
   g++ -s test.cpp -o test.exe -L. -lrq -lgdi32 -lcomctl32
Just substitute test with the name of your project. You can create a simple Makefile or batch file to avoid redundancy, here's a sample COMPILE.BAT file:
   g++ -s %1.cpp -o %1.exe -L. -lrq -lgdi32 -lcomctl32 %2
To compile your application, just pass COMPILE.BAT with an additional argument:
   COMPILE test
Please note that the above compilation statements are for CONSOLE mode programs, to compile as a pure GUI application, just add -mwindows to the compilation statement. Obviously these are just templates for those who aren't so familiar with GNU compilers, but if you know what you're doing, go for it.


  Using Rapid-Q++ with VC++

Since most people will be working in the VC++ IDE, I won't cover the command line approach to compiling your Rapid-Q++ applications. What you should do is start a blank project (Win32 Application possibly), and then copy the files distributed with Rapid-Q++ to your workspace directory. You can add the include files to your project if you want, using Project | Add to Project | Files. Now, to link with the Rapid-Q library, open up Project | Settings. Click on the Link tab, and in the inputbox below the label Object/Library modules: you should add librq.lib (and comctl32.lib possibly) to that list. Click OK, and start coding! The rest I'll leave up to you, ie. compile as CONSOLE or GUI.


  Getting Started with Rapid-Q++

Okay, now that you have all the files and programs setup, you're ready to use the Rapid-Q foundation classes. There's a quick program template you can use:
#include 
#include "rapidqw32.h"

// Initialize Rapid-Q, our CALLBACK procedure
// is named WindowProcedure
RQ_INITIALIZE(WindowProcedure);

// Global components
// Hidden application object
// Create our form, with a parent application,
// and a CALLBACK procedure
RQForm form(application, WindowProcedure);


//-------------------- MAIN PROGRAM ---------------------//

// For CONSOLE applications, use BEGIN_CONSOLE
BEGIN_GUI
    // Main code goes here
    form.center();
    form.showModal();
END_GUI
// END OF PROGRAM



  Notes on Rapid-Q++

Rapid-Q++ is more object oriented. For example, in your Rapid-Q BASIC code, you might have some code that sets the height and width of the form:
    form.width = 500
    form.height = 400
When using the Rapid-Q classes in C++, you need to set the property like so:
    form.setWidth(500);
    form.setHeight(400);
Same goes with retrieving the property:
    int width  = form.getWidth();
    int height = form.getHeight();
The drawing functions aren't the most efficient, but it wouldn't be very nice if I decided to change the format of all the drawing functions. In most cases, they'll do just fine, but if you really want to optimize them, you should do your own drawing functions. To get the DC handle, call getHDC() for the component you want the DC handle for. When doing your own drawing routines in an OnPaint event handler, make sure to destroy any resources you've created in the OnEndPaint event handler(). You can also look in rapidqw32.h and remove the reference to rqstatusbar.h so that you don't have to link to COMCTl32.LIB. Of course, this assumes you won't be using the statusbar component.


  Final notes

You are free to use and extend these classes anyway you want. Details are still sketchy, so there's no guarantee that future releases will be compatible with earlier ones, so use them at your own risk.






This page maintained by William Yu ©1999-2000