Partager via


IXpsOMPath::SetStrokeBrushLookup method

Sets the lookup key name of a shared brush to be used as the stroke brush. The shared brush is stored in a resource dictionary.

Syntax

HRESULT SetStrokeBrushLookup(
  [in] LPCWSTR lookup
);

Parameters

  • lookup [in]
    The lookup key name of a shared brush to be used as the stroke brush for the path.

Return value

The method returns an HRESULT. Possible values include, but are not limited to, those in the table that follows. For information about XPS document API return values that are not listed in this table, see XPS Document Errors.

Return code Description
S_OK

The method succeeded.

XPS_E_INVALID_RESOURCE_KEY

According to the XML Paper Specification, the value of lookup is not a valid lookup key string.

XPS_E_INVALID_LOOKUP_TYPE

The lookup key name in lookup references an object that is not a brush.

XPS_E_LOOKUP_NOT_FOUND

No object could be found with a key name that matched the value passed in lookup.

 

Remarks

After you call SetStrokeBrushLookup, the local stroke brush is released and GetStrokeBrushLocal returns a NULL pointer in the brush parameter. The table that follows explains the relationship between the local and lookup values of this property.

Most recent method called Object that is returned in brush by GetStrokeBrush Object that is returned in brush by GetStrokeBrushLocal String that is returned in lookup by GetStrokeBrushLookup

SetStrokeBrushLocal

The local brush that is set by SetStrokeBrushLocal.

The local brush that is set by SetStrokeBrushLocal.

NULL pointer.

SetStrokeBrushLookup(this method)

The shared brush retrieved, with a lookup key that matches the key that is set by SetStrokeBrushLookup, from the resource directory.

NULL pointer.

The lookup key that is set by SetStrokeBrushLookup.

Neither SetStrokeBrushLocal nor SetStrokeBrushLookup has been called yet.

NULL pointer.

NULL pointer.

NULL pointer.

 

Requirements

Minimum supported client

Windows 7, Windows Vista with SP2 and Platform Update for Windows Vista [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2008 R2, Windows Server 2008 with SP2 and Platform Update for Windows Server 2008 [desktop apps | Windows Store apps]

Header

Xpsobjectmodel.h

IDL

XpsObjectModel.idl

See also

IXpsOMPath

XPS Document Errors

XML Paper Specification