Every ZeeGrid cell has a FONT attribute that can be set to 1 of a possible 128 fonts that are defined in the font palette.
The font palette is unique to each ZeeGrid control and holds the font handles (HFONT) of the palette entries. Fonts 0..19 are predefined by ZeeGrid and are always available for use, but cannot changed. Palette fonts 20..127 can be defined by the programmer and set using the ZGM_SETFONT message function.
The ZeeGrid message functions to set cell fonts, use font parameters that are indexes into the ZeeGrid font palette. This allows every cell to have a font from a selection of 128 possible fonts and only require 1 byte of memory for the storage of the cell font attribute.
The predefined fonts are as follows:
font[0] - small variable pitch normal
font[1] - small variable pitch bold
font[2] - medium variable pitch normal (default)
font[3] - medium variable pitch bold
font[4] - large variable pitch normal
font[5] - large variable pitch bold
font[6] - small fixed pitch normal
font[7] - small fixed pitch bold
font[8] - medium fixed pitch normal
font[9] - medium fixed pitch bold
font[10] - large fixed pitch normal
font[11] - large fixed pitch bold
font[12] - undefined; reserved for future use
font[13] - undefined; reserved for future use
font[14] - undefined; reserved for future use
font[15] - undefined; reserved for future use
font[16] - undefined; reserved for future use
font[17] - undefined; reserved for future use
font[18] - undefined; reserved for future use
font[19] - undefined; reserved for future use
If a font is set with the ZGM_SETFONT message function, it is the application's responsibility to keep the handle to the font valid throughout the life of the ZeeGrid.The predefined fonts are available for use in your application by using the ZGM_GETFONT message function. If your application uses a ZeeGrid font in this manner, you must keep the ZeeGrid control in existance for the entire time your application depends on the availability of the font.
ZeeGrid messages that relate to the font attribute: