The AddBookmarkDefinition2 method adds a new bookmark definition in the current loaded profile, having the characteristics specified by the method parameters.
HRESULT AddBookmarkDefinition2(
[ in ] SHORT p_nHeading,
[ in ] BOOL p_bEnabled,
[ in ] BOOL p_bDetFont,
[ in, string ] BSTR p_wsDetFont,
[ in ] LONG p_nDetFontType,
[ in ] BOOL p_bDetStyle,
[ in ] BOOL p_bDetBold,
[ in ] BOOL p_bDetItalic,
[ in ] BOOL p_bDetSize,
[ in ] INT p_nDetSizeVal,
[ in ] FLOAT p_nDetSizePt,
[ in ] BOOL p_bDetColor,
[ in ] LONG p_nDetColor,
[ in ] BOOL p_bDispAsBold,
[ in ] BOOL p_bDispAsItalic,
[ in ] LONG p_nDispColor,
[ out ] SHORT* p_nDefinition
);
Parameters:
p_nHeading
[in]heading index where to add the definition (1-9)
p_bEnabled
[in]definition is enabled
p_bDetFont
[in] detect font
p_wsDetFont
[in] font name
p_nDetFontType
[in] font type: true type, type1, open type
p_bDetStyle
[in] detect font style
p_bDetBold
[in] bold font
p_bDetItalic
[in] italic font
p_bDetSize
[in] detect font size
p_nDetSizeVal
[in] font size
p_nDetSizePt
[in] font size rounding
p_bDetColor
[in] detect font color
p_nDetColor
[in] font color (RGB value)
p_bDispAsBold
[in] display bookmark font bold
p_bDispAsItalic
[in] display bookmark font italic
p_nDispColor
[in] display bookmark font color
p_nDefinition
[out] definition index, if added. If the definition was not added, -1
Return values:
S_OK
on success or COM error codeNV_NOT_INITIALIZED
- Initialize was not calledNV_UNKNOWN_PROFILE
- no profile loadedRemarks:
There can be defined maximum 9 bookmark definitions.