Copyright: «HexaNet


INDEX
 VBX Studio 2.0

Welcome to VBX Studio 2.0, the 22 VBXs toolkit for visual programmers!

VBCombo			VBFCombo	• Overview
VBTabList			VBList	• Registration
VBTabFList			VBFList	• Order form
VBBitmap			VBAnim	• Tips
VBLine			VBSpin	• VC++ issues
VBEdit			VBMask	• How to register
VBGauge			VBPicBtn	• Terms
VBFlxTxt			VBText	• Shareware?
VBFInfo			VBIni (free)
VBTab			VBNote
VB3D			VBDDrop
	VBX Studio 2.0  COPYRIGHT HEXANET 1993-1995 - All rights reserved. All trades Marks are deposed by their owners. This file must not be distributed without the full VBX Studio 2.0 package.
THIS SOFTWARE AND DOCUMENTATION ARE SOLD "AS IS" AND WITHOUT WARRANTIES AS TO PERFORMANCE OF MERCHANTABILITY OR ANY OTHER WARRANTIES WHETHER EXPRESSED OR IMPLIED.  BECAUSE OF THE VARIOUS HARDWARE AND SOFTWARE ENVIRONMENTS INTO WHICH THIS PROGRAM MAY BE PUT, NO WARRANTY OF FITNESS FOR A PARTICULAR PURPOSE IS OFFERED.

GOOD DATA PROCESSING PROCEDURE DICTATES THAT ANY PROGRAM BE THOROUGHLY TESTED WITH NON-CRITICAL DATA BEFORE RELYING ON IT.  THE USER MUST ASSUME THE ENTIRE RISK OF USING THE PROGRAM.  ANY LIABILITY OF THE SELLER WILL BE LIMITED EXCLUSIVELY TO PASSWORDS REPLACEMENT.


 Overview

VBX Studio 2.0 includes 22 Visual Basic controls (VBXs) you may use with Visual Basic, Visual C++, Borland C++, Borland Delphi, PowerBuilder and so on (they are VB 1.0 compatible)... We provide these numerous controls for 2 main reasons: First, they improve your applications interface, then, they dramatically reduce the amount of necessary code for today's programs. For an overview you may run VBXDEMO.EXE, or load the provided Visual Basic/Visual C++ samples. VBX Studio also includes classes and DDX/DDV routines for Visual C++/MFC. As a conclusion, the all the controls works fine under Windows 95 and they may be useful to port your Win32 apps. to Windows 3.x.

Features

Bitmapped ComboBox and ListBox: VBCombo, VBList, VBTabList

VBCombo displays a combobox (without the Edit field) with up to 30 bitmaps. You may fill the list at design-time and use transparent bitmaps.VBList is quite convenient to build small listboxes with up to 30 different bitmaps. With this new version you can change the 'style' properties at run-time. VBTabList also supports customised tab keys and WinFile drag' n Drop.

Browse ComboBox and ListBox: VBFCombo, VBFList, VBTabFList

VBFCombo lists drives, files or user' s file which may include additional informations. This new version adds some methods for an easy drives management. VBFList lists directories, files or user' s file which may include additional informations. This new version lets you change 'style' properties (like <Sort>) at run time if necessary. VBTabFList, like VBTabList supports tab keys and WinFile drag' n drop.

Edit controls: VBEdit, VBMask

VBEdit lets the user type some text: Thanks to about 50 properties this control performs all necessary verifications. Also, you may use the WIN.INI settings and you may change all the 'style' properties at run-time. VBMask has some enhanced formatting options: It automatically checks and changes the string depending on the user' s configuration on 'GetFocus/LostFocus' events. The control also computes formulas. Also, it may be useful when you need to retrieve a product code thanks to the 'StringMask' pattern for instance.With these new versions you can directly read/write numbers.

Static controls: VBText, VBFlxTxt

VBText simply displays one or more lines of text: It handles fonts, 3d, system configuration and may resize the control depending on the size of your text. VBFlxTxt displays a single line of text with automatic resizing mode or customised tabkeys.

File controls: VBFInfo, VBIni

VBFInfo performs 3 kinds of operations: It retrieves files/drives informations; It may change these parameters, and, the VBX is useful to retrieve VERSION informations from Windows modules. Thanks to VBIni you can read/write string and numerical values from the common or private INI file without the need to handle strings buffers nor to call the SDK functions. Notice that VBIni is freeware: you don' t have to register VBX Studio to use/distribute this VBX with your works.

Picture/Button controls: VBAnim, VBPicBtn, VBBitmap

VBAnim displays a series of up to 5 bitmaps/icons in a rectangular window. You can use transparent bitmaps, different speeds and different spin modes. Regarding VBPicBtn you may give full bitmaps (which include the button border/focus rectangle) or small bitmaps that VBPicBtn will center on the button. You may also use the control to display On/Off push buttons or buttons which act like radio controls. VBBitmap is a small control to display a single picture with convenient options like the 'transparent', 'adjust' or 'border' modes.

New kinds of graphical controls: VBGauge, VBSpin, VBLine

VBGauge may uses 3D effects, varaible colors and floating point values and, it supports reversed value (i.e from 100 to 0).VBSpin is a spin control which may handle the associated Edit control automatically. This new version doesn' t require SPINDLL.DLL any longer and is able to build Horizontal spins. You may use this VBX with VBEdit to increment/decrement dates for instance. VBLine can be used alone to enhance a dialog box or, in conjunction with VBTab in order to draw a complete tabbed dialog box.

Tabbed dialog boxes: VBTab

With VBTab/VBLine you can build easy to use tabbed-dialog boxes. You can use more than a single line of tabs and you can set the tabs where you want.

Misc.: VB3D, VBDDrop, VBNote

VB3D adds a 3d rectangle to any control: You may choose the control by class, name or ID. This VBX is useful when used with CTL3D. VBDDrop sends notification messages when the user drops (thanks to WinFile) a file on your form. VBNote is a design-time control to annotate your dialog box resources.This control is specially useful if you develop Windows applications in a team

VBX Installation

If you use Visual Basic, choose "Add Files..." and select the VBX you wish to install. If you prefer VC++ AppStudio, use "Install controls..", double click on the VBXs and close the dialog box with the "Ok" button ( do not use the "Close" button ). If you use AppStudio and you want to use the VBX Studio DDX routines, have a look at DDX.TXT text file and, if you want to use classes wrappers, put VBXSTD20.H and ASVBDO12.H into your INCLUDE path and put the '#include <VBXSTD20.H>' at the end of your STDAFX.H precompiled header.

Evaluation version

Unregistered (evaluation) version will display a nag screen each time you create a VBX at run time. However, once you' ve created 'unregistered' VBX controls in your dialog boxes, and then you register, you don' t have to rebuild your dialog boxes: You just have to re-open these dialog boxes (thanks to your development system) and, they' ll be automatically updated. Unregistered is not crippled in any way: there are no special functions\properties for registered users. You are not allowed to distribute any program made with the unregistered version (but VBIni which is freeware).

Registration...

VBX Studio is part of our 'Full programmer' s pack' which includes:

• Zip Studio API (>= 2.x),

• Zip Studio Shell

• Zip Studio Shell MFC Source Code

• Setup Studio

• String Studio

• And this 'VBX Studio' toolkit.

This bundle price is 729- FF (or 135- US$, 215- DM or 95- GBP). All these toolkits are available on many public networks like Compuserve (go WINSHARE and search for 'STUDIO' sharewares, CICA ftp server, that is winftp.cica.indiana.edu, the new Microsoft Network and so on..). You may register directly to us (by Credit Card or US$, FRF or DEM check) or via PsL. With your registration you will receive the passwords via email (if you have an email address) and snail mail. We always send out a printed invoice. In most cases, orders are processed in 1 or 2 days.

If you wish to register directly to us (which is the fastest way), see the Order Form of this help file.

	HEXANET SW BP 385.16 75768 PARIS CEDEX 16 FRANCE EMail: hnet@dialup.francenet.fr CIS: 100333,27 Fax(orders): (33-1) 40.72.80.77


 Terms

Used terms are C and SDK language type. If you do not develop with these languages, perhaps you will have some difficulties to understand them. These are some explanations:

int, short	Integer value.
long	Long integer value.
float, real	Floating point numbers
UINT	Signed long integer value.
BOOL	Integer value, 0 for FALSE, anything else for TRUE.
char	Character.
char far*	String.
LPSTR LPTSTR	String.
LPCSTR LPCTSTR	Constant String.
HWND	Window' s Handle( Integer value ).
HINSTANCE	Application' s Handle( Integer value ).
void	Null type ( empty  ).
WINAPI	FAR PASCAL.
COLORREF	Long integer value ( Colour ).


 Package

<Deleted>

If you need to perform a manual installation you may edit SETUP.INF.


Author
 Registration

Versions...

The unregistered version will display the shareware principles reminders. The registered version doesn' t display these nag-screens and lets you distribute your applications which use the VBX Studio VBXs. To register you will need this evaluation version, then you will run VBXREG2.EXE and give your personal passwords. Once you are a registered user you can distribute the VBXs without any royalties.

Registration...

VBX Studio is part of our 'Full programmer' s pack' which includes:

• Zip Studio API (>= 2.x),

• Zip Studio Shell

• Zip Studio Shell MFC Source Code

• String Studio

• Setup Studio

• And this 'VBX Studio' toolkit.

This bundle price is 729- FF (or 135- US$, 215- DM or 95- GBP). All these toolkits are available on many public networks like Compuserve (go WINSHARE and search for 'STUDIO' sharewares, CICA ftp server, that is winftp.cica.indiana.edu, the new Microsoft Network and so on..). You may register directly to us (by Credit Card or US$, FRF or DEM check) or via PsL. With your registration you will receive the passwords via email (if you have an email address) and snail mail. We always send out a printed invoice. In most cases, orders are processed in 1 or 2 days.

If you wish to register directly to us (which is the fastest way), see the Order Form of this help file.

• If you prefer to order the full pack thanks to PsL, these are infos from PsL to register:

You can order with MC, Visa, or American Express from the Public (software) Library (PsL) by calling 1-800-2424-PSL or FAXing 1-713-524-6398. These numbers are for orders only. For questions about credit card orders, call PsL at 713-524-6394. You can also mail credit card orders to PsL at P.O.Box 35705, Houston, TX 77235-5705.

• Once you received the passwords, please see 'How to register' to use VBXREG2.

Upgrade...

If you' ve already registered VBX Studio 1.x you don' t have to pay for this new version. Just load the new VBXs with your development system and open your dialog boxes to make the changes. Then don' t forget to distribute the new VBX versions. If you already own a 'Studio' shareware, there is a 300- FF bonus when you register directly to us. In this case, please don' t forget to send us your user code with the Order Form. Also, we don' t plan to ask for upgrade fees for the future versions.

Technical support...

Your comments or questions are welcome. You can join us on the Internet (hnet@dialup.francenet.fr) or on COMPUSERVE (100333,27): We check the mail every day. If you can' t access these networks, you may send us a request via snail mail, see at the bottom of this page.

About the VBX Studio license...

The license is an using authorization but not a product cession. Programs made with the unregistered version musn' t be distributed. You can use this product on several PC but no more than one unique copy can be used at the same time in design mode. As a conclusion you aren' t allowed to sell the VBX Studio VBXs.

Others Studio components...

• Zip Studio API and Shell

Zip Studio is our famous Zip/Unzip API and Shell specifically designed for Windows. Current version is 2.57, see ZS25A.ZIP, ZS25B.ZIP (or ZSAPI25A.ZIP and ZSAPI25B.ZIP) and Z257UP.ZIP. The Win32/Win95 version will be available in some weeks.

• Setup Studio

A powerful toolkit to create professional quality Setup programs for Windows 3.10/Win95. The 2.5 version includes templates for VB and VC++. Current version is 2.5 (see SSETUP25.ZIP).

• String Studio

String Studio is the perfect add-on for Visual C++/VBX Studio users. Thanks to about 150 functions it dramatically reduce the development times. Win16/Win32 versions. Current release is 3.0 (see CSTR30.ZIP).

See also...

Overview

Order form

Shareware

	HEXANET SW BP 385.16 75768 PARIS CEDEX 16 FRANCE EMail: hnet@dialup.francenet.fr CIS: 100333,27 Fax(orders): (33-1) 40.72.80.77


 Shareware?

VBX Studio is ShareWare:

You can try it as you want before you decide or not to register. The only one way we have to sell enough licenses to support this software, is to distribute it all over the world. So, if you think this product will help one of your friends, don' t hesitate to give him a (complete) copy of this product: This is your interest!

• When you distribute String Studio, don' t change any file and give the complete package. If you upload String Studio on a BBS, please name it VBXSTD20.ZIP or VBXSTD20.EXE.

Obviously, if you register, you can' t distribute your registered LIC file. Distributing programs made with VBX Studio unregistered version is not allowed.

Notes for vendors...

Feel free to distribute one or more 'Studio' sharewares on your next book/CD-ROM. We can' t send authorizations to all people who want to do this.

	HEXANET SW BP 385.16 75768 PARIS CEDEX 16 FRANCE EMail: hnet@dialup.francenet.fr CIS: 100333,27 Fax(orders): (33-1) 40.72.80.77


 Order form

To register you can print this help page and manually fill it, or use ORDER.TXT. Unreadable orders will be ignored. This order form applies to check or Credit Card orders you send to us. If you prefer to register thanks to the PsL registration service (in the USA), see Registration.

• If you are an European Community Company outside of France, don' t forget to give your EC VAT number (if you are not in this case, there is no additional fees).

• You are:

Company name.........: __________________________________________________

Last name............: __________________________________________________

First name...........: __________________________________________________

Delivery address.....: __________________________________________________

                       __________________________________________________

                       __________________________________________________

City.................: __________________________________________________

Zip code/State.......: __________________________________________________

Country..............: __________________________________________________

Phone................: __________________________________________________

Fax..................: __________________________________________________

EMail................: __________________________________________________

CIS Mail.............: __________________________________________________

EC VAT Number........: __________________________________________________

Where did you find our softwares?

_________________________________________________________________________

Which development system are you using?

_________________________________________________________________________

Any Comments/Questions?

_________________________________________________________________________

_________________________________________________________________________

_________________________________________________________________________

_________________________________________________________________________

_________________________________________________________________________

•  You wish to register with your Credit Card:

• We accept VISA and EuroCard/MasterCard orders. You can send the form at our CIS or Internet address.In this case you will receive the passwords, in most cases, the same day. Your credit card will be billed in  French Francs (1 FF = 0.19 US$ = 0.28 DM), while your bank account will display the corresponding amount in your local currency.

    QUANTITY PRODUCTS                                U. PRICE  TOTAL

• ________ Zip Studio Shell........................   149 FF  __________

• ________ Full programmer's pack..................   729 FF  __________

             (Zip + Zip Shell Src. + VBX + String

             + Setup Studio)

• ________ Zip Studio Shell X 10...................   449 FF  __________

• ________ Zip Studio Shell UNLIMITED..............  2099 FF  __________

         • I already have a license for a studio

             toolkit (my user code is: ____________)

             There is a 300 FF reduction for the

             full programmer' s pack................  -300 FF  __________

             ORDER AMOUNT....................................  __________

Credit Card Type.....: · VISA

                       • EuroCard/MasterCard

Credit Card name.....: · Company name

                       • My name

Credit Card Number...: _ _ _ _ / _ _ _ _ / _ _ _ _ / _ _ _ _

Expiration date......: _ _ / _ _

Stamp/Signature......:

(Printed orders only)  ____________________________

•  You prefer a check payment:

Choose one currency..: · FRF

                       • US$

                       • DM

                       • GBP

Quantity	Product	FRF price	US$ price(*)	DM price	GBP price	Total
________	Full pack	729-	135-	215-	95-	________
________	Zip Shell	149-	25-	44-	18-	________
________	Zip Shell (x10)	449-	90-	135-	59-	________
________	Zip Shell (unlimited)	2099-	420-	599-	269-	________

•  I already have a license for a studio toolkit (my user

    code is: _____________) There is a 300 FF reduction for

    the full programmer' s pack.(FRF orders only)

Order amount.........................................___________

• (*) If you pay in US$, please make out your check to 'Denis CHEVRON' instead of 'HEXANET'

• Send this form with your payment to:

	HEXANET SW BP 385.16 75768 PARIS CEDEX 16 FRANCE EMail: hnet@dialup.francenet.fr CIS: 100333,27 Fax(orders): (33-1) 40.72.80.77


 How to register

Once you have your personal passwords, you must use VBXREG2.EXE: This toolkit will create the necessary LIC file to let you use VBX Studio at design time with no nag-screens. Then your applications won' t display the nag-screens at run-time.

Use the VBXREG2 utility

VBX Studio is provided with the VBXREG2 utility: This program will create the required LIC file. To use this program, you must give your 2 passwords: The first one ( called <szYourName> ) in the first field and the second one ( called <szPassword> ). Then click on OK. A messagebox will tell you if the passwords are ok.

Now re-load your old forms

Once the LIC file is on your PC (i.e. once VBXREG2 tells you 'VBX Studio successfuly registered'), you need to launch your development system then, to reload your forms (dialog box) and save them. Thanks to this operation, your forms contain registered VBX Studio 2.0 VBXs.

Important remark

If you still have the nag-screens and you are a registered user, you probably have blanked the LIC file, so you may use this utility again to rebuild the LIC file. If you still have the nag-screens maybe you are using a 4GL which doesn' t understand the VBX Studio registration process. In this case you have to download SVBX20.ZIP and use these new VBX (called VX....VBX) instead of the original VBXs. These versions aren' t available at design time if the LIC file isn' t found.


VC++ Issues
 Visual C++ Issues

Visual C++ thanks to MFC 2.x supports Visual Basic VBXs controls thanks to its CVBControl class. You will find additional informations for this class in the MFC documentation/notes and on Compuserve' s MFMFC forum.

Warning

VC++ ApStudio is not the same as VB: For instance you may use the SDK function <MoveWindow> instead of <left>, <top> properties, and use the <Refresh> methods for some controls.

Basic considerations

When you use VC++ and a VBX you must make sure the user own the VBX(s) you would like to use before you call your dialog boxes. This is necessary because MFC doesn' t display a dialog box if some VBXs are missing. To use the VBXs, don' t forget to add 'EnableVBX()' in your CWinApp::InitInstance() function. Also, using _AFXDLL and VBX requires special implementations (see MFC notes).

Object wrappers vs. CVBControl

With VC++ AppStudio, when you give a variable member for a VBX, this one will be in all cases a CVBControl* pointer. Thanks to the DDXs ( see our DDX.TXT text file) you can use the good class for each VBX Studio VBX. For instance, your VBEdit  controls will be associated with a CVBEdit CEdit derived class. This lets you use the edit controls standard functions. When you need to access the VBX (to call a CVBControl method) you will use the <GetVBX()> function which is defined in all the VBX Studio classes.

• To install the VBX Studio DDXs, see DDX.TXT then copy all the necessary lines to APSTUDIO.INI. VBX Studio DDXs are also provided for special string, double and time values: You can use CStr String Studio 3.0 CString/double extensions and, CTime object ( without hard coding ). These DDXs require String Studio 3.0 and don' t support _AFXDLL.

Required files

There are 2 required files to use the VBX Studio VC++ extensions: ASVBDO12.H is the header file for the VBXs properties ( and some other things.. ) and VBXSTD20.H which contains class definitions for VBX Studio 2.0 controls. You don' t have to worry about these files: Just put them in your INCLUDE directory and for each MFC project add '#include <VBXSTD20.H>' at the end of your STDAFX.H precompiled header. Also, if you wish to use String Studio CStr and CTime DDX routines, you must define _CSTR and include <CSTR.H> (or <CSTR30.H>) before you include <VBXSTD20.H>. String Studio file name is CSTR30.ZIP, see Registration for details.

Using properties with object wrappers

The basic interest of VBX Studio specific class is the dramatically improved properties Read\Write operations: You can use

m_pMyEdit->MinRange() = m_pMyEdit->MaxRange();

instead of

m_pMyEdit->SetNumProperty( "MinRange", m_pMyEdit->GetNumProperty( "MaxRange" ) );

for instance... The only thing you must do is to add '()' at the end of the property because this is a function, not a variable. Some properties are 'arrays' properties and they required an index value, like 'm_pMyList->ListString( 1 )'... Another VC++ advantage for these classes is the built-in VC++ browser: If you don' t remember something, just click [F11] and you will see all the methods of the corresponding class.

Using VBX events

To retrieve an event parameter, just instanciate a VBX Studio class, then use the Visual C++ Class wizard and add an Event function. Now, give a value to the <LPVOID> argument. Then, select the VBX variable and click on [F11] to have a look at its class. At the end of this class you will find all the possible functions to retrieve an event value for this kind of objects, choose the corresponding one and use this function to retrieve the event parameter...like this:

void CMainDlg::OnDblclickVblist1(UINT, int, CWnd*, LPVOID lp)

  {

  int iListID = m_pMainList->EventDblClkID( lp );

// retrieve the current VBList item number

 ...

As a conclusion, you can extend your other third party VBXs like VBX Studio wrappers...


 VBList, VBTabList

VB(Tab)List are the VBX Studio bitmapped ListBoxes.

Properties

Special properties

Events

Methods

VC++ extensions

Tips

Required file(s): VBLIST.VBX (for VBList) or VBLIST2.VBX (for VBTabList)

Control name: VBList or VBTabList

MFC Class name: CVBList or CVBTabList ( Base class is CListBox )

• VB(Tab)List is quite convenient to build small listboxes with up to 30 different bitmaps. With this new version you can change the 'style' properties at run-time.

• VBTabList is the same than VBList with 3 differences: It handles tab keys, it uses a faster method to display the items and, the VBX is able to process WinFile drag' n drop. You should use this version when possible.

See also...

VBTabFList

VBFList


 VB(Tab)List Properties

Only non standard properties are described below in alphabetic order:

• AlwaysBitmapped (Bool)

Set this to TRUE (-1) if you wish all items with no bitmap specification use the first bitmap.

• BackColor (Short:COLOR40_...)

Specifies the background color. Choose 0 to use the system colors.

• Bitmap01 to Bitmap30 (Picture:Bitmap)

These properties define a picture: <Bitmap01> is the picture 1, which can be called, depending on the data type like this: AddItem "1" for a bitmap only listbox and "Text1;1" for a bitmap and text listbox. This is the same for all 29 available other bitmaps.

• Border3D (Bool)

Set this to TRUE (-1) if you wish the listbox has a 3D border at run time.

• Caption (String)

This string property is used to intialize the listbox: If you don' t give any caption, you will be in the test mode at design time ( you will see bitmaps or text in the listbox ) and of course, there is no data at run time. If you give a caption, you stop the test mode and this caption will be used to initialize the listbox: You can give multiple items data: Use '¤' to separate each item, like this 'Item1¤Item2¤Item3...'. The caption can' t be longer than 255 characters. Item data depends on the data type: For text datas, nothing special; For bitmap only datas, give a number to specify the bitmap number like: '1¤2¤2' and for 'both' datas use ';' to separate text data and bitmap data like this: 'Our text 1 use bitmap 1;1¤Our text 2 uses bitmap 2;2'... If you choose the always bitmapped option, in the 'both' data type, you can give 'Item1' and this will display the bitmap 1 and 'Item1' text ( no ';' required ).

• CaseType [2.0] (Short)

Specifies the case type ( none, uppercase or lowercase ).

• DataType (Short)

Specifies the data type ( bitmap, text or both ).

• DiableNoScroll [2.0] (Bool)

Set this property to TRUE (-1) if you wish to use a listbox with a permanent vertical scroll bar ( this is not available if you choose the Horizontal scroll bar too ). Now you can change this style property at run-time if necessary.

• DisplayMode (Short)

Sets the display mode ( for bitmaps ). If you choose the automatic mode, you can' t use transparent bitmaps. The 'normal' mode uses margins.

• Help

Will display this Windows HLP file.

• ItemHeight (Short)

Specifies the height of the items height in the list ( in pixels ).

• MultipleSel [2.0] (Bool)

Set this property to TRUE (-1) if you wish to use a multiple selection\extended selection listbox.  Now you can change this style property at run-time if necessary.

• NoRedraw (Bool)

Disables all redraw operations ( not really useful ).

• ParentNotify [2.0] (Bool)

Set this to TRUE (-1) to receive notifications messages ( generally you must set this property to TRUE ).  Now you can change this style property at run-time if necessary.

• PictureHeight (Short)

Specifies the bitmap height ( in pixels ).To use it you must set <DisplayMode> to normal.

• PictureWidth (Short)

Specifies the bitmap with ( in pixels ).To use it you must set <DisplayMode> to normal.

• PictureXMargin (Short)

Specifies the bitmap horizontal margin ( in pixels ). To use it you must set <DisplayMode> to normal.

• PictureYMargin (Short)

Specifies the bitmap vertical margin ( in pixels ). To use it you must set <DisplayMode> to normal.

• Sort [2.0] (Bool)

Set this property to TRUE (-1) if you wish to use a sorted listbox.  Now you can change this style property at run-time if necessary.

• Text3D (Short)

Enables or disables the 3D effect for items text.

• TextAlignment (Short)

Specifies the text alignment.

• TextXMargin (Short)

Specifies the text horizontal margin ( in pixels ). To use it you must set <DisplayMode> to normal.

• TextYMargin (Short)

Specifies the text vertical margin ( in pixels ). To use it you must set <DisplayMode> to normal.

• UseHorzScrollBar [2.0] (Bool)

Set to TRUE (-1) if you wish to use an horizontal scroll bar if needed.  Now you can change this style property at run-time if necessary.

• UseTranspBitmap (Bool)

Set this to TRUE (-1) if you use transparent bitmaps ( bitmaps using the light fuchsia color as the 'transparent' color ). Transparent bitmaps are not available with the 'stretch' (automatic) display mode.

• vbxAbout

will display the VBX Studio 'About...' box.

• WinfileDDrop [2.0 - VBTabList] (Bool)

Set this property to TRUE if you want the listbox accept WinFile files.


 VB(Tab)List Special Properties

• DroppedFilename( Index ) [2.0 - VBTabList] (String,Arrays)

When a file is dropped on your VBTabList control, call this property to retrieve the fully qualified filename. As always <Index> is 0 based. This property is read-only.

• ListCount (Short)

Returns the number of items in the listbox

• ListIndex( Index ) (Bool,Arrays)

Use this property array to retrieve the state of an listbox item. If the specified item ( 0 indexed ) is selected, the property will be set to TRUE (-1), otherwise FALSE (0) is returned.

• ListString( Index ) (String,Arrays)

Use this property array to retrieve the string (text) of an listbox item.

• SetSel (Long)

For a single selection listbox, calling this property with a valid index ( 0 based ) will select specified item. For a multiple selection listbox, this property will toggle the status of the specified item: If the item was selected it won' t be any more or if it wasn' t it will be.

• SetRedraw (Bool)

When you wish to add or to delete more than 1 item in the listbox, set this property to FALSE (0) before the operations then reset it to TRUE (-1) to refresh the listbox.

• SysRefresh [2.0 - VBTabList] (Short)

Call this property when the user change the Windows color to reset the listbox color.

• TabList( Index ) [2.0 - VBTabList] (Short,Arrays)

This is an array of 20 tab positions. You must set the tab position before you fill the listbox, if not tabkeys will use the default 64 points value. Values are in dialog box coordinates, they must be sorted. If the first <TabList> value is 0, the default tabstop settings will be used. If you give just one tablist, this one will be used for all the tab character. This property is write-only.


 VB(Tab)List Events

FileDropped [2.0 - VBTabList] (VBN_FILEDROPPED)

Parameters: Files as integer

The VBTabList control send out this notification message each time a file or a group of files is dropped. The <Files> parameter is the number of files dropped.

DblClick (VBN_DBLCLICK)

Parameters: ID as integer

This event is fired when the user double click on a list item. <ID> is the 0 indexed item number.

SelCancel (VBN_SELCANCEL)

Parameters: <None>

This event is fired when the user cancels his selection (see SDK LBN_SELCANCEL).

SelChange (VBN_SELCHANGE)

Parameters: ID as integer

This event is fired when the user change the selected list item. <ID> is the 0 indexed item number if you use a single selection listbox, otherwise <ID> is the number of selected items.

• Notice that KillFocus and SetFocus (VBN_KILLFOCUS, VBN_SETFOCUS) were removed. We use the standard focus events instead.


 VB(Tab)List Methods

• AddItem (<Item string>[,<index>])

You will use this method to add an item to your listbox. If your listbox is a sorted listbox, you can bypass the sort process if you give a value to <index>. Also, to add an item at the beginning of the list set <index> to 0, if you prefer to add this one to the end, set it to -1. <index> is 0 based. If you choose to use a bitmapped listbox, your item string must be a number ( from 1 to 30 ) and if you use both bitmaps and text datas, you will give your text, the ';' character and the bitmap number like 'MyFirstItem;12'...

• RemoveItem ([<index>])

Will remove the specify 0 based <index> item or all items if you don' t give any <index> value.

• Refresh

will repaint the listbox.


 VB(Tab)List VC++ Extensions

CVBList is the class you must use with VBList controls. CVBTabList is the class you must use with VBTabList controls.

Properties wrappers

CBool Border3D()

CInt Text3D()

CBool AlwaysBitmapped()

CInt BackColor()

CPicture Bitmap01() ( to Bitmap30() )

CHsz Caption()

CInt CaseType() (2.0)

CHsz CtlName()

CBool DisableNoScroll()

CBool Enabled()

CBool FontBold()

CHsz FontName()

CFloat FontSize()

CLong ForeColor()

CLong Height()

CInt ItemHeight()

CInt DataType()

CInt DisplayMode()

CLong Left()

CInt ListCount()

BOOL ListIndex( int index = 0)

CString ListString( int index = 0)

CInt MousePointer()

CBool MultipleSel()

CBool NoRedraw()

CBool ParentNotify()

CInt PictureHeight()

CInt PictureWidth()

CInt PictureXMargin()

CInt PictureYMargin()

CBool SetRedraw2()

CLong SetSel2()

CBool Sort()

CBool TabStop()

CHsz Tag()

CLong Top()

CInt TextAlignment()

CInt TextXMargin()

CInt TextYMargin()

CBool UseHorzScrollBar()

CBool UseTranspBitmap()

CBool Visible()

CLong Width()

void TabList(long Value, int index = 0) (2.0 - VBTabList)

CInt SysRefresh() (2.0 - VBTabList)

CBool WinfileDDrop() (2.0 - VBTabList)

CString DroppedFilename(int index = 0) (2.0 - VBTabList)

Events wrappers

EventDblClkID( LPVOID lp )

used for the VBN_DBLCLIK event and returns <ID>.

EventDroppedFiles [2.0- VBTabList] ( LPVOID lp )

used for the VBN_FILESDROPPED event and returns <Files>.

EventSelChangeID( LPVOID lp )

used for the VBN_SELCHANGE event and returns <ID>.

EventKeyCode( LPVOID lp )

used for VBN_KEYUP and VBN_KEYDOWN and returns the <key code>.

EventKeyShift( LPVOID lp )

used for VBN_KEYUP and VBN_KEYDOWN and returns the <key shift>.

EventKeyPress( LPVOID lp )

used for VBN_KEYPRESS and returns the <key code>.

EventMouseBtn( LPVOID lp )

used for VBN_MOUSEUP and VBN_MOUSEDOWN and returns the mouse button code (see MFC Tech notes for more informations).

EventMouseShift( LPVOID lp )

used for VBN_MOUSEUP and VBN_MOUSEDOWN and returns the shift key state (see MFC Tech notes for more informations).

EventMouseX( LPVOID lp )

used for VBN_MOUSEUP and VBN_MOUSEDOWN and returns the mouse X position in pixels.

EventMouseY( LPVOID lp )

used for VBN_MOUSEUP and VBN_MOUSEDOWN and returns the mouse X position in pixels.

Other

CVBControl* GetVBX()

returns a CVBControl pointer for the current CVB(Tab)List VBX.


 VB(Tab)List Tips

Using the <Caption> property...

<Caption> can be used to fill the listbox when you don' t have many list items. At design time if <Caption> is blank, the test mode will be active ( it will display design-time only items ). You can use the '¤' character to specify more than 1 item, like 'Item1¤Item2...'

How to fill the listbox...

Of course, you must fill the listbox according to the <DataType> you choose: If you use text datas there is no special tips, if you use bitmaps you will fill the list with bitmaps numbers ( from 1 to 30 ) and if you use the both, you give the text then the ';' character and the bitmap number, or just the text if you wish to use the standard bitmap. If you change a style property at run-time you probably have to fill your listbox once again.

No events received...

To receive the notification messages you must set <ParentNotify> property to TRUE (-1).

Using the standard bitmap...

You can use a standard bitmap when you set the <AlwaysBitmapped> property to TRUE (-1). In this case, when you add an item without ';' and any bitmap specification, the VBList control will use the first bitmap with this item. If you set <AlwaysBitmapped> to FALSE (0), no bitmap will be displayed for such item.

Style properties

Now you can change them at run-time. At design time you will have to reload your forms to reflect the changes.


 VBFList, VBTabFList

VBFList, VBTabFList are the VBX Studio bitmapped files ListBoxes.

Properties

Special properties

Events

Methods

VC++ extensions

Tips

Required file(s): VBFLIST.VBX (for VBFList) or VBFLIST2.VBX (for VBTabFList)

Control name: VBFList or VBTabFList

MFC Class name: CVBFList or CVBTabFList ( Base class is CListBox )

• VBFList lists directories, files or user' s file which may include additional informations. This new version lets you change 'style' properties (like <Sort>) at run time if necessary.

• VBTabFList is the same than VBFList with 3 differences: It handles tab keys, it uses a faster method to display the items and, the VBX is able to process WinFile drag' n drop. You should use this version when possible.

See also...

VBList


 VB(Tab)FList Properties

Only non standard properties are described below in alphabetic order:

• BackColor (Short:COLOR40_..)

Specifies the background color. You will have better results with 0 (Use system colors).

• Border3D (Bool)

Set this to TRUE (-1) if you wish the listbox has a 3D border at run time.

• DataType (Short)

You must choose between DIRECTORIES, FILES and USERFILES. UserFiles type allows you to use special filenames ( like 'FILE.TXT ( size: 0K )' ) with an associated bitmap.

• DiableNoScroll [2.0] (Bool)

Set this property to TRUE (-1) if you wish to use a listbox with a permanent vertical scroll bar ( this is not available if you choose the Horizontal scroll bar too ). Now you can change this property at run-time.

• FilesDisplay (Short)

When you use the FILES or the USERFILES data types, you can specify how these files will be displayed: The 'quick' mode only use 2 bitmaps: The first one for program and the second one for data files. The 'Check Winfile' mode checks Winfiles association and use 3 bitmaps ( like WinFile does ). The 'Extensive' mode is the 'Check Winfile' mode but use many bitmaps instead of 3 ( so it requires a little more time for redrawing operations ).

• Help

Will display this Windows HLP file.

• InValue (String)

Use this property to specify the initial directory or initial mask depending on the chosen <DataType>. This property has no effect for USERFILES mode. Valid masks are 'C:\WINDOWS' or 'C:\WINDOWS\*.TXT' for instance. You may also use the "*.*" mask to retrieve the current directory list.

• ItemHeight [2.0] (Short)

Specifies the height of the items height in the list ( in pixels ). Now you can change this property at run-time.

• MultipleSel [2.0] (Bool)

Set this property to TRUE (-1) if you wish to use a multiple selction\extended selection listbox. Of course this property is not available for DIRECTORIES data type. Now you can change this property at run-time.

• ParentNotify [2.0] (Bool)

Set this to TRUE (-1) to receive notifications messages ( generally you must set this property to TRUE ).  Now you can change this property at run-time.

• Sort [2.0] (Bool)

Set this property to TRUE (-1) if you wish to use a sorted listbox. Now you can change this property at run-time.

• StaticID (Short)

If you wish, VBFListBox can automatically fill a static ( label ) control with the user item choice. To use this function, you must give the ID of this control to this property or use <StaticHwnd> ( never use the both!) .

• StaticHwnd (Short)

If you wish, VBFListBox can automatically fill a static ( label ) control with the user item choice. To use this function, you must give the HWND of this control to this property or use <StaticID> (never use the both!).

• Text3D (Short)

Enables or disables the 3D effect for items text.

• UpperCase [2.0] (Bool)

Set to TRUE (-1) if you wish the list box displays file names in uppercase, and FALSE for lowercase.

• UseHorzScrollBar [2.0] (Bool)

Set to TRUE (-1) if you wish to use an horizontal scroll bar if needed. Now you can change this property at run-time.

• vbxAbout

will display the VBX Studio 'About...' box.

• WinfileDDrop [2.0 - VBTabFList] (Bool)

Set this property to TRUE if you want the listbox accept WinFile files.


 VB(Tab)FList Special Properties

• DroppedFilename( Index ) [2.0 - VBTabFList] (String,Arrays)

When a file is dropped on your VBTabFList control, call this property to retrieve the fully qualified filename. As always <Index> is 0 based. This property is read-only.

• ListCount (Short)

Returns the number of items in the listbox

• ListIndex( Index ) (Bool,Arrays)

Use this property array to retrieve the state of an listbox item. If the specified item ( 0 indexed ) is selected, the property will be set to TRUE (-1), otherwise FALSE (0) is returned.

• ListString( Index ) (String,Arrays)

Use this property array to retrieve the string (text) of an listbox item. Don' t forget the string won't be the item text as you see it: For a directories listbox the string will be '[<dir>]' for instance. Also, you will use <OutValue> to retrieve this text.

• OutValue (String)

This property is useful to retrieve the current opened directory because ListString nor SDK message LB_GETCURSEL can give you this value. Also, use this property to retrieve file names and user files names.

• SetSel (Long)

For a single selection listbox, calling this property with a valid index ( 0 based ) will select specified item. For a multiple selection listbox, this property will toggle the status of the specified item: If the item was selected it won' t be any more or if it wasn' t it will be.

• SetRedraw (Bool)

When you wish to add or to delete more than 1 item in the listbox, set this property to FALSE (0) before the operations then reset it to TRUE (-1) to refresh the listbox.

• SysRefresh [2.0 - VBTabFList] (Short)

Call this property when the user change the Windows color to reset the listbox color.

• TabList( Index ) [2.0 - VBTabFList] (Short,Arrays)

This is an array of 20 tab positions. You must set the tab position before you fill the listbox, if not tabkeys will use the default 64 points value. Values are in dialog box coordinates, they must be sorted. If the first <TabList> value is 0, the default tabstop settings will be used. If you give just one tablist, this one will be used for all the tab character. This property is write-only.


 VB(Tab)FList Events

DblClick (VBN_DBLCLICK)

Parameters: ID as integer

This event is fired when the user double click on a list item. <ID> is the 0 indexed item number.

FileDropped [2.0 - VBTabFList] (VBN_FILEDROPPED)

Parameters: Files as integer

The VBTabFList control send out this notification message each time a file or a group of files is dropped. The <Files> parameter is the number of files dropped.

SelCancel (VBN_SELCANCEL)

Parameters: <None>

This event is fired when the user cancels his selection (see SDK LBN_SELCANCEL).

SelChange (VBN_SELCHANGE)

Parameters: ID as integer

This event is fired when the user change the selected list item. <ID> is the 0 indexed item number if you use a single selection listbox, otherwise <ID> is the number of selected items.

• Notice that KillFocus and SetFocus (VBN_KILLFOCUS, VBN_SETFOCUS) were removed. We use the standard focus events instead.


 VB(Tab)FList Methods

• AddItem (<Item string>[,<index>])

You will use this method to add an item to your listbox when you set the <DataType> property to USERFILES. To add your 'user defined filename' you will can use what you want, the ';' character and the file extension in uppercase. So to add a specific file name you can call (for instance):

VBFList1.AddItem "FILES.TXT (218.236 bytes);TXT", -1

If you use a sorted listbox, you can bypass the sort process if you give a value to <index>. Also, to add an item at the beginning of the list set <index> to 0, if you prefer to add this one to the end, set it to -1. <index> is 0 based.

• RemoveItem ([<index>])

Will remove the specify 0 based <index> item or all items if you don' t give any <index> value. You will use this method with the USERFILES <DataType>.

• Refresh

will repaint the listbox.


 VB(Tab)FList VC++ Extensions

CVBFList is the class you must use with VBFList controls. CVBTabFList is the class you must use with VBTabFList controls.

Properties wrappers

CBool Border3D()

CInt Text3D()

CInt BackColor()

CHsz CtlName()

CInt DataType()

CBool DisableNoScroll()

CBool Enabled()

CInt FilesDisplay()

CHsz FontName()

CBool FontBold()

CFloat FontSize()

CLong ForeColor()

CLong Height()

CHsz InValue()

CInt ItemHeight()

CLong Left()

CInt ListCount()

BOOL ListIndex( int index = 0 )

CString ListString( int index = 0 )

CBool MultipleSel()

CHsz OutValue()

CBool ParentNotify()

CBool SetRedraw2()

CLong SetSel2() (2.0)

CBool Sort()

CInt StaticHwnd()

CInt StaticID()

CBool TabStop()

CHsz Tag()

CLong Top()

CBool UseHorizScrollBar()

CBool Visible()

CLong Width()

CBool FontItalic() (2.0)

CBool FontUnderline() (2.0)

CBool FontStrike() (2.0)

CBool UpperCase() (2.0)

void TabList(long Value, int index = 0) (2.0 - VBTabFList)

CInt SysRefresh() (2.0 - VBTabFList)

CBool WinfileDDrop() (2.0 - VBTabFList)

CString DroppedFilename(int index = 0) (2.0 - VBTabFList)

Events wrappers

EventDblClkID( LPVOID lp )

used for the VBN_DBLCLIK event and returns <ID>.

EventDroppedFiles [2.0 - VBTabFList] ( LPVOID lp )

used for the VBN_FILESDROPPED event and returns <Files>.

EventSelChangeID( LPVOID lp )

used for the VBN_SELCHANGE event and returns <ID>.

EventKeyCode( LPVOID lp )

used for VBN_KEYUP and VBN_KEYDOWN and returns the <key code>.

EventKeyShift( LPVOID lp )

used for VBN_KEYUP and VBN_KEYDOWN and returns the <key shift>.

EventKeyPress( LPVOID lp )

used for VBN_KEYPRESS and returns the <key code>.

EventMouseBtn( LPVOID lp )

used for VBN_MOUSEUP and VBN_MOUSEDOWN and returns the mouse button code (see MFC Tech notes for more informations).

EventMouseShift( LPVOID lp )

used for VBN_MOUSEUP and VBN_MOUSEDOWN and returns the shift key state (see MFC Tech notes for more informations).

EventMouseX( LPVOID lp )

used for VBN_MOUSEUP and VBN_MOUSEDOWN and returns the mouse X position in pixels.

EventMouseY( LPVOID lp )

used for VBN_MOUSEUP and VBN_MOUSEDOWN and returns the mouse X position in pixels.

Other

CVBControl* GetVBX()

returns a CVBControl pointer for the current CVB(Tab)FList VBX.


 VB(Tab)FList Tips

No mouse!

With the directory <DataType> and when no mouse is available, you can use the spacebar to 'open' a directory.

Using <DataType>...

If you set this property to USERFILES, you will be able to use customised files name and files list with your VBFList VBX. Basically there are 2 ways to use this: For instance you wish to add size informations to your list. Then you will use the <AddItem> method with something like this "MYFILE.EXT (size);EXT". The other way to use this mode is to make a list from multiple directories or something else ( like a files list in a ZIP file ): Then you have to manually fill the list. See <DataType> and <AddItem> for more informations.

Using the static control...

VB standard text control (named 'Label") can' t be use with the VBFList <StaticHwnd> because this control doesn' t have a standard <Hwnd> property, so, you will use the VBText control instead. VBFlist will change this control text each time the user 'open' a directory: So this text control will reflect the current directory. However there is a limitation with this process: The VBFList control will put the text in the control even if there is no more room for this text ( you won' t have something like 'C:\dir\...\final.dir' ), to make this nicer, you can use the String Studio 3.0 library ( <CheckDirSize> function ) or our new VBFlxTxt.

Style properties

Some properties like <Sort> change the control style. Now you can change them at run-time. At run time you may have to reload (or re-show) your forms to reflect the changes.

Using ApStudio...

If you experience some troubles when you test your application, close the ApStudio program ( VBX Studio VBXs don't like to be loaded in the design time and the run time systems at the same time! ).


 VBCombo

VBCombo is the VBX Studio bitmapped ComboBox.

Properties

Special properties

Events

Methods

VC++ extensions

Tips

Required file(s): VBCOMBO.VBX

Control name: VBCombo

MFC Class name: CVBCombo ( Base class is CComboBox )

• VBCombo displays a combobox (without the Edit field) with up to 30 bitmaps. You may fill the list at design-time, use transparent bitmaps.

See also...

VBFCombo


 VBCombo Properties

Only non standard properties are described below in alphabetic order:

• AlwaysBitmapped (Bool)

Set this property to TRUE (-1) if you wish all items with no bitmap specifications display the first bitmap.

• AutoSearchInList (Bool)

If this property is set to TRUE, each time the user press a key the listbox will appear.

• BackColor (Short:COLOR40_..)

Specifies the background color.

• Bitmap01 to Bitmap30 (Picture:Bitmap)

These are the bitmaps you will use in your combobox. Calling a picture depends on the Data type you 've chosen ( see <Caption> property below ).

• BitmapWidth (Short)

Specifies the bitmap width in pixels when you are on the 'normal' display mode.

• BitmapHeight (Short)

Specifies the bitmap height in pixels when you are on the 'normal' display mode.

• Border3D (Bool)

Set this to TRUE (-1) if you wish the combobox has a 3D border at run time.

• Caption (String)

This string property is used to intialize the listbox: To use the caption you must disable the TestMode property. You can give multiple items data: Use '¤' to separate each item, like this 'Item1¤Item2¤Item3...'. The caption can' t be longer than 255 characters. Item data depends on the data type: For text datas, nothing special; For bitmap only datas, give a number to specify the bitmap number like: '1¤2¤2' and for 'both' datas use ';' to separate text data and bitmap data like this: 'Our text 1 use bitmap 1;1¤Our text 2 uses bitmap 2;2'... If you choose the always bitmapped option, in the 'both' data type, you can give 'Item1' and this will display the bitmap 1 and 'Item1' text ( no ';' required ).

• DataType (Short)

You must choose between TEXT, BITMAP and BOTH ( text and bitmap ).

• DisplayMode (Short)

Specifies the bitmap display mode. Choosing the 'NORMAL' mode allows you to use margin values and stretch mode ('AUTO') is not available with transparent bitmaps.

• Help

Will display this Windows HLP file.

• InitialValue (Long)

Specifies the 0 based initial value for the combobox. Specified item will be selected when the dialog box appears.

• ItemHeight (Short)

Specifies the height of the items height in the list ( in pixels ).

• ListHeight (Short)

Specifies the height of the listbox ( in pixels ).

• StaticHeight (Short)

Specifies the height of the static zone of the combobox ( in pixels ).

• TestMode (Bool)

If this property is set to TRUE (-1) the test mode is active: the combobox will use special built-in items and will display all selected bitmaps. When your combobox seems to be OK, don' t forget to set this property to FALSE (0)!

• Text3D (Short)

Enables or disables the 3D effect for items text.

• TextAlignment (Short)

Specifies the text alignment.

• UseTranspBitmap (Bool)

Set to TRUE (-1) if you wish to 'transparent' bitmaps ( e.g. Bitmaps using the light fuchsia color as the transparent color ). Transparent bitmaps are not available with stretch display mode.

• XMarginBitmap (Short)

Specifies the bitmap horizontal margin ( in pixels ). To use it you must set <DisplayMode> to normal.

• YMarginBitmap (Short)

Specifies the bitmap vertical margin ( in pixels ). To use it you must set <DisplayMode> to normal.

• XMarginText (Short)

Specifies the text horizontal margin ( in pixels ). To use it you must set <DisplayMode> to normal.

• YMarginText (Short)

Specifies the text vertical margin ( in pixels ). To use it you must set <DisplayMode> to normal.

• vbxAbout

will display the VBX Studio 'About...' box.


 VBCombo Special Properties

• ListCount (Short)

Returns the number of items in the listbox

• ListIndex( Index ) (Bool,Arrays)

Use this property array to retrieve the state of an listbox item. If the specified item ( 0 indexed ) is selected, the property will be set to TRUE (-1), otherwise FALSE (0) is returned.

• ListString( Index ) (String,Arrays)

Use this property array to retrieve the string (text) of an listbox item.

• OutValue (String)

This property is useful to retrieve the current selected string. If you' ve chosen the BOTH data type, you will need to extract the left part of the item ( to the ';' character ) because the second part can be the item bitmap number.

• SetSel (Long)

For a single selection listbox, calling this property with a valid index ( 0 based ) will select specified item. For a multiple selection listbox, this property will toggle the status of the specified item: If the item was selected it won' t be any more or if it wasn' t it will be.


 VBCombo Events

Click (VBN_CLICK)

Parameters: ID as integer, Buffer as String

This event is fired when the user click on an item. <ID> is the 0 indexed item number, <String> is the label of the selected item. Don' t forget this label can include a bitmap specification like 'MyItem;1'.

CloseUp (VBN_CLOSEUP)

Parameters: <None>

This event is fired when the user close the listbox (see SDK CBN_CLOSEUP ).

DropDown (VBN_DROPDOWN)

Parameters: <None>

This event is fired when the user open the listbox (see SDK CBN_DROPDOWN ).

SelCancel (VBN_SELCANCEL)

Parameters: <None>

This event is fired when the user cancels his selection (see SDK CBN_SELCANCEL).

SelCancel (VBN_SELENDOK)

Parameters: <None>

This event is fired when the user validate his selection (see SDK CBN_SELENDOK).

SelChange (VBN_SELCHANGE)

Parameters: ID as integer, Buffer as String

This event is fired when the user click on an item. <ID> is the 0 indexed item number, <String> is the label of the selected item. Don' t forget this label can include a bitmap specification like 'MyItem;1'.


 VBCombo Methods

• AddItem (<Item string>[,<index>])

You will use this method to add an item to your combobox listbox. Also, to add an item at the beginning of the list set <index> to 0, if you prefer to add this one to the end, set it to -1. <index> is 0 based. If you choose to use a bitmapped listbox, your item string must be a number ( from 1 to 30 ) and if you use both bitmaps and text datas, you will give your text, the ';' character and the bitmap number like 'MyFirstItem;12'...

• RemoveItem ([<index>])

Will remove the specify 0 based <index> listbox item or all items if you don' t give any <index> value.

• Refresh

will repaint the combobox.


 VBCombo VC++ Extensions

CVBCombo is the class you must use with VBCombo controls.

Properties wrappers

CBool Border3D()

CInt Text3D()

CBool AlwaysBitmapped()

CBool AutoSearchInList()

CInt BackColor()

CPicture Bitmap01() to Bitmap30()

CInt BitmapHeight()

CInt BitmapWidth()

CHsz CtlName()

CHsz Caption()

CInt DataType()

CInt DisplayMode()

CBool Enabled()

CHsz FontName()

CBool FontBold()

CFloat FontSize()

CLong ForeColor()

CLong Height()

CLong InitialValue()

CInt ItemHeight()

CLong Left()

CInt ListCount()

CInt ListHeight()

BOOL ListIndex( int index = 0 )

CString ListString( int index = 0 )

CHsz OutValue()

CLong SetSel2()

CInt StaticHeight()

CBool TabStop()

CHsz Tag()

CBool TestMode()

CInt TextAlignment()

CLong Top()

CBool UseTranspBitmap()

CBool Visible()

CLong Width()

CInt XMarginBitmap()

CInt XMarginText()

CInt YMarginBitmap()

CInt YMarginText()

Events wrappers

EventClickID( LPVOID lp )

used for the VBN_DBLCLIK event and returns <ID>.

EventClickString( LPVOID lp )

used for the VBN_DBLCLIK event and returns <Buffer>.

EventSelChangeID( LPVOID lp )

used for the VBN_SELCHANGE event and returns <ID>.

EventSelChangeString( LPVOID lp )

used for the VBN_SELCHANGE event and returns <Buffer>.

EventKeyCode( LPVOID lp )

used for VBN_KEYUP and VBN_KEYDOWN and returns the <key code>.

EventKeyShift( LPVOID lp )

used for VBN_KEYUP and VBN_KEYDOWN and returns the <key shift>.

EventKeyPress( LPVOID lp )

used for VBN_KEYPRESS and returns the <key code>.

EventMouseBtn( LPVOID lp )

used for VBN_MOUSEUP and VBN_MOUSEDOWN and returns the mouse button code (see MFC Tech notes for more informations).

EventMouseShift( LPVOID lp )

used for VBN_MOUSEUP and VBN_MOUSEDOWN and returns the shift key state (see MFC Tech notes for more informations).

EventMouseX( LPVOID lp )

used for VBN_MOUSEUP and VBN_MOUSEDOWN and returns the mouse X position in pixels.

EventMouseY( LPVOID lp )

used for VBN_MOUSEUP and VBN_MOUSEDOWN and returns the mouse X position in pixels.

Other

CVBControl* GetVBX()

returns a CVBControl pointer for the current CVBCombo VBX.


 VBCombo Tips

Sorting...

VBCombo listboxes are always sorted. If you wish to bypass this, just give an index to the <AddItem> method ( also, -1 will add the item at the end of the listbox ). See <AddItem> method for more informations.

Using the <TestMode> property...

When <TestMode> is TRUE (-1), the combobox will be filled with test items to help you to build your combox at design time. Before you distribute your application, do not forget to set this property to FALSE (0).

Using the <Caption> property...

<Caption> can be used to fill the listbox when you don' t have many list items. To activate this, set <TestMode> property to FALSE (0). You can use the '¤' character to specify more than 1 item, like 'Item1¤Item2...'

How to fill the listbox...

Of course, you must fill the listbox according to the <DataType> you choose: If you use text datas there is no special tips, if you use bitmaps you will fill the list with bitmaps numbers ( from 1 to 30 ) and if you use the both, you give the text then the ';' character and the bitmap number, or just the text if you wish to use the standard bitmap.

Using the standard bitmap...

You can use a standard bitmap when you set the <AlwaysBitmapped> property to TRUE (-1). In this case, when you add an item without ';' and any bitmap specification, the VBCombo control will use the first bitmap with this item. If you set <AlwaysBitmapped> to FALSE (0), no bitmap will be displayed for such item.

Style properties

Some properties like <StaticHeight> change the control style. You can' t change them dynamically with your application. Also, in some cases, under at design time you will have to reload your forms to reflect the changes.


 VBFCombo

VBFCombo is the VBX Studio bitmapped files ComboBox.

Properties

Special properties

Events

Methods

VC++ extensions

Tips

Required file(s): VBFCOMBO.VBX

Control name: VBFCombo

MFC Class name: CVBFCombo ( Base class is CComboBox )

• VBFCombo lists drives, files or user' s file which may include additional informations. This new version adds some methods for an easy drives management.

See also...

VBCombo


 VBFCombo Properties

Only non standard properties are described below in alphabetic order:

• AutoSearchInList (Bool)

If this property is set to TRUE, each time the user press a key the listbox will appear.

• AutoSetSel [2.0] (Bool)

If this property is set to TRUE, the edit field will be filled with the current drive when <InValue> is changed/loaded. Use this property with <GetCurDir>/<GotoDir>/<DriveValid>. This property is available in 'Drive' mode only.

• BackColor (Short:COLOR40_...)

Specifies the background color.

• Border3D (Bool)

Set this to TRUE (-1) if you wish the combobox has a 3D border at run time.

• DataType (Short)

You must choose between DRIVES, FILES and USERFILES. UserFiles type allows you to use special filenames ( like 'FILE.TXT ( size: 12 Kb. )' ) with an associated bitmap.

• FilesDisplay (Short)

When you use the FILES or the USERFILES data types, you can specify how these files will be displayed: The 'quick' mode only use 2 bitmaps: The first one for program and the second one for data files. The 'Check Winfile' mode checks Winfiles association and use 3 bitmaps ( like WinFile does ). The 'Extensive' mode is the 'Check Winfile' mode but use many bitmaps instead of 3 ( so it requires a little more time for redrawing operations ).

• Help

Will display this Windows HLP file.

• InitialValue (Long)

Specifies the 0 based initial value for the combobox. Specified item will be selected when the dialog box appears.

• InValue (String)

Use this property to specify the initial mask or directory depending on the chosen DataType. This property has no effect for USERFILES mode. Valid masks are like 'C:\WINDOWS\*.*' or '*.*' for files, '*.*' for drives.

• ItemHeight (Short)

Specifies the height of the items height in the list ( in pixels ).

• ListHeight (Short)

Specifies the height of the listbox ( in pixels ).

• StaticHeight (Short)

Specifies the height of the static zone of the combobox ( in pixels ).

• Text3D (Short)

Enables or disables the 3D effect for items text.

• TextAlignment (Short)

Specifies the text alignment.

• UpperCase [2.0] (Bool)

Set this property to TRUE if you want the items are displayed in uppercase. If not they will be in lowercase.

• vbxAbout

will display the VBX Studio 'About...' box.


 VBFCombo Special Properties

• DriveValid [2.0] (Bool)

You may read this property each time the user change the VBFCombo drive. Returns FALSE if this drive is not ready.

• GetCurDir [2.0] (String)

Returns the current fully qualified directory (like "A:\MYDIR\"). This name ends with \.

• GotoDrive [2.0] (Bool)

Call this write-only property to set the current drive depending on the combobox selected item. Use with <DriveValid>. This property is available with the 'drives' mode only.

• ListCount (Short)

Returns the number of items in the listbox

• ListIndex( Index ) (Bool,Arrays)

Use this property array to retrieve the state of an listbox item. If the specified item ( 0 indexed ) is selected, the property will be set to TRUE (-1), otherwise FALSE (0) is returned.

• ListString( Index ) (String,Arrays)

Use this property array to retrieve the string (text) of an listbox item. For a drives combobox the string will be '[-<drive>-]' for instance. Also, you will use <OutValue> to retrieve this text.

• OutValue (String)

This property is useful to retrieve the current opened directory because ListString nor SDK message LB_GETCURSEL can give you this value. Also, use this property to retrieve file names and user files names.

• SetSel (Long)

For a single selection listbox, calling this property with a valid index ( 0 based ) will select specified item. For a multiple selection listbox, this property will toggle the status of the specified item: If the item was selected it won' t be any more or if it wasn' t it will be.


 VBFCombo Events

CloseUp (VBN_CLOSEUP)

Parameters: <None>

This event is fired when the user close the listbox (see SDK CBN_CLOSEUP ).

DropDown (VBN_DROPDOWN)

Parameters: <None>

This event is fired when the user open the listbox (see SDK CBN_DROPDOWN ).

SelCancel (VBN_SELCANCEL)

Parameters: <None>

This event is fired when the user cancels his selection (see SDK CBN_SELCANCEL).

SelCancel (VBN_SELENDOK)

Parameters: <None>

This event is fired when the user validate his selection (see SDK CBN_SELENDOK).

SelChange (VBN_SELCHANGE)

Parameters: ID as integer, Buffer as String

This event is fired when the user click on an item. <ID> is the 0 indexed item number, <String> is the label of the selected item. When you use a 'drives' combobox, <Buffer> will be the item text as you see it ( like <OutValue> ). Also, if you use the 'UserFiles' mode, this text will include all the item text ( with ';EXT' ).


 VBFCombo Methods

• AddItem (<Item string>[,<index>])

You will use this method to add an item to your listbox when you set the <DataType> property to USERFILES. To add your 'user defined filename' you will can use what you want, the ';' character and the file extension in uppercase. So to add a specific file name you can call (for instance):

VBFCombo1.AddItem "FILES.TXT (218.236 bytes);TXT", -1

Also, to add an item at the beginning of the list set <index> to 0, if you prefer to add this one to the end, set it to -1. <index> is 0 based.

• RemoveItem ([<index>])

Will remove the specify 0 based <index> item or all items if you don' t give any <index> value. You will use this method with the USERFILES <DataType>.

• Refresh

will repaint the combobox.


 VBFCombo VC++ Extensions

CVBFCombo is the class you must use with VBFCombo controls.

Properties wrappers

CInt Text3D()

CBool Border3D()

CBool AutoSearchInList()

CHsz CtlName()

CInt DataType()

CBool Enabled()

CInt FilesDisplay()

CHsz FontName()

CBool FontBold()

CFloat FontSize()

CLong ForeColor()

CLong Height()

CLong InitialValue()

CHsz InValue()

CInt ItemHeight()

CLong Left()

CInt ListCount()

CInt ListHeight()

BOOL ListIndex( int index = 0 )

CString ListString( int index = 0 )

CHsz OutValue()

CLong SetSel2()

CInt StaticHeight()

CInt BackColor()

CInt TabIndex()

CBool TabStop()

CHsz Tag()

CInt TextAlignment()

CLong Top()

CBool Visible()

CLong Width()

CBool FontItalic() (2.0)

CBool FontUnderline() (2.0)

CBool FontStrike() (2.0)

CHsz GetCurDir() (2.0)

CBool DriveValid() (2.0)

CBool AutoSetSel() (2.0)

CBool GotoDrive() (2.0)

CBool UpperCase() (2.0)

Events wrappers

EventSelChangeID( LPVOID lp )

used for the VBN_SELCHANGE event and returns <ID>.

EventSelChangeString( LPVOID lp )

used for the VBN_SELCHANGE event and returns <Buffer>.

EventKeyCode( LPVOID lp )

used for VBN_KEYUP and VBN_KEYDOWN and returns the <key code>.

EventKeyShift( LPVOID lp )

used for VBN_KEYUP and VBN_KEYDOWN and returns the <key shift>.

EventKeyPress( LPVOID lp )

used for VBN_KEYPRESS and returns the <key code>.

EventMouseBtn( LPVOID lp )

used for VBN_MOUSEUP and VBN_MOUSEDOWN and returns the mouse button code (see MFC Tech notes for more informations).

EventMouseShift( LPVOID lp )

used for VBN_MOUSEUP and VBN_MOUSEDOWN and returns the shift key state (see MFC Tech notes for more informations).

EventMouseX( LPVOID lp )

used for VBN_MOUSEUP and VBN_MOUSEDOWN and returns the mouse X position in pixels.

EventMouseY( LPVOID lp )

used for VBN_MOUSEUP and VBN_MOUSEDOWN and returns the mouse X position in pixels.

Other

CVBControl* GetVBX()

returns a CVBControl pointer for the current CVBFCombo VBX.


 VBFCombo Tips

Sorting...

VBFCombo comboboxes (like VBCombo) are always sorted. If you wish to bypass this, just give an index to the <AddItem> method ( also, -1 will add the item at the end of the listbox ).

Using <DataType>...

If you set this property to USERFILES, you will be able to use customised files name and files list with your VBFCombo VBX. Basically there are 2 ways to use this: For instance you wish to add size informations to your list. Then you will use the <AddItem> method with something like this "MYFILE.EXT (size);EXT". The other way to use this mode is to make a list from multiple files lists or something else ( like a files list in a ZIP file ): Then you have to manually fill the list. See <DataType> and <AddItem> for more informations.

Style properties

Some properties like <StaticHeight> change the control style. That' s why you can' t change them dynamically with your application. Also, in some cases, under at design time you will have to reload your forms to reflect the changes.


 VBEdit

VBEdit is the VBX Studio pictured Edit control.

Properties

Special properties

Events

Methods

VC++ extensions

Tips

Required file(s): VBEDIT.VBX

Control name: VBEdit

MFC Class name: CVBEdit ( Base class is CEdit )

• VBEdit lets the user type some text: Thanks to about 50 properties this control performs all necessary verifications. Also, you may use the WIN.INI settings and you may change all the 'style' properties at run-time.With this new version you can directly read/write numbers.

See also...

VBMask

VBText

VBSpin


 VBEdit Properties

Only non standard properties are described below in alphabetic order:

• Alignment [2.0] (Bool)

Choose the text alignment. You can change it at run-time (in GotFocus/LostFocus) for instance.

• If you change the alignment mode at run time and you are using the 3D border, maybe you will need to call the <Refresh> property in Form.Paint.

• AllowAutoChange (Bool)

If TRUE (-1) the edit control can add characters if needed ( specially with time or drive input ).

• AllowBlankField (Bool)

If TRUE (-1) <IsValid> property will return TRUE if there is no text in the edit control, otherwise the 'normal' checking process is performed.

• BeepIfError (Bool)

Specify if a little beep is generated in case the user press an invalid key.

• Border3D (Bool)

Set this to TRUE (-1) if you wish the edit control has a 3D border at run time.

• Case [2.0] (Short)

You must choose a case between NO CASE, UPPERCASE and LOWERCASE. Depending on this choice, all user input will or won' t be converted in the specified case style.  Now, you can change this property at run-time.

• DataType (Short)

Specify an input mask. NONE will disable input checking. The alphabetic mask doesn' t allow the '_' character, the drives mask accepts valid drives only, time and date masks required a valid date and the last 2 files masks accept names with or without a final '\'. Filenames and directory names don' t accept the '/' directories separator ( only '\' is allowed ) but they accept a name with a final '.'. Depending on the chosen mask, <IsValid> property will be set to TRUE or FALSE.

• DecimalDigits [2.0] (Short)

Change the number of decimal digits for the <rValue> special property.

• Help

Will display this Windows HLP file.

• IncrementValue (Short)

Sets the increment value.

• MaxLength (Short)

Specify the maximum length for the user input.

• MaxRange (Float)

Sets the maxrange for numerical input. This value must be positive. To disable this property, give the same value to <MinRange>.

• MinRange (Float)

Sets the minrange for numerical input. This value can be negative. To disable this property, give the same value to <MaxRange>.

• NoHideSelection [2.0] (Bool)

If this property is set to TRUE (-1) the edit selection will be kept when the edit control losts the focus. Now, you can change this property at run-time.

• OEMConvert [2.0] (Bool)

If this property is set to TRUE (-1) the edit control will convert OEM characters.  Now, you can change this property at run-time.

• PasswordChars [2.0] (Bool)

If this property is set to TRUE (-1) the edit control will display '*' instead of the user input.  Now, you can change this property at run-time.

• ReadOnly (Bool)

If this property is set to TRUE (-1) the edit text won' t be changed nor deleted.

• Text (String)

This is the control text. This string can' t be a multiline string.

• UseSystemCfg [2.0] (Bool)

If this property is set to TRUE (-1) the edit control will check and use user's configuration for the decimal point and the time/date separators. When the user change this configuration, you should call the special property <SysRefresh>.

• UseSystemColors (Bool)

If this property is set to TRUE (-1) the edit control will check and use user's configuration colors instead of colors you' ve specified at design time.

• vbxAbout

will display the VBX Studio 'About...' box.


 VBEdit Special Properties

• Decrement (Bool)

When you set this property to TRUE (-1), the edit control current value will be decremented using the mask. If the edit value is not valid, it will be changed into a valid text. When you use this property with the VBSpin VBX you must reset the VBSpin <Value> property to 0.

• Increment (Bool)

When you set this property to TRUE (-1), the edit control current value will be incremented using the mask. If the edit value is not valid, it will be changed into a valid text. When you use this property with the VBSpin VBX you must reset the VBSpin <Value> property to 0.

• IsValid (Bool)

This property is set to TRUE if the user input is correct, this depends on the current mask.

• iValue [2.0] (Short)

Read/Write the current integer text value.

• lValue [2.0] (Long)

Read/Write the current long integer text value.

• rValue [2.0] (Float)

Read/Write the current floating point text value. (If this number contains more than 7 digits this number may be incorrect).

• SetSel (Bool)

When you set this property to TRUE (-1), the edit control text will be selected. In most cases, you' ll have to use a SetFocus afterwise.

• SysRefresh [2.0] (Short)

Call this property when WIN.INI has changed to reload the decimal point and the time/date separators. It has no effect when <UseSystemCfg> is set to FALSE.


 VBEdit Events

Change (VBN_CHANGE)

Parameters: <None>

This event is fired when the user change the VBEdit text (see SDK EN_CHANGE ).

Update (VBN_UPDATE)

Parameters: <None>

This event is fired when the user change the VBEdit text (see SDK EN_UPDATE ).

MaxText (VBN_MAXTEXT)

Parameters: <None>

This event is fired when the user attempt to put too much datas in the VBEdit control (see SDK EN_MAXTEXT ).

• Notice that KillFocus and SetFocus (VBN_KILLFOCUS, VBN_SETFOCUS) were removed. We use the standard focus events instead.


 VBEdit Methods

• Refresh

will repaint the edit control.


 VBEdit VC++ Extensions

CVBEdit is the class you must use with VBEdit controls.

Properties wrappers

CBool Border3D()

CBool AllowBlankField()

CBool AllowAutoChange()

CLong BackColor()

CBool BeepIfError()

CInt BorderStyle()

CInt Case()

CHsz CtlName()

CBool Decrement()

CInt DataType()

CBool Increment()

CInt IncrementValue()

CBool IsValid()

CBool Enabled()

CBool FontBold()

CHsz FontName()

CFloat FontSize()

CLong ForeColor()

CLong Height()

CLong Left()

CInt MaxLength()

CFloat MaxRange()

CFloat MinRange()

CBool NoHideSelection()

CBool OEMConvert()

CBool PasswordChars()

CBool ReadOnly()

CBool SetSel2()

CBool TabStop()

CHsz Tag()

CHsz Text()

CLong Top()

CBool UseSystemColors()

CBool Visible()

CLong Width()

CInt Alignment() (2.0)

CInt SysRefresh() (2.0)

CInt iValue() (2.0)

CLong lValue() (2.0)

CFloat rValue() (2.0)

CBool UseSystemCfg() (2.0)

CInt DecimalDigits() (2.0)

Events wrappers

<None>

Other

CVBControl* GetVBX()

returns a CVBControl pointer for the current CVBEdit VBX.


 VBEdit Tips

Using system colors...

In many cases it' s a good idea to use the user's configuration system colors ( and set the <UseSystemColors> property to TRUE (-1) ). With this new version, the 3D border uses the configuration colors (there is no need to use VB3D).

Style properties

Now you can change these properties ( <Alignment>, <Case>...) at run-time. However, at design-time you may have to reload your forms to reflect the changes.

Using VBEdit with VBSpin...

VBEdit can be used with VBSpin and it manages (itself) the VBSpin control: You just have to put a VBEdit handler like 'VBEdit1.Increment = True' behind the VBSpin scrolling notification messages and, then reset, the VBSpin <Value> property to 0. When you use this method you must disable the VBSpin range checking. VBEdit doesn' t handle floating point numbers increment.

Using the <IsValid> property...

This property will be set to TRUE (-1) if the user give a correct value. If you set <AllowBlankField>, this property will be TRUE if there is no text. VBEdit uses a double checking process: The first one occurs when the user press a key and the second one will be performed when you have a look at this property. Also, it' s a good idea to read this property each time you receive a VBEdit <Update> notification message in order to enable or disable some dialog box buttons for instance..

Using String Studio...

Visual C++ will find a big advantage with String Studio with the VBEdit control: This library can help you to format string, to use numbers and dates and to manage your control from a string! Also, this library is required to use CTime DDX routines. If you plan to use floating point numbers larger than 7 digits you need it to handle 'double' values.


 VBSpin

VBSpin is the VBX Studio 3D spin control.

Properties

Events

Methods

VC++ extensions

Tips

Required file(s): VBSPIN.VBX

Control name: VBSpin

MFC Class name: CVBSpin ( Base class is CStatic )

• VBSpin is a spin control which may handle the associated Edit control automatically. This new version doesn' t require SPINDLL.DLL any longer and is able to build Horizontal spins. You may use this VBX with VBEdit to increment/decrement dates for instance.

See also...

VBEdit


 VBSpin Properties

Only non standard properties are described below in alphabetic order:

• ArrowsColor (Long:COLORREF)

Changes the arrows color.

• AssociatedHwnd (Short)

Giving a valid edit control HWND value to this property will activate the 'automatic' mode. The automatic mode will fill this edit control each time the spin control is pressed. The automatic mode won' t change the edit text if this text is not valid when the spin control is called (to avoid this, use the VBEdit <Increment> and <Decrement> functions instead ). If you give an HWND to this property, do not give an ID to the <AssociatedID> property.

• AssociatedID (Short)

Giving a valid edit control ID value to this property will activate the 'automatic' mode. The automatic mode will fill this edit control each time the spin control is pressed. The automatic mode won' t change the edit text if this text is not valid when the spin control is called (to avoid this, use the VBEdit <Increment> and <Decrement> functions instead ). If you give an ID to this property, do not give an HWND to the <AssociatedHwnd> property.

• AutoPos (Bool)

This property doesn' t work with VB! With VC++ set this property to TRUE (-1) and the spin control will look for the previous control and then will position the control close to this control. Also, if you wish to use this property, build your edit control just before you build the spin.

• BorderColor (Long:COLORREF)

Changes the spin border (the frame) color.

• HandCursor (Bool)

If set to TRUE (-1) a hand cursor will be used with the spin control ( run time only ).

• HorizontalMode [2.0] (Bool)

Set this property to TRUE if you want the spin control has left/right arrows instead of top/bottom arrows. With this mode, you will receive the <ScrollUp> message when the user click on the right part of the spin, <ScrollDn> for the left part of the control. You may change this property at run-time if necessary.

• Help

Will display this Windows HLP file.

• Maximum (Float)

Give the maximum value for the spin. This value must be positive. If you use the VBEdit <Increment> and <Decrement> properties to handle your spin, in most case you will give 1 to this property and each time you receive a scrolling notification message you will reset the <Value> property to 0.

• Minimum (Float)

Give the minimum value for the spin. This value can be negative. If you use the VBEdit <Increment> and <Decrement> properties to handle your spin, in most case you will give -1 to this property and each time you receive a scrolling notification message you will reset the <Value> property to 0.

• UseSystemColors (Bool)

If this property is set to TRUE (-1) the spin control will check and use user's configuration colors (  button section ) instead of colors you' ve specified at design time.

• Value (Float)

For a manual spin handling you must update this value each time the spin control is called and each time the user changes the associated text control. This value can be negative. If you use the VBEdit <Increment> and <Decrement>  properties to handle your spin, in most case you will give 0 to this property, -1 to <Minimum> and 1 to <Maximum>, because the VBEdit control does all necessary works. To do this, you must reset the <Value> property to 0 each time you receive a VBSpin scrolling notification message. Also, for the 'automatic' mode ( when you give a value for <AssociatedID> or <AssociatedHwnd> ), you don' t have to worry about this property. See VBSpin tips for additional infos.

• vbxAbout

will display the VBX Studio 'About...' box.


 VBSpin Special Properties

<none>


 VBSpin Events

ScrollUp (VBN_SCROLLUP)

Parameters: <None>

This event is fired when the user click on the upper spin arrow. If you don' t wish to use the VBSpin range checking, don' t forget to reset the <Value> property (to 0) each time you receive this message.

ScrollDn (VBN_SCROLLDN)

Parameters: <None>

This event is fired when the user click on the lower spin arrow. If you don' t wish to use the VBSpin range checking, don' t forget to reset the <Value> property (to 0) each time you receive this message.


 VBSpin Methods

• Refresh

will repaint the spin control.


 VBSpin VC++ Extensions

CVBSpin is the class you must use with VBSpin controls.

Properties wrappers

CLong ArrowsColor()

CInt AssociatedHwnd()

CInt AssociatedID()

CBool AutoPos()

CLong BorderColor()

CHsz CtlName()

CBool Enabled()

CBool HandCursor()

CBool HorizontalMode() (2.0)

CLong Height()

CLong Left()

CFloat Maximum()

CFloat Minimum()

CHsz Tag()

CLong Top()

CBool UseSystemColors()

CFloat Value()

CBool Visible()

CLong Width()

Events wrappers

EventKeyCode( LPVOID lp )

used for VBN_KEYUP and VBN_KEYDOWN and returns the <key code>.

EventKeyShift( LPVOID lp )

used for VBN_KEYUP and VBN_KEYDOWN and returns the <key shift>.

EventKeyPress( LPVOID lp )

used for VBN_KEYPRESS and returns the <key code>.

EventMouseBtn( LPVOID lp )

used for VBN_MOUSEUP and VBN_MOUSEDOWN and returns the mouse button code (see MFC Tech notes for more informations).

EventMouseShift( LPVOID lp )

used for VBN_MOUSEUP and VBN_MOUSEDOWN and returns the shift key state (see MFC Tech notes for more informations).

EventMouseX( LPVOID lp )

used for VBN_MOUSEUP and VBN_MOUSEDOWN and returns the mouse X position in pixels.

EventMouseY( LPVOID lp )

used for VBN_MOUSEUP and VBN_MOUSEDOWN and returns the mouse X position in pixels.

Other

CVBControl* GetVBX()

returns a CVBControl pointer for the current CVBSpin VBX.


 VBSpin Tips

Handling the spin

Basically there are 3 ways to manage the VBSpin control depending on the amount of code you' re ready to produce:

For simple numeric values, the best way is to use the 'automatic' mode. In this case, you must give a value for <AssociatedID> or <AssociatedHwnd>. With this mode, if the user give an invalid value in the text control, the spin will repace the Edit text with the current VBSpin value.

The second way is to use the VBEdit control and its <Increment> and <Decrement> properties. To use this mode, disable the spin ranges ( set <Minimum> to -1, <Maximum> to 1 and <Value> to 0 ) because the VBEdit doesn' t need this range checking. VBEdit can change the text if this one is not valid and this control can perform special processing for dates and drives for instance. There is no range checking when you use VBEdit date/time datas and, VBEdit doesn' t handle float increment nor specific datas.

So the third way is to handle VBSpin notifications message and change the text by your own. In this case, you must give values to the VBSpin <Minimum>, <Maximum> properties, and, you must update the <Value> property each time the text control is updated.

Using Edit, VBEdit or VBMask?

In most cases you will prefer VBEdit because VBMask changes the string using the Windows configuration which doesn' t work if you choose to use the 'automatic' mode. VBEdit is more useful than the standard Edit controls since it checks the user input, it lets you read/write numbers directly and, the control has many options. However you can use the standard Edit control and some other third party edit controls with VBSpin.

Using String Studio...

Visual C++ users may use String Studio 3.0 with VBSpin/VBEdit to use CTime objects and to use double values for instance.


 VBGauge

VBGauge is the VBX Studio gauge (percentage) control.

Properties

Methods

VC++ extensions

Tips

Required file(s): VBGAUGE.VBX

Control name: VBGauge

MFC Class name: CVBGauge ( Base class is CStatic )

• VBGauge may use 3D effects, varaible colors and floating point values and, it supports reversed value (i.e from 100 to 0).


 VBGauge Properties

Only non standard properties are described below in alphabetic order:

• BackColor (Short:COLOR40_...)

Specifies the background color.

• Border3D (Bool)

Set this to TRUE (-1) if you wish the edit control has a 3D border at run time.

• Gauge3DBorder (Bool)

Set this to TRUE (-1) if you wish the gauge has a small 3D border.

• GaugeColor (Short:COLOR40_...)

Specifies the gauge color (this is the foreground color).

• Help

Will display this Windows HLP file.

• Maximum (Float)

This is the maximum value and it must be positive. This property will be used to compute the rate.

• Minimum (Float)

This is the minimum value and it can be negative.This property will be used to compute the rate.

• ShowTheRate (Bool)

Set this to TRUE (-1) if you wish to show the gauge rate (percentage). If you choose this option, because the rate string are always black, specify light colors for both <BackColor> and <GaugeColor>.

• Value (Float)

Current value. If you prefer to use a rate, set <Minimum> to 0 and <Maximum> to 100. Each time you change this value you have to call the VBGauge <Refresh> method to reflect the change.

• VariableColors (Bool)

If set to TRUE (-1), the gauge foreground color will be red if the rate is lower than 33%, yellow if the rate is higher than 33% and smaller than 66% and green if not.

• vbxAbout

will display the VBX Studio 'About...' box.


 VBGauge Special Properties

<none>


 VBGauge Events

<none>


 VBGauge Methods

• Refresh

will repaint the gauge control.


 VBGauge VC++ Extensions

CVBGauge is the class you must use with VBGauge controls.

Properties wrappers

CBool Border3D()

CInt BackColor()

CInt BorderStyle()

CHsz CtlName()

CBool Enabled()

CBool Gauge3DBorder()

CInt GaugeColor()

CLong Height()

CLong Left()

CFloat Maximum()

CFloat Minimum()

CBool ShowTheRate()

CHsz Tag()

CLong Top()

CFloat Value()

CBool VariableColors()

CBool Visible()

CLong Width()

Events wrappers

<None>

Other

CVBControl* GetVBX()

returns a CVBControl pointer for the current CVBGauge VBX.


 VBGauge Tips

How to display the rate...

To display the gauge rate (value), set the <ShowTheRate> property to TRUE (-1). Also to use this, choose a light background color (light grey or white for instance) and do the same for the foreground color because the rate use the black pen.

No changes appear!

It' s a common question we received: When you perform a long treatment you have to let Windows send/receive messages. To do this you can call <DoEvents> with Visual Basic or <AfxGiveTheHand> you will find in String Studio 3.0 once you called the <Refresh> method.


 VBTab

VBTab is the VBX Studio tabbed-dialog boxes control.

Properties

Methods

VC++ extensions

Tips

Required file(s): VBTAB.VBX

Control name: VBTab

MFC Class name: CVBTab ( Base class is CButton )

• With VBTab/VBLine you can build easy to use tabbed-dialog boxes. You can use more than a single line of tabs and you can set the tabs where you want.

See also...

VBLine


 VBTab Properties

Only non standard properties are described below in alphabetic order:

• Active (Bool)

You will use this property in 2 ways: The first one at design time, you will set this property to TRUE (-1) to activate this tab ( only one tab can be active, the others will have this property set to FALSE (0)). At run time, when the user click on a tab, this tab <Active> property will be set to TRUE (-1) and the other tabs <Active> property will be set to FALSE (0).

• FirstLeft (Bool)

Set this property to TRUE (-1) if the tab is the most left tab of your tabs line.

• FirstLine (Bool)

Set this property to TRUE (-1) if the tab is in the first line tabs. When this property is set to TRUE (-1), when the user click on the tab button, this tab will become <Active>, otherwise ( if <FirstLine> is FALSE ) the text will be exchanged with the current ( <FirstLine> ) active tab. If you don' t use multiple lines, all your tabs must have this property set to TRUE (-1).

• FirstRight (Bool)

Set this property to TRUE (-1) if the tab is the most right tab of your tabs line.

• FlashColor (Long:COLORREF)

Specifies the background color of selected tab text.

• FlashTxtColor (Long:COLORREF)

Specifies the foreground color of selected tab text.

• HandCursor (Bool)

If set to TRUE (-1) a hand cursor will be used with the tab control ( run time only ).

• Help

Will display this Windows HLP file.

• UseSystemColors (Bool)

If this property is set to TRUE (-1) the tab control will check and use user's configuration colors (  button section ) instead of colors you' ve specified at design time.

• TabCorners (Bool)

Set this property to TRUE (-1) if you prefer rounded corners instead of square corners.

• Text3D (Short)

Enables or disables the 3D effect for the tab text (caption property).

• vbxAbout

will display the VBX Studio 'About...' box.


 VBTab Special Properties

<none>

To retrieve the state of a tab, read the <Active> property.


 VBTab Events

<none>

The most useful property is <Click> (VBN_CLICK): When the user selects a VBTab button, you will receive this notification message.


 VBTab Methods

• Refresh

will repaint the VBTab control.


 VBTab VC++ Extensions

CVBTab is the class you must use with VBTab controls.

Properties wrappers

CInt Text3D()

CBool Active()

CLong BackColor()

CHsz Caption()

CHsz CtlName()

CBool Enabled()

CBool FirstLeft()

CBool FirstLine()

CBool FirstRight()

CLong FlashColor()

CLong FlashTxtColor()

CBool FontBold()

CBool FontItalic()

CHsz FontName()

CFloat FontSize()

CBool FontUnderline()

CLong ForeColor()

CBool HandCursor()

CLong Height()

CLong Left()

CInt MousePointer()

CBool TabCorners()

CBool TabStop()

CHsz Tag()

CLong Top()

CBool UseSystemColors()

CBool Visible()

CLong Width()

Events wrappers

EventKeyCode( LPVOID lp )

used for VBN_KEYUP and VBN_KEYDOWN and returns the <key code>.

EventKeyShift( LPVOID lp )

used for VBN_KEYUP and VBN_KEYDOWN and returns the <key shift>.

EventKeyPress( LPVOID lp )

used for VBN_KEYPRESS and returns the <key code>.

EventMouseBtn( LPVOID lp )

used for VBN_MOUSEUP and VBN_MOUSEDOWN and returns the mouse button code (see MFC Tech notes for more informations).

EventMouseShift( LPVOID lp )

used for VBN_MOUSEUP and VBN_MOUSEDOWN and returns the shift key state (see MFC Tech notes for more informations).

EventMouseX( LPVOID lp )

used for VBN_MOUSEUP and VBN_MOUSEDOWN and returns the mouse X position in pixels.

EventMouseY( LPVOID lp )

used for VBN_MOUSEUP and VBN_MOUSEDOWN and returns the mouse X position in pixels.

Other

CVBControl* GetVBX()

returns a CVBControl pointer for the current CVBTab VBX.


 VBTab Tips

Drawing the tabbed dialog box

To draw a tabbed dialog, have a look at provided samples. You must use VBLine tab style controls to draw the rectangles. The biggest problem is to use different controls for each tab. The easiest way, we think, is to build some 'normal' dialog boxes, to test them and, when everything seems to be OK, to set the control <Visible> property to FALSE (0) and to copy them into your main tabbed dialog box. Inside AppStudio, you can make a Drag 'n Drop and edit the resource script (*.RC).

Handling the tabs

Using a single line of tabs is quite more easier (and maybe more 'natural') than using multiple tabs lines dialog box. With a single tabs line, the tabs label (<Caption>) can' t change, so you just have to put a simple handler behind each tab button. With multiple tabs lines, these texts can change so you must check the <Caption> property each time a tab is clicked. You can have a look at provided samples source code to get informations to build your tab handlers.

See also...

For your first tabbed dialog box you can find some tips with the VC++ and VB samples.


 VBPicBtn

VBPicBtn is the VBX Studio pictured button.

Properties

Special properties

Methods

VC++ extensions

Tips

Required file(s): VBPICBTN.VBX

Control name: VBPicBtn

MFC Class name: CVBPicBtn ( Base class is CButton )

• You may give full bitmaps (which include the button border/focus rectangle) or small bitmaps that VBPicBtn will center on the button. You may also use the control to display On/Off push buttons or buttons which act like  radio controls.

See also...

VBAnim


 VBPicBtn Properties

Only non standard properties are described below in alphabetic order:

• AlwaysRepaint (Bool)

If this property is set to TRUE (-1), a background rectangle will be displayed each time the picture change. This is required when the picture has a different size from <PictureUp> to <PictureDown>.

• BitmapHeight (Short)

Specifies the picture height in pixels in the 'normal' display mode.

• BitmapWidth (Short)

Specifies the picture width in pixels in the 'normal' display mode.

• CornersColor (Long:COLORREF)

This is the color for the button corners when you set <ShowBorder> to TRUE (-1). If this color is the same than the <BackColor> the border will have squared corners.

• DisplayMode (Short)

Set this property to AUTO, CENTRE, NORMAL or USE BITMAP SIZE. AUTO will stretch the bitmap. With the NORMAL mode you can specify margins and bitmap size. You can' t use the stretch mode with transparent bitmaps.

• HandCursor (Bool)

If set to TRUE (-1), a hand cursor will be used at run time.

• Help

Will display this Windows HLP file.

• OnOffMode (Bool)

Set this property to TRUE (-1) if you wish this VBPicBtn can be used like an On-Off button ( like a checkbox control ). You must use this property with the special property <ButtonState>.

• PictureDisabled (Picture:Bitmap/Icon)

Specifies the picture to use when the button is disabled ( and 'up' without any focus ).

• PictureDown (Picture:Bitmap/Icon)

Specifies the picture to use when the button is 'down' (selected).

• PictureFocus (Picture:Bitmap/Icon)

Specifies the picture to use when the button has the focus (not selected).

• PictureUp (Picture:Bitmap/Icon)

Specifies the picture to use when the button is 'up'.

• RadioMode (Bool)

To use this property you will set ( in most cases ) the <OnOffMode> to TRUE (-1). When this property is TRUE, the button will acts like a radio control but you must handle it with the <SetState> special property.

• ShowBorder (Bool)

If set to TRUE (-1) a button border will be automatically displayed. If your picture already has a normal or a customised border, set this parameter to FALSE (0).

• ShowFocus (Bool)

If set to TRUE (-1) a button focus rectangle will be automatically displayed. If your picture already has a normal or a customised focus rectangle, set this parameter to FALSE (0).

• UseDblClick [2.0] (Bool)

If you want to receive double-click notification message, turn on this property.

• UseSystemColors (Bool)

If set to TRUE (-1), the button will check user's colors configuration and will use these instead of colors you have specified at design time.

• UseTranspBitmap (Bool)

If set to TRUE (-1), the button will use the light fuchsia as the 'transparent' color and won' t display it. This property is not available when you use the stretch mode (AUTO) or when you use Icons.

• vbxAbout

will display the VBX Studio 'About...' box.

• XMargin (Short)

Specifies the picture horizontal margin in pixels in the 'normal' display mode.

• YMargin (Short)

Specifies the picture vertical margin in pixels in the 'normal' display mode.


 VBPicBtn Special Properties

• ButtonState (Bool)

This read-only property is useful when you choose the <OnOffMode>. If set to TRUE (-1) the button is On (selected), otherwise the button is Off.

• SetState (Bool)

This hidden property is used when you choose the <RadioMode> and <OnOffMode>. If set to TRUE (-1) the button will be On (selected), otherwise the button will be Off. Also, you will read the <ButtonState> property and you will write this property.


 VBPicBtn Events

<none>


 VBPicBtn Methods

• Refresh

will repaint the VBPicBtn button.


 VBPicBtn VC++ Extensions

CVBPicBtn is the class you must use with VBPicBtn controls.

Properties wrappers

CBool AlwaysRepaint()

CLong BackColor()

CInt BitmapHeight()

CInt BitmapWidth()

CBool ButtonState()

CLong CornersColor()

CHsz CtlName()

CInt DisplayMode()

CBool Enabled()

CBool HandCursor()

CLong Height()

CLong Left()

CBool OnOffMode()

CPicture PictureDisabled()

CPicture PictureDown()

CPicture PictureFocus()

CPicture PictureUp()

CBool RadioMode()

CBool SetState()

CBool ShowBorder()

CBool ShowFocus()

CBool TabStop()

CInt TabIndex()

CHsz Tag()

CLong Top()

CBool UseDblClick() (2.0)

CBool UseSystemColors()

CBool UseTranspBitmap()

CBool Visible()

CLong Width()

CInt XMargin()

CInt YMargin()

Events wrappers

EventKeyCode( LPVOID lp )

used for VBN_KEYUP and VBN_KEYDOWN and returns the <key code>.

EventKeyShift( LPVOID lp )

used for VBN_KEYUP and VBN_KEYDOWN and returns the <key shift>.

EventMouseBtn( LPVOID lp )

used for VBN_MOUSEUP and VBN_MOUSEDOWN and returns the mouse button code (see MFC Tech notes for more informations).

EventMouseShift( LPVOID lp )

used for VBN_MOUSEUP and VBN_MOUSEDOWN and returns the shift key state (see MFC Tech notes for more informations).

EventMouseX( LPVOID lp )

used for VBN_MOUSEUP and VBN_MOUSEDOWN and returns the mouse X position in pixels.

EventMouseY( LPVOID lp )

used for VBN_MOUSEUP and VBN_MOUSEDOWN and returns the mouse X position in pixels.

Other

CVBControl* GetVBX()

returns a CVBControl pointer for the current CVBPicBtn VBX.


 VBPicBtn Tips

Drawing the picture...

You must give a picture for all <Picture...> properties. Also, if you use bitmaps or icons with different sizes you will probably set the <AlwaysRepaint> property to TRUE (-1).

Using the <RadioMode>...

Both VB sample and VC sample will give you some help to do a customised radio button with the VBPicBtn VBX. This can be used to choose colors or to create controls like small buttons in a toolbar. To do this, set <OnOffMode> and <RadioMode> to TRUE and then you must write your own handler for all your controls: When a VBPicBtn is clicked, check the <ButtonState>, if this one is TRUE (-1) unselect the other with the <SetState> property.

Double-Click...

If you want to receive <DblClick> notification messages, you have to set <UseDblClick> to TRUE. When you do this, all the VBTab buttons will receive double-click messages.


 VBText

VBText is the VBX Studio static ( 'label' ) control.

Properties

Methods

VC++ extensions

Required file(s): VBTEXT.VBX

Control name: VBText

MFC Class name: CVBText ( Base class is CStatic )

• VBText simply displays one or more lines of text: It handles fonts, 3d, system configuration and may resize the control depending on the size of your text.

See also...

VBFlxTxt


 VBText Properties

Only non standard properties are described below in alphabetic order:

• Autosizing (Bool)

This property is not available with VB. With VC++ AppStudio, if set to TRUE (-1) the control will be sized with the text.

• BackColor (Short:COLOR40_...)

Specify the background color.

• CaseType [2.0] (Short)

Change the case: You may use None (nothing performed), UpperCase and Lowercase.

• Frame3D (Short)

Specify the border mode for the text. This 3D border is not the same than other <Border3D> properties (this border is drawn on VBText and not outside of the control).

• Help

Will display this Windows HLP file.

• HorizAlignment (Short)

Specify the horizontal alignment for the text.

• Multiline (Bool)

If set to TRUE (-1) the text can be multiline. With this mode, the vertical alignment will be set to 'top' in all cases.

• Style3D (Short)

Specify the 3D effect for the text .

• vbxAbout

will display the VBX Studio 'About...' box.

• VerticalAlignment (Short)

Specify the vertical alignment for the text. This property is not available with multiline text controls.


 VBText Special Properties

<none>


 VBText Events

<none>


 VBText Methods

• Refresh

will repaint the text control.


 VBText VC++ Extensions

CVBText is the class you must use with VBText controls.

Properties wrappers

CInt Frame3D()

CInt Style3D()

CBool Autosizing()

CInt BackColor()

CHsz Caption()

CHsz CtlName()

CBool Enabled()

CBool FontBold()

CBool FontItalic()

CHsz FontName()

CFloat FontSize()

CBool FontUnderline()

CLong ForeColor()

CLong Height()

CInt HorizAlignment()

CLong Left()

CInt MousePointer()

CBool Multiline()

CHsz Tag()

CLong Top()

CInt VerticalAlignment()

CBool Visible()

CLong Width()

CInt CaseType() (2.0)

Events wrappers

EventKeyCode( LPVOID lp )

used for VBN_KEYUP and VBN_KEYDOWN and returns the <key code>.

EventKeyShift( LPVOID lp )

used for VBN_KEYUP and VBN_KEYDOWN and returns the <key shift>.

EventMouseBtn( LPVOID lp )

used for VBN_MOUSEUP and VBN_MOUSEDOWN and returns the mouse button code (see MFC Tech notes for more informations).

EventMouseShift( LPVOID lp )

used for VBN_MOUSEUP and VBN_MOUSEDOWN and returns the shift key state (see MFC Tech notes for more informations).

EventMouseX( LPVOID lp )

used for VBN_MOUSEUP and VBN_MOUSEDOWN and returns the mouse X position in pixels.

EventMouseY( LPVOID lp )

used for VBN_MOUSEUP and VBN_MOUSEDOWN and returns the mouse X position in pixels.

Other

CVBControl* GetVBX()

returns a CVBControl pointer for the current CVBText VBX.


 VBText Tips

<none>


 VBAnim

VBAnim is the VBX Studio animated picture control.

Properties

Methods

VC++ extensions

Tips

Required file(s): VBANIM.VBX

Control name: VBAnim

MFC Class name: CVBAnim ( Base class is CStatic )

• VBAnim displays a series of up to 5 bitmaps/icons in a rectangular window. You can use transparent bitmaps, different speeds and different spin modes.

See also...

VBPicBtn


 VBAnim Properties

Only non standard properties are described below in alphabetic order:

• AlwaysRepaint (Bool)

If this property is set to TRUE (-1), a background rectangle will be displayed each time the picture change. This is required when the picture has a different size from <PictureUp> to <PictureDown>.

• BackColor (Short:COLOR40_...)

Specify the background color.

• Border3D (Bool)

Set this to TRUE (-1) if you wish the edit control has a 3D border at run time.

• DisplayMode (Short)

Set this property to AUTO, CENTRE, NORMAL or USE BITMAP SIZE. AUTO will stretch the bitmap. With the NORMAL mode you can specify margins and bitmap size. You can' t use the stretch mode with transparent bitmaps. If you are using the 'Use bitmap size' mode, set the display mode to 'center' once the VBX computed the bitmap size.

• Help

Will display this Windows HLP file.

• Picture1 to Picture5 (Picture:Bitmap/Icon)

You can specify up to 5 different pictures for your VBAnim animated picture. The order these pictures will be displayed depends on the <ProcessMode> property. You don' t need to give a picture for all these 5 properties!

• PictureHeight (Short)

Specifies the picture height in pixels in the 'normal' display mode.

• PictureWidth (Short)

Specifies the picture width in pixels in the 'normal' display mode.

• ProcessMode (Short)

You can choose CONTINUALLY ( picture 1 to picture 5 ), RETURNS TO THE FIRST PICTURE ( picture 1 , picture 2, picture 1 ... ) and BLINK ( same as CONTINUALLY but will refresh the control each time ).

• Speed (Short)

This property specifies the VBAnim timer speed: It can be different from VBAnim1 to VBAnim2.. Normal range is 5 to 100, the higher the <Speed> is, the slower the pictures will change ( because <Speed> is the timer speed ).

• UseTransparentBitmap (Bool)

If set to TRUE (-1), the light fuchsia will be used as the 'transparent' color ( it won' t be displayed ). This mode is not available for stretched mode and Icons.

• vbxAbout

will display the VBX Studio 'About...' box.

• XMargin (Short)

Specifies the picture horizontal margin in pixels in the 'normal' display mode.

• YMargin (Short)

Specifies the picture vertical margin in pixels in the 'normal' display mode.


 VBAnim Special Properties

<none>


 VBAnim Events

<none>


 VBAnim Methods

• Refresh

will repaint the control.


 VBAnim VC++ Extensions

CVBAnim is the class you must use with VBAnim controls.

Properties wrappers

CBool Border3D()

CBool AlwaysRepaint()

CInt BackColor()

CHsz CtlName()

CInt DisplayMode()

CBool Enabled()

CLong Height()

CLong Left()

CInt MousePointer()

CPicture Picture1()

CPicture Picture2()

CPicture Picture3()

CPicture Picture4()

CPicture Picture5()

CInt PictureHeight()

CInt PictureWidth()

CInt ProcessMode()

CInt Speed()

CHsz Tag()

CLong Top()

CBool UseTransparentBitmap()

CBool Visible()

CLong Width()

CInt XMargin()

CInt YMargin()

Events wrappers

EventKeyCode( LPVOID lp )

used for VBN_KEYUP and VBN_KEYDOWN and returns the <key code>.

EventKeyShift( LPVOID lp )

used for VBN_KEYUP and VBN_KEYDOWN and returns the <key shift>.

EventMouseBtn( LPVOID lp )

used for VBN_MOUSEUP and VBN_MOUSEDOWN and returns the mouse button code (see MFC Tech notes for more informations).

EventMouseShift( LPVOID lp )

used for VBN_MOUSEUP and VBN_MOUSEDOWN and returns the shift key state (see MFC Tech notes for more informations).

EventMouseX( LPVOID lp )

used for VBN_MOUSEUP and VBN_MOUSEDOWN and returns the mouse X position in pixels.

EventMouseY( LPVOID lp )

used for VBN_MOUSEUP and VBN_MOUSEDOWN and returns the mouse X position in pixels.

Other

CVBControl* GetVBX()

returns a CVBControl pointer for the current CVBAnim VBX.


 VBAnim Tips

Small is beautiful...

Try to make your VBAnim controls as little as possible to prevent them from flashing.

Timers are limited resources...

So, if you use many timers it' s a good idea to check if some timers resources are still available. To do this you can use SDK functions (SetTimer and KillTimer) to test it, then if there are no more timers, set the VBAnim <Visible> property to FALSE (0) for instance...

Picture disappears at run-time

This may occurs if you choose the 'adjust' display mode when the VBX can' t retrieve the picture size. To avoid this problem, once you used this display mode at design time, change the display mode to 'center'.

Using transparent bitmap(s)...

If you set <UseTransparentBitmap> to TRUE (-1), the light fuchsia color will be used as the transparent color, so this color won' t be displayed. This is not available when you use the stretch mode ('auto') and this has no effect with icons.


 VB3D

VB3D is the VBX Studio automatic 3D border control.

Properties

Methods

VC++ extensions

Tips

Required file(s): VB3D.VBX

Control name: VB3D

MFC Class name: CVB3D ( Base class is CStatic )

• VB3D adds a 3d rectangle to any control: You may choose the control by class, name or ID. This VBX is useful when used with CTL3D.


 VB3D Properties

Only non standard properties are described below in alphabetic order:

• Help

Will display this Windows HLP file.

• Mode3D (Short)

This is the main VB3D property to select the 3D border mode: You can disable all VB3D 3D borders, use the built-in classes ( for VBX Studio VBXs ) and/or controls IDs ( associated Windows numbers for all controls ), Hwnd ( Windows control handle you can use with most of VB controls ) or classes (The name used by Windows to register controls style ). Classes are like 'Thunder...' for VBX and, for 'normal' controls you need the SDK to know them ( 'Edit', 'ListBox'... ). For instance, the VBListBox controls class is 'ThunderVBListBox', its Hwnd is VBListBox.Hwnd and its ID can be something like IDC_MYLIST when used with AppStudio.

• UseSystemColors (Bool)

If set to TRUE, all VB3D 3D borders will use the user's color configuration choice instead of colors you define at design time. These colors are in the Button section.

• vbxAbout

will display the VBX Studio 'About...' box.


 VB3D Special Properties

<none>

VB3D use standard methods instead of special properties.


 VB3D Events

<none>


 VB3D Methods

• AddItem (<Item string>[,<index>])

You will use this method to add a class name, a control ID or a control HWND for the 3D process. Also, this depends on the chosen <Mode3D>. Obviously you must translate all value into a string, for instance:

VB3D1.AddItem Str$(UnknownControl1.Hwnd), 0

You can put up to 30 different values ( <index> 0 to 29 ) and you must give a value to the <index> parameter. If you choose 'Auto and class names' or 'class names' <Mode3D>, you will add class names like this:

VB3D1.AddItem "ThunderEdit", 0

If you choose 'Auto and IDs' or 'IDs' <Mode3D>, you will a control ID like this:

VB3D1.AddItem Str$( GetDlgCtrlID( VBEdit1.Hwnd) ), 0

And, if you choose 'Auto and HWNDs' or 'HWNDs' <Mode3D>, you will a control HWND like this:

VB3D1.AddItem Str$( VBEdit1.Hwnd ), 0

Of course, when you choose the 'automatic' <Mode3D> you don' t need to use this method if you use standard VBX Studio controls.

• RemoveItem ([<index>])

Will remove the specify 0 based <index> value or all values if you don' t give any <index>.

• Refresh

will repaint all 3D borders.


 VB3D VC++ Extensions

CVB3D is the class you must use with VB3D controls.

Properties wrappers

CHsz CtlName()

CLong Height()

CLong Left()

CInt Mode3D()

CHsz Tag()

CLong Top()

CBool UseSystemColors()

CLong Width()

Events wrappers

<None>

Other

CVBControl* GetVBX()

returns a CVBControl pointer for the current CVB3D VBX.


 VB3D Tips

Using VB3D...

It' s a bad idea to use the VB3D VBX and to set the other VBXs <Border3D> to TRUE. You should use VB3D when your dialog box may be resized. When you change VB3D datas or <Mode3D> at run time, you must refresh the main window (form). Also, 0 for IDs or Hwnd and "" for classes names disable the data. You can give up to 30 characters to the <AddItem> method when used with class names.

Using VB3D with VC++...

With VC++ you must manually call the VB3D <Refresh> method in your OnPaint ( WM_PAINT message handler ). If you don' t do this, VB3D won' t draw any 3D border. This is not required when used with VB.

3D borders not visible...

If the borders disappear, you simply will call the <Refresh> method insiside your form <Load> and <Paint> handlers.

System colors...

VB3D can use system colors instead of static colors. These colors are the Button HighLight and Button Shadow colors.


 VBLine

VBLine is the VBX Studio line control.

Properties

Methods

VC++ extensions

Tips

Required file(s): VBLINE.VBX

Control name: VBLine

MFC Class name: CVBLine ( Base class is CStatic )

• VBLine can be used alone to enhance a dialog box or, in conjunction with VBTab in order to draw a complete tabbed dialog box.

See also...

VBTab


 VBLine Properties

Only non standard properties are described below in alphabetic order:

• BackColor (Short:COLOR40_...)

Specifies the background color. If this property is 0 (Use system colors), the color of the buttons will be used as the backround color.

• Help

Will display this Windows HLP file.

• LineColor (Short:COLOR40_...)

Specifies the foreground (line) color.

• LineStyle (Short)

Basically there are 2 kinds of lines: The first one is the 'normal' style, you can use <LineThickness> and <Style3D> and other properties. You can choose the line position too. The second one is the 'VBTab' mode ( choice 4 to 7 ), you will use it to draw your tabbed dialog boxes. With this second kind of lines, other properties are disable and you will use special lines for your VBTabs controls. You can have a look at provided samples to get tips for these controls.

• LineThickness (Short)

Specifies the line thickness in pixels.

• Style3D (Short)

Specifies the line 3D border style.

• vbxAbout

will display the VBX Studio 'About...' box.


 VBLine Special Properties

<none>


 VBLine Events

<none>


 VBLine Methods

• Refresh

will repaint the line.


 VBLine VC++ Extensions

CVBLine is the class you must use with VBLine controls.

Properties wrappers

CInt BackColor()

CHsz CtlName()

CLong Height()

CLong Left()

CInt LineColor()

CInt LineStyle()

CInt LineThickness()

CInt MousePointer()

CInt Style3D()

CHsz Tag()

CLong Top()

CBool Visible()

CLong Width()

Events wrappers

EventMouseBtn( LPVOID lp )

used for VBN_MOUSEUP and VBN_MOUSEDOWN and returns the mouse button code (see MFC Tech notes for more informations).

EventMouseShift( LPVOID lp )

used for VBN_MOUSEUP and VBN_MOUSEDOWN and returns the shift key state (see MFC Tech notes for more informations).

EventMouseX( LPVOID lp )

used for VBN_MOUSEUP and VBN_MOUSEDOWN and returns the mouse X position in pixels.

EventMouseY( LPVOID lp )

used for VBN_MOUSEUP and VBN_MOUSEDOWN and returns the mouse X position in pixels.

Other

CVBControl* GetVBX()

returns a CVBControl pointer for the current CVBLine VBX.


 VBLine Tips

Using VBLine with VBTab

Basically when you use VBLine with the VBTab mode ( a tabbed dialog box ), you will draw at least 3 VBLine controls: The first one will be the left line, the second one, a rectangle and the last one a right line. Of course you must choose the 'VBTab' mode.

Drawing a rectangle for VBTab

The other way to use the VBLine control with a tabbed dialog box is to draw an unique VBTab rectangle: It' s quite more easy. This method has a disadvantage: this rectangle will hide the <Border3D> of the VBX Studio VBXs, so if you choose to use the 3D borders you can' t use it.


 VBDDrop

VBDDrop is the VBX Studio Winfile drag 'n drop control.

Properties

Special properties

Events

Methods

VC++ extensions

Tips

Required file(s): VBDDROP.VBX

Control name: VBDDrop

MFC Class name: CVBDDrop ( Base class is CStatic )

• VBDDrop sends notification messages when the user drops a file on your form.


 VBDDrop Properties

Only non standard properties are described below in alphabetic order:

• Help

Will display this Windows HLP file.

• UseSystemColors [2.0] (Bool)

Set this property to TRUE if you wish to use the default button' s color (use with CTL3D). If this property is FALSE, VBDDrop will use its own back color to fill the dialog box at run time.

• vbxAbout

will display the VBX Studio 'About...' box.


 VBDDrop Special Properties

• DroppedFiles (Short)

This run-time read-only property specify the number of dropped files. This property is the same as the <FileDropped> 'Files' parameter.

• Filename (String,Arrays)

This run-time read-only property specify the full name (with drive and directories) of specified file. To retrieve the name of the first dropped file you will read 'VBDDrop1.Filename(0)'.


 VBDDrop Events

FileDropped (VBN_FILEDROPPED)

Parameters: Files as integer

The VBDDrop control send out this notification message each time a file or a group of files is dropped. The <Files> parameter is the number of files currently dropped ( this is the same as <DroppedFiles> property ).


 VBDDrop Methods

• Refresh

will repaint the VBDDrop area, so you will call this method when your dialog box is resized.


 VBDDrop VC++ Extensions

CVBDDrop is the class you must use with VBDDrop controls.

Properties wrappers

CLong BackColor()

CHsz CtlName()

CInt DroppedFiles()

CHsz Filename()

CLong Height()

CLong Left()

CLong Top()

CBool UseSystemColors()

CBool Visible()

CLong Width()

Events wrappers

EventDroppedFiles( LPVOID lp )

used for the VBN_FILESDROPPED event and returns <Files>.

Other

CVBControl* GetVBX()

returns a CVBControl pointer for the current CVBDDrop VBX.


 VBDDrop Tips

How to use the VBDDrop VBX?

As other controls, click on the VBDDrop palette button and 'put' it on your form. Now, the only one property you maybe will change is the <UseSystemColors> property. When this property is set to TRUE, VBDDrop will fill the entire dialog box with the default button' s color. Now, at run time, use the <FilesDropped> event and, set the <Visible> property to FALSE if you wish to disable the VBX action.

Window painting

VBDDrop handles Winfile drag'n drop for the dialog client zone (and not for its other controls). So, when you use a resizable dialog box, you must call the VBDDrop <Refresh> method to compute its new client zone. Some controls, specially controls without any background brush, aren' t compatible with VBDDrop because this VBX will hide these.


 VBNote

VBNote is the VBX Studio design time note control.

Required file(s): VBNOTE.VBX

Control name: VBNote

MFC Class name: CVBNote ( Base class is CStatic )

• There is no special informations for this design-time only control: Just click with the mouse and type your text. If you use this control with your dialog boxes, you must ( like all VBX ) distribute the VBX with your applications. This control is specially useful if you develop Windows applications in a team..

See also...

VBText


 Tips

General Tips

• Using VBXSTD20.HLP [2.0]

With this version this help file should be in the same directory of your VBX Studio VBXs if you want to use the <Help> property (which display the context help for the VBXs). So, you can remove VBXSTD12.HLP from your Windows/System directory if any.

• Where should I put the VBXs? [2.0]

It' s actually depends on your development system: The best solution is to create a (common) subdirectory, 'SVBX20' for instance. Then copy all the VBX Studio VBXs to this directory and do the same with this HLP file. Then run your development system and install these VBXs (if possible). When you will build a new application using VBX Studio you will call these versions at design time. Now, locate the VBX your project needs and put a copy in this project directory. There are 2 advantages to do like this:

- You can use this HLP file without the need to copy in all your apps. directories.

- You can easily locate the VBXs your program needs since you have to put the VBXs you need in the new directory. This is specially useful when you have to redistribute the VBXs.

• VBXs Version information [2.0]

All VBX Studio 2.0 VBXs are stamped "2.0.0.1". Previous versions don' t have this VERSION informations.

• Using Windows 95 [2.0]

All the controls works fine under Windows 95 (beta) at design-time and run-time. The controls won' t have the same look under Win95: They use a small 3D border instead of a 2 points border under Windows 3.x. This will be true for Windows NT > 3.51 too.

• Samples

VBX Studio comes with 2 samples: The source code of VBXDEMO written with Visual C++ 1.52/MFC 2.52 and, the VB sample which may help you to use the complicated controls. If you don' t use these languages, you can edit the Visual Basic forms (*.FRM) with a text editor. Since they are scripts, you will see the properties initial values and the events handlers.

• Upgrading VBX Studio

If you have a previous registered version of VBX Studio, you will have to re-open the forms to make the changes. You may have some warnings because some properties were changed.

• Renammed Visual C++ methods

We corrected some troubles with the Visual C++ VBXs wrappers (CVB...). The compiler displayed an error when a standard CWnd method is also used with different arguments in the CVB.. classes. For instance this was the case with SetSel2() and SetRedraw2(). This kind of methods were renammed to SetSel2() and SetRedraw2().

• Floatting point numbers

Some VBXs accept floatting point numbers called Real (like <rValue>): This type doesn' t use more than 7 digits. When you need a better precision you have to retrieve a string (like <sValue>) then perform the conversion to a double number by your own. Visual C++ users may use the String Studio 3.0 library to do this.

• Style properties [2.0]

In most cases VBX Studio 2.0 lets you change the controls styles at run-time if necessary. When you change a style property, the VBX is completly re-built, that' s why you may have to re-initialize its properties. At design time the control isn' t changed so that you need to reload your forms/dialog boxes to see the differences.

• VX..VBX versions instead of VB...VBX versions

Some 4GL don' t correctly re-initialize the VBX Studio VBXs once you called VBXREG2 and gave the passwords. That' s why we distribute a special version to let the registered users load the VBX Studio VBXs with no nag-screens. You will find these versions in SVBX20.ZIP (download it where you found VBXSTD20.ZIP). These version aren' t loadable at design-time if you aren' t a registered user. Also, because we found a problem with some systems when they call a dialog box property, the <Help>, <vbxAbout> and some other dialog properties aren' t available.

• 32bits versions?

Unfortunatly, at present, we can' t use VBX with 32bits applications: We plan to provide OCXs versions when we will enough knowledge in this kind of controls.

• See also...

How to install the VBXs...

VC++ Issues

Tips to use the controls

• VBList

• VBTabList

• VBFList

• VBTabFList

• VBCombo

• VBFCombo

• VBEdit

• VBMaskt

• VBSpin

• VBTab

• VBGauge

• VBText

• VBFlxTxt

• VBPicBtn

• VBBitmap

• VBAnim

• VB3D

• VBDDrop

• VBFInfo

• VBIni

• VBLine


How to install the VBX Studio VBXs...
 How to install VBX Studio VBXs...

VBX Installation (Design time)

If you are using Visual Basic, choose "Add Files..." and select the VBXs you wish to install. If you prefer VC++ AppStudio, use "Install controls..", double click on the VBXs and close the dialog box with the "Ok" button ( do not use the "Close" button ). If you are using AppStudio and you' d like to use the VBX Studio DDX routines, see DDX.TXT text file and, if you want to use classes wrappers, put VBXSTD20.H and ASVBDO12.H in your INCLUDE path and put '#include <VBXSTD20.H>' at the end of your STDAFX.H precompiled header.

VBX Installation (Run time)

To distribute your new application you have to give the VBX Studio VBXs you are using with this program. You must not give any other file and as you know there is no royalties. The best place to install them is probably your application directory to avoid share conflicts or installation troubles. However with this method, the user may lost some free KBytes. Your application may preload or test the VBXs thanks to the SDK functions <LoadLibrary>/<FreeLibrary> or MFC <LoadVBX>/<UnloadVBX>. To build your set-up program you may use Setup Studio 2.5.


VBFInfo
 VBFInfo [2.0]

VBFInfo hidden control gives informations about files/drives.

Properties

VC++ extensions

Tips

Required file(s): VBFINFO.VBX

Control name: VBFInfo

MFC Class name: CVBFInfo ( Base class is CStatic )

• VBFInfo performs 3 kinds of operations: It retrieves files/drives informations; It may change these parameters, and, the VBX is useful to retrieve VERSION informations from Windows modules.


 VBFInfo Properties

Only non standard properties are described below in alphabetic order:

• Archive (Bool)

TRUE if the file has the ARCHIVE attribute. Read/Write property.

• Date (Long)

This is a magic number which is useful to compare files dates. Read/Write property.

• DateDay (Short)

Is the day of the last modification for <FileName>. From 1 to 31. Read/Write property.

• DateMonth (Short)

Is the month of the last modification for <FileName>. From 1 to 12. Read/Write property.

• DateYear (Short)

Is the year of the last modification for <FileName>. From 1980 to 2099. Read/Write property.

• DriveType (Short)

Is the kind of the drive for <FileName> (this property uses the first character). This value is a VBFINFO_DRIVE_... constant.

• DriveValid (Bool)

Returns TRUE if the drive is ready (in case of a removable drive). To use this property, make sure <FileName> is a root directory name ( like "A:\" ).

• Exist (Bool)

Returns TRUE if the file <FileName> already exist. This property is read-only.

• FileName (String)

Give the file name you want to study to this property. This name should include the full file path. Also, use '\' instead of '/'. As usual you may use '?' to display a browse dialog box.

• Help

Will display this Windows HLP file.

• Hidden (Bool)

TRUE if the file has the HIDDEN attribute. Read/Write property.

• Normal (Bool)

TRUE if the file has the NORMAL attribute. Read/Write property.

• ReadOnly (Bool)

TRUE if the file has the READONLY attribute. Read/Write property.

• Size (Long)

Returns the file size in bytes.

• System (Bool)

TRUE if the file has the SYSTEM attribute. Read/Write property.

• szVersion (String)

Returns the file version number using 4 integers like "1.0.0.1" if available.

• Time (Long)

This is a magic number which is useful to compare files times. Read/Write property.

• TimeHour (Short)

Is the hour of the last modification for <FileName>. From 0 to 23. Read/Write property.

• TimeMin (Short)

Is the minute of the last modification for <FileName>. From 0 to 59. Read/Write property.

• TimeSec (Short)

Is the second of the last modification for <FileName>. From 1 to 59. Read/Write property.

• vbxAbout

will display the VBX Studio 'About...' box.

• Version (Float)

Is the version number for <FileName> if available.

• VersionBeta (Bool)

Set to TRUE if the file is a beta version.

• VersionComment (String)

May contain a comment for <FileName>.

• VersionCompany (String)

This string is the company name for <FileName>.

• VersionCopyright (String)

This string should contain copyright notice for <FileName>.

• VersionDebug (Bool)

Set to TRUE if the file contains debuging informations.

• VersionFileDescription (String)

This string is the file description for <FileName>.

• VersionFileName (String)

This string should contain the original file name of <FileName>.

• VersionInternalName (String)

This string is the internal name of <FileName>.

• VersionLanguageCode (Long)

This value contains the language code used by <FileName>, see SDK documentation for details.

• VersionLanguageName (String)

This string contains the language name used by <FileName>, in most case this is "U.K. English".

• VersionModuleType (Short)

This is one of the VBFINFO_VERSION_.. constant.

• VersionPatched (Bool)

Set to TRUE if the file <FileName> is a patched build.

• VersionProductName (String)

This is the name of the product.

• VersionTrademarks (String)

This is trademarks informations to use <FileName>.


 VBFInfo Special Properties

<none>


 VBFInfo Events

<none>


 VBFInfo Methods

<none>


 VBFInfo VC++ Extensions

CVBDDrop is the class you must use with VBDDrop controls.

Properties wrappers

CBool Archive()

CLong Date()

CInt DateDay()

CInt DateMonth()

CInt DateYear()

CInt DriveType()

CBool DriveValid()

CBool Exist()

CHsz FileName()

CLong Height()

CLong Help()

CBool Hidden()

CLong Left()

CBool Normal()

CBool ReadOnly()

CLong Size()

CBool System()

CHsz szVersion()

CHsz Tag()

CLong Time()

CInt TimeHour()

CInt TimeMin()

CInt TimeSec()

CLong Top()

CFloat Version()

CBool VersionBeta()

CHsz VersionComment()

CHsz VersionCompany()

CHsz VersionCopyright()

CBool VersionDebug()

CHsz VersionFileDescription()

CHsz VersionFileName()

CHsz VersionInternalName()

CLong VersionLanguageCode()

CHsz VersionLanguageName()

CInt VersionModuleType()

CBool VersionPatched()

CHsz VersionProductName()

CHsz VersionTrademarks()

CLong Width()

Events wrappers

None.

Other

CVBControl* GetVBX()

returns a CVBControl pointer for the current CVBFInfo VBX.


 VBFInfo Tips

How to make sure a property has been correctly set?

VBFInfo doesn' t use events nor <ActionResult> property. To make sure a property is set (like <DateDay> or <ReadOnly>), you have to read the property once you changed that property. Then make sure the values are indentical.

<Version...> properties don' t work.

You can retrieve version informations for files which contain version informations. This is the case for Windows EXE, DLL and drivers. You can' retrieve version informations for LIB and ICO files for instance. Also, programmers can let some field blanks ( like <VersionComment> ) even if they give the necessary informations to the other components.

<DriveValid> don' t work.

To use this property you have to give a root directory name to <FileName>. The name should contain 3 characters: The first one is the drive letter, the second one is ':' and the last one is the path separator '\'.


VBBitmap
 VBBitmap [2.0]

VBBitmap displays bitmaps and icons.

Properties

Methods

VC++ extensions

Tips

Required file(s): VBBITMAP.VBX

Control name: VBBitmap

MFC Class name: CVBBitmap ( Base class is CStatic )

• VBBitmap is a small control to display a single picture with convenient options like the 'transparent', 'adjust' or 'border' modes

See also...

VBAnim


 VBBitmap Properties

Only non standard properties are described below in alphabetic order:

• BackColor (Short: COLOR40_...)

Choose a COLOR40_... as the background color. Choose 0 if you want to use the default button color.

• Border3D (Bool)

Set this property to TRUE if you wish a 3d border is displayed around the bitmap.

• DisplayMode (Short)

Choose 0 if you want to stretch the bitmap, choose 1 if you want to change the margins, 2 to center the bitmap or 3 to fit the image size. At design time if the control doesn' t display the bitmap as it should do, reload the form or hide and reshow the form. If you are using the 'Use bitmap size' mode, set the display mode to 'center' once the VBX computed the bitmap size.

• Help

Will display this Windows HLP file.

• Picture (Picture: Bitmap or Icon)

Choose the picture you want to use. Notice that you can' t use the STRETCH mode with icons.

• PictureHeight (Short)

When you are using the NORMAL display mode you can change the height of the picture. This value is in pixels.

• PictureWidth (Short)

When you are using the NORMAL display mode you can change the width of the picture. This value is in pixels.

• UseTransparentBitmap (Bool)

Turn on this property if you are using the light fushia color as the the invisible color. In this case the <BackColor> will replace this color. This has no effect with icons.

• XMargin (Short)

Under the NORMAL display mode you can adjust the bitmap left position (in pixels) inside the control.

• YMargin (Short)

Under the NORMAL display mode you can adjust the bitmap top position (in pixels) inside the control.

• vbxAbout

will display the VBX Studio 'About...' box.


 VBBitmap Special Properties

<none>


 VBBitmap Events

<none>


 VBBitmap Methods

• Refresh

will repaint the control.


 VBBitmap VC++ Extensions

CVBBitmap is the class you must use with VBBitmap controls.

Properties wrappers

CInt BackColor()

CBool Border3D()

CInt DisplayMode()

CBool Enabled()

CLong Height()

CLong Left()

CInt MousePointer()

CPicture Picture()

CInt PictureHeight()

CInt PictureWidth()

CHsz Tag()

CLong Top()

CBool UseTransparentBitmap()

CLong Width()

CInt XMargin()

CInt YMargin()

Events wrappers

EventKeyCode( LPVOID lp )

used for VBN_KEYUP and VBN_KEYDOWN and returns the <key code>.

EventKeyShift( LPVOID lp )

used for VBN_KEYUP and VBN_KEYDOWN and returns the <key shift>.

EventMouseBtn( LPVOID lp )

used for VBN_MOUSEUP and VBN_MOUSEDOWN and returns the mouse button code (see MFC Tech notes for more informations).

EventMouseShift( LPVOID lp )

used for VBN_MOUSEUP and VBN_MOUSEDOWN and returns the shift key state (see MFC Tech notes for more informations).

EventMouseX( LPVOID lp )

used for VBN_MOUSEUP and VBN_MOUSEDOWN and returns the mouse X position in pixels.

EventMouseY( LPVOID lp )

used for VBN_MOUSEUP and VBN_MOUSEDOWN and returns the mouse X position in pixels.

Other

CVBControl* GetVBX()

returns a CVBControl pointer for the current CVBBitmap VBX.


 VBBitmap Tips

Using transparent bitmap(s)...

If you set <UseTransparentBitmap> to TRUE (-1), the light fuchsia color will be used as the transparent color, so this color won' t be displayed. This is not available when you use the stretch mode ('auto') and this has no effect with icons.

Troubles at design-time

When you change the bitmap or the display mode at design time, the picture may not correctly reflect the change. You may have to reload your form or to re-show this one.

Picture disappears at run-time

This may occurs if you choose the 'adjust' display mode when the VBX can' t retrieve the picture size. To avoid this problem, once you used this display mode at design time, change the display mode to 'center'.

<XMargin>, <PictureWidth> have no effect..

This properties are available when you choose the NORMAL display mode. In other cases, VBBitmap automatically changes these values.


VBFlxTxt
 VBFlxTxt [2.0]

VBFlxTxt is a static (label) control with options.

Properties

Special properties

Methods

VC++ extensions

Required file(s): VBFLXTXT.VBX

Control name: VBFlxTxt

MFC Class name: CVBFlxTxt ( Base class is CStatic )

• VBFlxTxt is a small control to display a single line of text with automatic resizing mode or tabkeys for instance

See also...

VBText


 VBFlxTxt Properties

Only non standard properties are described below in alphabetic order:

• BackColor (Short: COLOR40_...)

Choose a COLOR40_... as the background color. Choose 0 if you want to use the default button color (useful with CTL3D or Win95).

• CaseType (Short)

Choose the case mode. Set this one to none to display the actual text.

• Help

Will display this Windows HLP file.

• Frame3D (Short)

You may choose to display a 3d border thanks to this property.

• HorizAlignment (Short)

Set the horizontal alignment (left, right or center).

• ResizeMode (Short)

When this property isn' t 0, the text will be truncated depending on this mode. The resize mode will add '...' to the string if truncated while the resize as dir. mode will try to keep the most important directory/file.

• Style3D (Short)

You may choose a 3D effect for the text thanks to this property.

• VerticalAlignment (Short)

Set the vertical alignment of the text.

• vbxAbout

will display the VBX Studio 'About...' box.


 VBFlxTxt Special Properties

• TabList (Short,Arrays)

This is an array of 20 tab positions. You must set the tab position before you set the text, if not tabkeys will use the default 64 points value. Values are in dialog box coordinates, they must be sorted. If the first <TabList> value is 0, the default tabstop settings will be used. If you give just one tablist, this one will be used for all the tab character. This property is write-only.


 VBFlxTxt Events

<none>


 VBFlxTxt Methods

• Refresh

will repaint the control.


 VBFlxTxt VC++ Extensions

CVBFlxTxt is the class you must use with VBFlxTxt controls.

Properties wrappers

CInt BackColor()

CHsz Caption()

CInt CaseType()

CBool Enabled()

CLong ForeColor()

CBool FontBold()

CBool FontItalic()

CHsz FontName()

CFloat FontSize()

CBool FontUnderline()

CInt Frame3D()

CLong Height()

CInt HorizAlignment()

CLong Left()

CInt MousePointer()

CInt ResizeMode()

CInt Style3D()

void TabList(long Value, int index = 0)

CHsz Tag()

CLong Top()

CInt VerticalAlignment()

CBool Visible()

CLong Width()

Events wrappers

EventKeyCode( LPVOID lp )

used for VBN_KEYUP and VBN_KEYDOWN and returns the <key code>.

EventKeyShift( LPVOID lp )

used for VBN_KEYUP and VBN_KEYDOWN and returns the <key shift>.

EventMouseBtn( LPVOID lp )

used for VBN_MOUSEUP and VBN_MOUSEDOWN and returns the mouse button code (see MFC Tech notes for more informations).

EventMouseShift( LPVOID lp )

used for VBN_MOUSEUP and VBN_MOUSEDOWN and returns the shift key state (see MFC Tech notes for more informations).

EventMouseX( LPVOID lp )

used for VBN_MOUSEUP and VBN_MOUSEDOWN and returns the mouse X position in pixels.

EventMouseY( LPVOID lp )

used for VBN_MOUSEUP and VBN_MOUSEDOWN and returns the mouse X position in pixels.

Other

CVBControl* GetVBX()

returns a CVBControl pointer for the current CVBFlxTxt VBX.


 VBFlxTxt Tips

<none>


VBIni
 VBIni [2.0] (FreeWare)

VBIni lets you use INI files. (This VBX is freeware: You can use/distribute it as you want).

Properties

Special properties

VC++ extensions

Tips

Required file(s): VBINI.VBX

Control name: VBIni

MFC Class name: CVBIni ( Base class is CVBControl )

• Thanks to VBIni you can read/write string and numerical values from the common or private INI file without the need to handle strings buffers nor to call the SDK functions.

See also...

VBFInfo


 VBIni Properties

Only non standard properties are described below in alphabetic order:

• FileName (String)

Gives the fully qualified file name of the INI file you want to use. At design time a dialog box let you choose this once. At run time if you give '?' as the file name, the browse box will appear. This property must be filled. You may also give a keyword instead of a full file name to access the Windows INI file, they are(case sensitive): WININI$ (for WIN.INI), SYSINI$ (for SYSTEM.INI), CONTROLINI$ (for CONTROL.INI), PROGMANINI$ (for PROGMAN.INI) and WINFILEINI$ (for WINFILE.INI)..

• FileExist (Bool)

If the INI file you give to <FileName> already exist, this read-only property is set to TRUE.

• Help

Will display this Windows HLP file.

• Key (String)

Choose the Key you want to use. Don' t give the = character. This parameter is required.

• KeyExist (Bool)

If <FileName> INI file, <Section> section and <Key> key already exist, this read-only property is set to TRUE.

• Section (String)

Give the section name in which you will read/write the <Key> value. This name should not include '[' nor ']'.

• vbxAbout

will display the VBX Studio 'About...' box.


 VBIni Special Properties

• bValue (Bool)

Use this read/write property to change the key boolean value. If <bValue> isn' t 0 or a blank string, this property will be set to TRUE. Use this property once <FileName>, <Section> and <Key> are filled.

• iValue (Short)

Use this read/write property to change the key integer value. Use this property once <FileName>, <Section> and <Key> are filled.

• lValue (Long)

Use this read/write property to change the key long value.Use this property once <FileName>, <Section> and <Key> are filled.

• rValue (Float)

Use this read/write property to change the key floating point value. Use this property once <FileName>, <Section> and <Key> are filled. This value will be incorrect if there are more than 7 digits. If you need a greater precision you may use <sValue> then use the String Studio library which uses double values instead of float values.

• sValue (String)

Use this read/write property to change the key value as a string (i.e. what you can read when you edit the INI file). Use this property once <FileName>, <Section> and <Key> are filled.


 VBIni VC++ Extensions

CVBIni is the class you must use with VBIni controls.

Properties wrappers

CBool bValue()

CBool FileExist()

CHsz FileName()

CLong Height()

CInt iValue()

CHsz Key()

CBool KeyExist()

CLong Left()

CLong lValue()

CFloat rValue()

CHsz Section()

CHsz sValue()

CHsz Tag()

CLong Top()

CLong Width()

Events wrappers

<None>

Other

<None>

Remark: since CVBIni is derived from CVBControl there is no <GetVBX> method.


 VBIni Tips

Using INI files...

Thanks to VBIni you can access INI files which aren' t in the current directory or inside the Windows directory. There are 3 values you must set to use INI files: The INI fillename, the section (group) name and the key. This appears like this when you edit the INI file:

[Section]

Key = <Value>

Rounding troubles

If you wish to use floating point values greater than 7 digits you should not use the <rValue> property since this one use a simple float value. Instead you may use the string property and perform the conversion inside your program thanks to a double variable (with String Studio 3.0 for instance).

Freeware?

VBIni is freeware: You don' t have to register VBX Studio to use it and to distribute your applications made with this VBX. However, since VBX Studio 2.0 is shareware, if you want to include one or more other VBX Studio VBXs to your application, we will ask you to register (see registration).


VBMask
 VBMask [2.0]

VBMask is the VBX Studio pictured Edit control with masks.

Properties

Special properties

Events

Methods

VC++ extensions

Tips

Required file(s): VBMASK.VBX

Control name: VBMask

MFC Class name: CVBMask ( Base class is CEdit )

• VBMask has some enhanced formatting options: It automatically checks and changes the string depending on the user' s configuration on GetFocus/LostFocus events. The control computes formulas and lets you read/write numbers directly. Also, it may be useful when you need to retrieve a product code thanks to the 'StringMask' pattern for instance.

See also...

VBEdit

VBSpin


 VBMask Properties

Only non standard properties are described below in alphabetic order:

• Alignment (Bool)

Choose the text alignment. You should not change it at run-time because you may have a stack overflow.

• AllowBlankField (Bool)

If TRUE (-1) <IsValid> property will return TRUE if there is no text in the edit control.

• BeepIfError (Bool)

Specify if a little beep is generated in case the user press an invalid key.

• Border3D (Bool)

Set this to TRUE (-1) if you wish the edit control has a 3D border at run time.

• Case (Short)

You must choose a case between NO CASE, UPPERCASE and LOWERCASE. Depending on this choice, all user input will or won' t be converted in the specified case style. You should not change it at run-time because you may have a stack overflow.

• Help

Will display this Windows HLP file.

• IncrementValue (Short)

Sets the increment value.

• MaskType (Short)

Choose one from <None>, <Numeric> to use the numerical masks or <String> to use the <StringMask> pattern.

• MaxLength (Short)

Specify the maximum length for the user input.

• MaxRange (Float)

Sets the maxrange for numerical input. This value must be positive. To disable this property, give the same value to <MinRange>.

• MinRange (Float)

Sets the minrange for numerical input. This value can be negative. To disable this property, give the same value to <MaxRange>.

• NegativeMask (String)

Give the mask you want to use for negative numbers. See <PositiveMask> for details. If you don' t give a value, the <PositiveMask> will be used with negative numbers (in this case, put '-' at the begin of the mask).

• NoHideSelection (Bool)

If this property is set to TRUE (-1) the edit selection will be kept when the edit control losts the focus.  You should not change it at run-time because you may have a stack overflow.

• OEMConvert (Bool)

If this property is set to TRUE (-1) the edit control will convert OEM characters. You should not change it at run-time because you may have a stack overflow.

• PasswordChars (Bool)

If this property is set to TRUE (-1) the edit control will display '*' instead of the user input. You should not change it at run-time because you may have a stack overflow.

• PositiveMask (String)

This is the pattern you will use with positive numbers under the 'numeric' <MaskType>. This pattern may use the following items:

0: A digit or 0

#: A digit or nothing

,: The thousands separator or nothing

.: The decimal point

-: This sign if the number is less than 0

+: This sign if the number is positive, - if not

( ... ): Number in brackets if negative.

• ReadOnly (Bool)

If this property is set to TRUE (-1) the edit text won' t be changed nor deleted.

• SelectText (Bool)

If this property is set to TRUE (-1), when the control gets the focus it will select all the text and scrolls to the end of this value.

• StringMask (String)

This is the pattern you will use with strings under the 'string' <MaskType>. This pattern may use the following items:

[<itemFirst>-<itemLast>]: The set of allowed characters.

+: Current settings will apply to the next char.

*: Current settings will apply to the next chars.

.: Allow any characters

You should not put restrictive patterns at the end of the mask ( ".[0-9]") but only at the beginning of the mask (like "[0-9].").

• Text (String)

This is the control text. You shouldn' t use this property to read/write the control value. This property is for internal use only.

• UseSystemColors (Bool)

If this property is set to TRUE (-1) the edit control will check and use user's configuration colors instead of colors you' ve specified at design time.

• vbxAbout

will display the VBX Studio 'About...' box.

• ZeroMask (String)

Give the pattern you want to use with 0 values. See <PositiveMask> for a list of values. If you give a space character, VBMask won' t display 0 if the current value is 0. If you don' t give a pattern to this property, <PositiveMask> will be used.


 VBMask Special Properties

• Decrement (Bool)

When you set this property to TRUE (-1), the edit control current value will be decremented using the mask. If the edit value is not valid, it will be changed into a valid text. When you use this property with the VBSpin VBX you must reset the VBSpin <Value> property to 0.

• FormattedResult (String)

Use this read-only property to retrieve the VBMask text as it appears when the control doesn' t have the focus.

• Increment (Bool)

When you set this property to TRUE (-1), the edit control current value will be incremented using the mask. If the edit value is not valid, it will be changed into a valid text. When you use this property with the VBSpin VBX you must reset the VBSpin <Value> property to 0.

• IsValid (Bool)

This property is set to TRUE if the user input is correct, this depends on the current mask.

• iValue (Short)

Read/Write the current integer text value.

• lValue (Long)

Read/Write the current long integer text value.

• rValue (Float)

Read/Write the current floating point text value. (If this number contains more than 7 digits this number may be incorrect).

• SetSel (Bool)

When you set this property to TRUE (-1), the edit control text will be selected. In most cases, you' ll have to use a SetFocus afterwise.

• SysRefresh (Short)

Call this property when WIN.INI has changed to reload the decimal point/thousands separator. It has no effect when <UseSystemCfg> is set to FALSE.

• UnformattedValue (String)

You will use this read/write property to change the VBMask caption for instance. If you would like to use double values you should use this property instead of <rValue> and then, perform the conversion. If the user give a forumla, this once will be computed. This property isn' t available if <MaskType> isn' t 'numeric'.


 VBMask Events

Change (VBN_CHANGE)

Parameters: <None>

This event is fired when the user change the VBEdit text (see SDK EN_CHANGE ).

Update (VBN_UPDATE)

Parameters: <None>

This event is fired when the user change the VBEdit text (see SDK EN_UPDATE ).

MaxText (VBN_MAXTEXT)

Parameters: <None>

This event is fired when the user attempt to put too much datas in the VBMask control (see SDK EN_MAXTEXT for details).

• Notice that KillFocus and SetFocus (VBN_KILLFOCUS, VBN_SETFOCUS) were removed. We use the standard focus events instead.


 VBMask Methods

• Refresh

will repaint the edit control.


 VBMask VC++ Extensions

CVBMask is the class you must use with VBMask controls.

Properties wrappers

CInt Alignment()

CBool AllowBlankField()

CLong BackColor()

CBool BeepIfError()

CBool Border3D()

CInt BorderStyle()

CInt Case()

CBool Decrement()

CBool FontBold()

CBool FontItalic()

CHsz FontName()

CFloat FontSize()

CBool FontUnderline()

CLong ForeColor()

CHsz FormattedResult()

CLong Height()

CBool Increment()

CInt IncrementValue()

CBool IsValid()

CInt iValue()

CLong lValue()

CLong Left()

CInt MaskType()

CInt MaxLength()

CFloat MaxRange()

CFloat MinRange()

CHsz NegativeMask()

CBool NoHideSelection()

CBool OEMConvert()

CBool PasswordChars()

CHsz PositiveMask()

CBool ReadOnly()

CFloat rValue()

CBool SelectText()

CBool SetSel2()

CHsz StringMask()

CInt SysRefresh()

CBool TabStop()

CHsz Tag()

CHsz Text()

CLong Top()

CHsz UnformattedValue()

CBool UseSystemColors()

CBool Visible()

CLong Width()

CHsz ZeroMask()

Events wrappers

<None>

Other

CVBControl* GetVBX()

returns a CVBControl pointer for the current CVBMask VBX.


 VBMask Tips

VBEdit or VBMask?

If you don' t want to use numbers or specific strings you' ll prefer VBEdit. VBEdit doesn' t use GetFocus/LostFocus events while VBMask uses these notification messages to compute and change the text. Also, if you want to give an initial value which isn' t a number, you will use VBEdit.

Style properties

VBMask uses style properties like Alignment. You can change this properties at run time but it' s not recommended because you can get a stack overflow. However, you may use it if you change these properties during the dialog box load operation. At design time, you may have to reload the form to reflect changes.

Using VBMask with VBSpin...

VBMask, like VBEdit, can be used with VBSpin and it manages (itself) the VBSpin control: You just have to put a VBMask handler like 'VBMask.Increment = True' behind the VBSpin scrolling notification messages and, then reset, the VBSpin <Value> property to 0. When you use this method you must disable the VBSpin range checking. However, since VBMask always changes the string, you can' t use the VBSpin automatic mode like you do with VBEdit, i.e. you have to call VBMask.Increment/Decrement in your VBSpin SrollUp/ScrollDn handlers VBMask doesn' t handle floating point numbers increment.

Using the <IsValid> property...

This property will be set to TRUE (-1) if the user give a correct value. If you set <AllowBlankField>, this property will be TRUE if there is no text. VBEdit uses a double checking process: The first one occurs when the user press a key and the second one will be performed when you have a look at this property. Also, it' s a good idea to read this property each time you receive a VBEdit <Update> notification message in order to enable or disable some dialog box buttons for instance..

Using String Studio...

Visual C++ users may use String Studio 3.0 to handle numbers larger than 7 digits. To do this read/write the VBMask <UnformattedValue>, then use the CStr <FromDouble>/<ToDouble> method to access the big number. To do this you have to build an EXE file, not a DLL.