ITextFont::GetProtected method (tom.h)
Gets whether characters are protected against attempts to modify them.
Syntax
HRESULT GetProtected(
long *pValue
);
Parameters
pValue
Type: long*
A tomBool value that can be one of the following.
Value | Meaning |
---|---|
tomTrue | Characters are protected. |
tomFalse | Characters are not protected. |
tomUndefined | The Protected property is undefined. |
Return value
Type: HRESULT
If the method succeeds, it returns S_OK. If the method fails, it returns one of the following COM error codes. For more information about COM error codes, see Error Handling in COM.
Return code | Description |
---|---|
|
Invalid argument. |
|
The font object is attached to a range that has been deleted. |
Remarks
In general, Text Object Model (TOM) methods that attempt to change the formatting or content of a range fail with E_ACCESSDENIED if any part of that range is protected, or if the document is read only. To make a change in protected text, the TOM client should attempt to turn off the protection of the text to be modified. The owner of the document may permit this to happen. For example in rich edit controls, attempts to change protected text result in an EN_PROTECTED notification code to the creator of the document, who then can refuse or grant permission for the change. The creator is the client that created a windowed rich edit control through the CreateWindow function or the ITextHost object that called the CreateTextServices function to create a windowless rich edit control.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Vista [desktop apps only] |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Target Platform | Windows |
Header | tom.h |
DLL | Msftedit.dll |
See also
Conceptual
Other Resources
Reference