Share via


IXpsOMGlyphs::SetFillBrushLookup 方法 (xpsobjectmodel.h)

設定共用填滿筆刷的查閱索引鍵名稱。

語法

HRESULT SetFillBrushLookup(
  [in] LPCWSTR key
);

參數

[in] key

字串變數,其中包含儲存在資源字典中之填滿筆刷的索引鍵名稱,並將作為共用填滿筆刷使用。 NULL 指標會清除任何先前指派的索引鍵字串。

傳回值

方法會傳回 HRESULT。 可能的值包括下列數據表中的值,但不限於這些值。 如需此表格中未列出的 XPS 檔 API 傳回值的相關信息,請參閱 XPS 檔錯誤

傳回碼 描述
S_OK
此方法已成功。
XPS_E_INVALID_RESOURCE_KEY
根據 XML 紙張規格查閱 的值不是有效的查閱索引鍵字串。
XPS_E_INVALID_LOOKUP_TYPE
索引鍵中的查閱索引鍵名稱會參考不是幾何的物件。
XPS_E_LOOKUP_NOT_FOUND
找不到索引鍵名稱符合傳入 索引鍵之值的物件。

備註

呼叫 SetFillBrushLookup 之後,就會釋放本機填滿筆刷,GetFillBrushLocal 會在 fillBrush 參數中傳回 NULL 指標。 下表說明此屬性之本機和查閱值之間的關聯性。

最近呼叫的方法 由 GetFillBrush 傳回 fillBrush 的物件 由 GetFillBrushLocal 傳回 fillBrush 的物件 GetFillBrushLookup索引鍵中傳回的字串

SetFillBrushLocal

SetFillBrushLocal 所設定的本機筆刷。 SetFillBrushLocal 所設定的本機筆刷。 NULL 指標。
SetFillBrushLookup (此方法) 從資源目錄擷取的共用筆刷,具有符合 SetFillBrushLookup 所設定索引鍵的查閱索引鍵。 NULL 指標。 SetFillBrushLookup 所設定的查閱索引鍵。
尚未呼叫 SetFillBrushLocalSetFillBrushLookup NULL 指標。 NULL 指標。 NULL 指標。

規格需求

需求
最低支援的用戶端 適用於 Windows Vista 的 Windows 7、Windows Vista SP2 和平臺更新 [傳統型應用程式 |UWP 應用程式]
最低支援的伺服器 Windows Server 2008 R2、Windows Server 2008 SP2 和 Platform Update for Windows Server 2008 [傳統型應用程式 |UWP 應用程式]
目標平台 Windows
標頭 xpsobjectmodel.h

另請參閱

IXpsOMGlyphs

XML Paper Specification

XPS 檔案錯誤