/ | Information | Feedback |
Properties |
Prior | Up | Next |
These properties are designed to be set from calls in your applications code. None can be set using the standard property page.
This section is separated into standard properties, item properties, Server Properties (header properties) and other properties.
This control's non-standard properties are:
The standard properties supported by this control are Appearance, BackColor, BorderStyle, ForeColor and hWnd . Developers should note the use of the American spelling of these names.
This section discusses the various item properties, which allow an application detailed control on the appearance of a chemical drawn in the control.
All these properties require an item number, which can be one of the following:
These item numbers are currently defined as follows:
#define ITEM_ISOTOPE 1
#define ITEM_SYMBOL 2
#define ITEM_CHARGE 3
#define ITEM_MULTIPLIER 4
#define ITEM_STRUCTURE 5
#define ITEM_COMPOUND 6
#define ITEM_BOND 7
#define ITEM_CARBON 8
#define ITEM_HYDROGEN 9
#define ITEM_CHIRAL 10
#define ITEM_PLUS 11
#define ITEM_ARROW 12
#define ITEM_SUPERATOM 13
#define ITEM_BRACKET 14
#define ITEM_RTF 15
#define ITEM_LINE 16
The ItemColour property specifies the colour used to draw the item.
OLE_COLOUR ItemColour (short nItem);
See item properties for details of the possible value of nItem.
See item properties, return to Properties, the Developer's Reference, or the top of this document.
The ItemDrawn property determines whether an item is drawn or not.
short Drawn (short nItem);
If this property is non-zero, the item is drawn. The ItemPosition property can also be used to prevent an item appearing.
The Chiral text is only drawn when both this property is set appropriately, and the Chiral property is set.
See the Chiral and ItemPosition properties, item properties, return to Properties, the Developer's Reference, or the top of this document.
The ItemFont property specifies the name of the font used to display a text item.
BSTR ItemFont (short nItem)
See item properties for details of the possible value of nItem. Text items include ITEM_CARBON ITEM_CHARGE, ITEM_CHIRAL, ITEM_COMPOUND, ITEM_HYDROGEN. ITEM_MULTIPLIER, ITEM_ISOTOPE, ITEM_STRUCTURE, ITEM_ARROW, ITEM_SYMBOL, ITEM_PLUS and ITEM_SUPERATOM. What happens when the font is not available on the user's system is undefined.
See item properties, return to Properties, the Developer's Reference, or the top of this document.
The ItemSize property determines the relative size of an item.
double ItemSize (short nItem);
See item properties for details of the possible value of nItem. The relationship used to determine the size depends on the item, as follows:
See item properties, return to Properties, the Developer's Reference, or the top of this document.
The ItemOffset property determines the relative offset of certain items.
double ItemOffset (short nItem);
See item properties for details of the possible value of nItem. The relationship used to determine the size depends on the item, as follows:
See item properties, return to Properties, the Developer's Reference, or the top of this document.
The ItemPosition property determines the relative position of certain items.
short ItemPosition (short nItem);
See item properties for details of the possible value of nItem. The relationship used to determine the size depends on the item.
For the text items ITEM_CHIRAL, ITEM_COMPOUND and ITEM_STRUCTURE, nItem has the following possible values:
For the items ITEM_SYMBOL, ITEM_CARBON and ITEM_HYDROGEN, nItem has the following possible values:
For ITEM_SUPERATOM, it controls the relative distance from the superatom to any containing brackets. The default is 8.
See the ItemDrawn property, item properties, return to Properties, the Developer's Reference, or the top of this document.
This section discuss properties which only have meaning when control is connected to the structure server. Certain properties, such as creation and modification information, are ignored when returned to the server. These properties accompany the .MOL file in a header when sent to and from the server.
The CompoundNumber property identifies the structure's compound number. This is the number that is the subject of the SEARCH_KEY SearchKey search.
BSTR CompoundNumber;
Return to Properties, the Developer's Reference, or the top of this document.
The CreateDate property identifies the date on which the structure was created.
BSTR CreateDate;
See the CreateUser and ModUser properties, return to Properties, the Developer's Reference, or the top of this document.
The CreateUser property identifies the user who created the structure.
BSTR CreateUser;
See the CreateDate and ModUser properties, return to Properties, the Developer's Reference, or the top of this document.
For a description of the DataType property, see the server documentation.
short DataTyp;
Return to Properties, the Developer's Reference, or the top of this document.
The ExperimentName property specifies a short piece of text, which may be the subject of a search on the server.
BSTR ExperimentName;
See the SearchKey property, return to Properties, the Developer's Reference, or the top of this document.
The MF property contains the chemical's molecular formula.
BSTR MF;
The MF can be calculated using the CalculateMF method.
See the Weight property, the CalculateMF method, return to Properties, the Developer's Reference, or the top of this document.
The ModUser property identifies the last user to modify the structure. The property includes both the user, and the date of modification.
BSTR ModUser;
See the CreateUser and CreateDate properties, return to Properties, the Developer's Reference, or the top of this document.
The StructureComment property specifies a piece of text which is associated with the control. It is not drawn.
BSTR StructureComment;
See the StructureId and TestId properties, return to Properties, the Developer's Reference, or the top of this document.
The StructureId property specifies a short piece of text which may be drawn in the control.
BSTR StructureId;
The property has been renamed from StructureText.
See the ItemColour, ItemFont, ItemOffset, ItemPosition, ItemSize, StructureComment, and TestId properties, return to Properties, the Developer's Reference, or the top of this document.
The StructureType property identifies the structure type (!) - see the structure server documentation for more information.
short StructureType;
Return to Properties, the Developer's Reference, or the top of this document.
The TestId property specifies a number which is associated with the control. It is not drawn.
long TestId;
See the CompoundNumber, ItemColour, ItemFont, ItemOffset, ItemPosition, ItemSize, StructureComment, and StructureId properties, return to Properties, the Developer's Reference, or the top of this document.
The VersionString property returns version information about the control, the application, and the structure server used to submit the current chemical to the server (before version 1.0.9 of the control, it returned the current versions of the server, control, and application).
BSTR VersionString (short nObject);
The purpose of the version method is to enable the application developer to check the correct versions of software are running when the application starts, and to enable the database administrator to identify items of data which have been added to the database from software subsequently found to be buggy, to assist maintenance of database integrity.
The application can only set the version number for itself.
nObject can be any one of the following:
These identifies are currently defined as follows:
#define VERSION_APP 1
#define VERSION_ACTIVEX 2
#define VERSION_SERVER 4
#define VERSION_MOLFILE 5
Return to Properties, Developer's Reference, or the top of this document.
The Weight property contains the chemical's molecular weight.
double Weight;
The Weight can be calculated using the CalculateWeight method.
See the MF property, the CalculateWeight method, return to Properties, the Developer's Reference, or the top of this document.
This section discusses the remaining properties found in the control.
The ArrowThickness property specifies the thickness, in pixels, of the reaction arrow, when drawn;
short ArrowThickness
If the thickness is zero, the arrow is drawn as thinly as possible.
Return to Properties, the Developer's Reference, or the top of this document.
The BondThickness property specifies the thickness, in pixels, of the bonds when drawn;
short BondThickness
If the thickness is zero, the bond is drawn as thin as possible.
See the DoubleDistance property, return to Properties, the Developer's Reference, or the top of this document.
The BracketThickness property specifies the thickness, in pixels, of brackets, normally used to group chemicals together;
short BracketThickness
If the thickness is zero, the bracket is drawn as thinly as possible.
Return to Properties, the Developer's Reference, or the top of this document.
The Chiral property specifies whether the chemical currently on display is marked as chiral.
BOOL Chiral;
Some appropriate text can be displayed according to ChiralText property.
Note that this property only affects the way the chemical is displayed in the control; it does not affect the chiral flag in the underlying .MOL file. As a result, changing this property will not affect the information sent to the server.
See the ChiralText property, return to Properties, the Developer's Reference, or the top of this document.
The ChiralText specifies the text which may be displayed when a chemical on display is chiral.
BSTR ChiralText;
The default value of this property is "Chiral". It will only be displayed when the Chiral property is set, and the item properties are given appropriate values.
See the Chiral, ItemColour, ItemDrawn, ItemFont, ItemOffset, ItemPosition, ItemSize properties, return to Properties, the Developer's Reference, or the top of this document.
The DDEService property specifies the name of the service offered by the control using Dynamic Data Exchange;
BSTR DDEService;
If you are unfamiliar with Dynamic Data Exchange, then you should familiarise yourself with the concepts behind it before you use the control's DDE methods and properties. This control offers a DDE service and DDE client functionality, but only supports conversations and commands.
This property must be set before you use any of the controls DDE methods, even if you only want to act as a DDE client.
See DDE Methods, the DDE Timeout property, return to Properties, the Developer's Reference, or the top of this document.
The DDETimeout property specifies the maximum time, in milliseconds, to wait for a DDE Server to respond when using the DDE client methods.
long DDETimeout;
If this number is zero, then there is no time limit.
See DDE Methods, the DDE Service property, return to Properties, the Developer's Reference, or the top of this document.
The DoubleDistance property specifies the relative space between lines in double and triple bonds.
double DoubleDistance;
This value is calculated relative to the average bond length of bonds drawn in the compound. Thus a double distance of 1.0 implies the lines are separated by the average bond length, which is probably a little excessive. The default distance is 0.15.
See the BondThickness property, return to Properties, the Developer's Reference, or the top of this document.
The ExecutableWindowTitle property identifies the name of the primary window of an executable.
BSTR ExecutableWindowTitle;
Please see ExecutableLaunch method for details of this property.
See the ExecutableLaunch method, Executable methods, return to Properties, the Developer's Reference, or the top of this document.
The FireError property indicated how errors are to be processed.
bool FireError;
If FireError is set to false (the default), errors are returned with function parameters. If it is set to TRUE, errors are raised as exceptions, as preferred by OLE. Note that certain system errors are always raised as exceptions.
Return to Properties, the Developer's Reference, or the top of this document.
The Margin property specifies the relative quantity of white space between the chemical being drawn and the edge of the control.
double Margin(boolean bHorizontal);
bHorizontal is true for the horizontal margin, and false for the vertical.
The Margin value is a percentage, with 100 representing nothing but white space, and zero representing no margin. You should always ensure you have some margin when drawing a chemical, because coördinates of atoms are specify the centre of the atom. The default value of both margins is 80.0.
Return to Properties, the Developer's Reference, or the top of this document.
The MinimumFontSize specifies the minimum size of the symbol font, when drawn.
short MinimumFontSize;
The unit is pixels. A value of zero means no minimum.
Return to Properties, the Developer's Reference, or the top of this document.
The MolFile property contains the content of the currently displayed .MOL file.
void MolFile(BSTR lpszMolFile);
If you set this property, you will change the chemical being displayed. You can load a file directly by using the LoadMolFile method.
See the LoadMolFile and SaveMolFile methods, return to Properties, the Developer's Reference, or the top of this document.
The ReadOnly property can be used to prevent changes being made to the control.
bool ReadOnly;
When the control is set to ReadOnly, then neither Cut, LoadMolFile LoadTGFFile LoadRxnFile nor Paste work. You can still Clear the content of the control.
See the ExecutableLaunch method, Executable methods, return to Properties, the Developer's Reference, or the top of this document.
The RxnFile property contains the content of the currently displayed .RXN file.
void RxnFile(BSTR lpszRxnFile);
If you set this property, you will change the chemical being displayed. You can load a file directly by using the LoadRxnFile method.
See the LoadRxnFile and SaveRxnFile methods, return to Properties, the Developer's Reference, or the top of this document.
The Zoom indicates by how much the displayed has been zoomed in.
double Zoom;
If Zoom is set to 1.0, no zooming is occuring. Numbers larger than 1.0 show the display is zoomed in. Numbers less than 1.0 are invalid.
Return to Properties, the Developer's Reference, or the top of this document.
Version 2.1.15, 1st May 2001
cyberspace services limited has ceased trading
this archive is hosted by
arts & ego
© 1978-2024 dylan harris