Category : C++ Source Code
Archive   : VBXWIZRD.ZIP
Filename : VBXWIZ.WRI
Sax Comm Objects Information For more info, call 1-800-MIKESAX.
VBX Wizard makes using VBX controls in Foundation Classes Easy
Introduction
Microsoft Foundation Classes v2.0 has support for using Visual Basic Custom Controls in your programs. The code used to set or get properties, however, is very lengthy and certainly not as compact as in Visual Basic. This makes using Custom Controls in MFC2 a not less elegant than it could be.
VBXWizard solves this problem by creating an include file that defines a custom class for every custom control in a .VBX file. This custom class contains member functions that return a special class, depending on the proprety's type (CIntProperty, CHszProperty, etc..).
These special property classes (defined in VBXWIZRD.H) support assignment and casting operators so they can be used almost as if they were real ints, longs, CStrings, etc. The custom poperty classes all use inline functions and, using the optimizing compiler, they should be just as efficient as directly using Get/SetProperty.
Example
Without VBX Wizard:
// Set Set font to Helv and increase font size
Button1.SetStrProperty(12, "Helv");
Button1.SetNumProperty(13, Button1.GetNumProperty(13) + 5);
// If button1 one is bold, Button2 shouldn't be bold and vice versa
Button1.SetNumProperty(14, !Button2.GetNumPropert(14));
With VBX Wizard:
Button1.FontName() = "Helv";
Button1.FontSize()+=5;
Button1.FontBold() = !Button2.FontBold();
Using VBX Wizard
When you start VBXWizard, the screen will look like this:
ä ½v }ä r#, ( · èè BITMAP Ü) õâÿÿ^ä 4 U ?ÿöÇ ?ÿ÷V ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ¿ÿöÂÿà ?ÿç 1 6_ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ 2(ÿà ?ÿÇ 0 6 ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ 6ÿà ?ÿÆ 4V 3V ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ 4tÿà ?ÿÇ oæ0Ã` 7 oæ0Ã` 7 ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ 7ÿà oæ0Ã` ?ÿÇ l60Ã` 0 l60Ã` 0ÿ ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ 1jÿà l60Ã` ?ÿƨ Ì30à 7X Ì30à 4 ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ 69ÿà Ì30à ?ÿÄ<