[Table of Contents] [Previous Chapter] [Next Chapter] [Object Central Home]

The V C++ GUI Reference Manual - Vers. 1.20 - 6/30/98

Copyright © 1998, Bruce E. Wampler


Appendix F
The Latest Version: What's New?

This Appendix will cover the latest version of V. The current release is Version 1.18.

F.1  New Features

New Features for C_List

The number of rows displayed can now be controlled by using the CommandObject element size. By specifying the attribute CA_Size and providing a value for the size element, you can specify how many rows to show. If you don't specify a size, 8 rows will be displayed. Vwill support between 1 and 32 rows. Note the that the size element is the last one of a CommandObject, and can left out of a declaration, which results in the compiler generating a zero value, giving the default 8 rows.

The width in pixels (approximately) of the list can be controlled by specifying the CA_ListWidth attribute and providing a value to the retVal parameter, which is otherwise unused for a list object. This implementation isn't perfect - you may have to play with the interaction between the width you specify, and the font used in a list control.

Tool Tips

The major new feature of V1.18 is support for Tool Tips. You can easily add Tool Tips by adding the appropriate text to your existing CommandObject definitions of tool bars and dialogs. The new definition of a CommandObject follows:

typedef struct CommandObject
  {
    CmdType cmdType;    // what kind of item is this
    ItemVal cmdId;      // unique id for the item
    ItemVal retVal;     // initial value of object
    char* title;        // string
    void* itemList;     // used when cmd needs a list
    CmdAttribute attrs; // list of attributes
    int Sensitive;      // if item is sensitive or not
    ItemVal cFrame;     // Frame used for an item
    ItemVal cRightOf;   // Item placed left of this id
    ItemVal cBelow;     // Item placed below this one
    int size;           // Used for size information
    char* tip;          // ToolTip string
  } CommandObject;
char* tip

The tip parameter is used to specify an optional ToolTip string for use with a command object. If you provide a string here, that string will be automatically displayed after the user holds the mouse over that control. The exact delay before the tip is shown, and the format of the tip box is somewhat platform dependent, and all platforms might not support tool tips. (Currently, only OS/2 does not support tips.) Note that if you use a tip, you must be sure to include a value (usually 0) for the size parameter!

void vBeep()

This utility routine will sound an audible beep.

void vGetcmdIdIndex(ItemVal cmdId, CommandObject *cmdObj)

Sometimes when you work with a CommandObject array to define a dialog, you need to access the elements of a particular item in the array. This is especially true for manipulating lists. This routine will return the index into a CommandObject array of an entry with the supplied ItemVal cmdId.


[Table of Contents] [Previous Chapter] [Next Chapter] [Object Central Home]