Export (0) Print
Expand All

ITextFont::GetProtected method

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.

ValueMeaning
tomTrueCharacters are protected.
tomFalseCharacters are not protected.
tomUndefinedThe 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 codeDescription
E_INVALIDARG

Invalid argument.

CO_E_RELEASED

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

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Tom.h

DLL

Msftedit.dll

See also

Reference
ITextFont
SetProtected
CreateTextServices
EN_PROTECTED
Conceptual
Text Object Model
Other Resources
CreateWindow

 

 

Community Additions

ADD
Show:
© 2014 Microsoft