共用方式為


IDWriteFactory::CreateNumberSubstitution 方法 (dwrite.h)

使用地區設定名稱、替代方法,以及是否忽略使用者覆寫 (改用指定文化特性的 NLS 預設值,來建立數位替代物件) 。

語法

HRESULT CreateNumberSubstitution(
  [in]  DWRITE_NUMBER_SUBSTITUTION_METHOD substitutionMethod,
  [in]  WCHAR const                       *localeName,
  [in]  BOOL                              ignoreUserOverride,
  [out] IDWriteNumberSubstitution         **numberSubstitution
);

參數

[in] substitutionMethod

類型: DWRITE_NUMBER_SUBSTITUTION_METHOD

值,指定如何在數位和相關標點符號上套用數位替代。

[in] localeName

類型: const WCHAR*

要用於 numberSubstitution 物件的地區設定名稱。

[in] ignoreUserOverride

類型: BOOL

布爾值旗標,指出是否忽略使用者覆寫。

[out] numberSubstitution

類型: IDWriteNumberSubstitution**

當這個方法傳回時,會包含這個方法所建立之數位替代物件的指標位址。

傳回值

類型: HRESULT

如果此方法成功,則會傳回 S_OK。 否則,它會傳回 HRESULT 錯誤碼。

規格需求

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

另請參閱

IDWriteFactory