Equivalent to choosing the Cells command from the Format menu
[C++]
static int FontProperties(
const char* font,
const char* font_style = 0,
unsigned short size = 0,
short int strikethrough = -1,
short int superscript = -1,
short int subscript = -1,
short int underline = -1,
short int color = -1,
short int normal = -1,
short int background = 0,
short int start_char = 0,
short int char_count = -1
);
Font is the name of the font as it appears in the Font tab. An empty string or a null pointer is treated as a missing argument.
Font_style is the name of the font style as it appears in the Font tab. An empty string or a null pointer is treated as a missing argument.
Size is the font size, in points. A value of 0 is treated as a missing argument.
Strikethrough corresponds to the Strikethrough check box. A value of -1 is treated as a missing argument, A value greater than 0 is treated as TRUE, and 0 is treated as FALSE.
Superscript corresponds to the Superscript check box. A value of -1 is treated as a missing argument, A value greater than 0 is treated as TRUE, and 0 is treated as FALSE.
Subscript corresponds to the Subscript check box. A value of -1 is treated as a missing argument, A value greater than 0 is treated as TRUE, and 0 is treated as FALSE.
Underline corresponds to the Underline Drop-down box. A value of -1 is treated as a missing argument, A value greater than or equal to 0 are treated normally.
Color is a number from 0 to 56 corresponding to the colors in the Font tab; 0 corresponds to automatic color. A value of -1 is treated as a missing argument, A value greater than or equal to 0 are treated normally.
Normal corresponds to the Normal Font check box. A value of -1 is treated as a missing argument, A value greater than 0 is treated as TRUE, and 0 is treated as FALSE.
Background is a number from 1 to 3 specifying which type of background to apply to text in a chart. A value of 0 is treated as a missing argument, Values greater than 0 are treated normally.
Start_char specifies the first character to be formatted. A value of 0 is treated as a missing argument, Values greater than 0 are treated normally.
Char_count specifies how many characters to format. A value of 0 is treated as a missing argument, Values greater than 0 are treated normally.
Zero if the function has been called successfully; non-zero
if the function could not be called.
See Error codes for a list
of return values.
See the Microsoft Excel on-line Help for full details about
this function.
Header: xlfuncs.h