IUIX_Inst::CreateFontFromHandle Method
From PDF XChange PDF SDK
(5 intermediate revisions by one other user not shown) | |||
Line 2: | Line 2: | ||
[[Category:Editor]] | [[Category:Editor]] | ||
{{#customTitle:IUIX_Inst::CreateFontFromHandle Method}} | {{#customTitle:IUIX_Inst::CreateFontFromHandle Method}} | ||
− | {{#parentPage:PXV:IUIX_Inst#Methods|CreateFontFromHandle | + | {{#parentPage:PXV:IUIX_Inst#Methods|CreateFontFromHandle|method}} |
− | + | ||
Creates new object of [[PXV:IUIX_Font|IUIX_Font]] interface from other font <code>HANDLE_T</code> value. | Creates new object of [[PXV:IUIX_Font|IUIX_Font]] interface from other font <code>HANDLE_T</code> value. | ||
Line 12: | Line 12: | ||
[in, defaultvalue(0)] LONG nFlags, | [in, defaultvalue(0)] LONG nFlags, | ||
[in, defaultvalue(0)] LONG nFlagsMask, | [in, defaultvalue(0)] LONG nFlagsMask, | ||
− | [out, retval] IUIX_Font** | + | [out, retval] IUIX_Font** pFont);</pre> |
== Parameters == | == Parameters == | ||
Line 23: | Line 23: | ||
;nFlagsMask | ;nFlagsMask | ||
:[in, defaultvalue(0)] specifies style mask with flags from [[PXV:UIX_CreateFontFlags|UIX_CreateFontFlags]] enumeration. This parameter removes specified styles from current font and applies only those flags of '''nFlags''' parameter to the new font that were set in '''nFlagsMask'''. For instance, if previous font style was <code>UIX_CreateFont_Underline</code>, and new font style in '''nFlags''' parameter is set to <code>UIX_CreateFont_Bold</code> with '''nStyleMask''' parameter set to <code>(UIX_CreateFont_Bold | UIX_CreateFont_Underline)</code>, then a given font will be first set to ''non-underlined'', and then to ''bold''. If '''nStyleMask''' is set to <code>UIX_ComboItemStyle_Bold</code>, then font style will be changed to ''bold'', but still remain ''underlined''. | :[in, defaultvalue(0)] specifies style mask with flags from [[PXV:UIX_CreateFontFlags|UIX_CreateFontFlags]] enumeration. This parameter removes specified styles from current font and applies only those flags of '''nFlags''' parameter to the new font that were set in '''nFlagsMask'''. For instance, if previous font style was <code>UIX_CreateFont_Underline</code>, and new font style in '''nFlags''' parameter is set to <code>UIX_CreateFont_Bold</code> with '''nStyleMask''' parameter set to <code>(UIX_CreateFont_Bold | UIX_CreateFont_Underline)</code>, then a given font will be first set to ''non-underlined'', and then to ''bold''. If '''nStyleMask''' is set to <code>UIX_ComboItemStyle_Bold</code>, then font style will be changed to ''bold'', but still remain ''underlined''. | ||
− | ; | + | ;pFont |
:[out, retval] return object of [[PXV:IUIX_Font|IUIX_Font]] interface. | :[out, retval] return object of [[PXV:IUIX_Font|IUIX_Font]] interface. | ||
== Return Value == | == Return Value == | ||
− | Returns S_OK if operation was successful or error code | + | Returns S_OK if the operation was successful, or will return an error code if it fails. |
== See Also == | == See Also == | ||
− | [[PXV:IUIX_Inst|IUIX_Inst]] | + | [[PXV:IUIX_Inst|IUIX_Inst]] |
Latest revision as of 16:30, 15 June 2015
Creates new object of IUIX_Font interface from other font HANDLE_T
value.
Syntax
HRESULT CreateFontFromHandle([in] HANDLE_T hFont, [in, defaultvalue(0.0)] double nNewFontSize, [in, defaultvalue(0)] LONG nFlags, [in, defaultvalue(0)] LONG nFlagsMask, [out, retval] IUIX_Font** pFont);
Parameters
- hFont
- [in]
HANDLE_T
value of already existing font object. - nNewFontSize
- [in, defaultvalue(0.0)] specifies new size of a given font.
- nFlags
- [in, defaultvalue(0)] specifies font style with flags from UIX_CreateFontFlags enumeration.
- nFlagsMask
- [in, defaultvalue(0)] specifies style mask with flags from UIX_CreateFontFlags enumeration. This parameter removes specified styles from current font and applies only those flags of nFlags parameter to the new font that were set in nFlagsMask. For instance, if previous font style was
UIX_CreateFont_Underline
, and new font style in nFlags parameter is set toUIX_CreateFont_Bold
with nStyleMask parameter set to(UIX_CreateFont_Bold | UIX_CreateFont_Underline)
, then a given font will be first set to non-underlined, and then to bold. If nStyleMask is set toUIX_ComboItemStyle_Bold
, then font style will be changed to bold, but still remain underlined. - pFont
- [out, retval] return object of IUIX_Font interface.
Return Value
Returns S_OK if the operation was successful, or will return an error code if it fails.