指定した範囲内の段落のスタイル ハンドルを取得します。
構文
HRESULT GetStyle(
long *pValue
);
パラメーター
pValue
型: long*
段落スタイル ハンドル。 詳細については、「解説」を参照してください。
戻り値
型: HRESULT
ITextPara::GetStyle が成功すると、S_OKが返されます。 メソッドが失敗した場合は、次のいずれかの COM エラー コードを返します。 COM エラー コードの詳細については、「COM でのエラー処理」を参照してください。
| リターン コード | 説明 |
|---|---|
|
意味 |
|
引数が無効です。 |
|
段落書式オブジェクトは、削除された範囲にアタッチされます。 |
注釈
テキスト オブジェクト モデル (TOM) バージョン 1.0 には、ユーザー定義スタイル ハンドルの意味を指定する方法はありません。 これらは、TOM を実装するテキスト システムの他の機能に依存します。 負のスタイル ハンドルは、組み込みの文字スタイルと段落スタイル用に予約されています。 現在定義されている値を次の表に示します。 次のスタイルの説明については、Microsoft Wordのドキュメントを参照してください。
| スタイル | 値 | スタイル | 値 |
|---|---|---|---|
| StyleNormal | –1 | StyleTableofAuthorities | –45 |
| StyleHeading1 | –2 | StyleMacroText | –46 |
| StyleHeading2 | –3 | StyleTOAHeading | –47 |
| StyleHeading3 | –4 | StyleList | –48 |
| StyleHeading4 | –5 | StyleListBullet | –49 |
| StyleHeading5 | –6 | StyleListNumber | –50 |
| StyleHeading6 | –7 | StyleList2 | –51 |
| StyleHeading7 | –8 | StyleList3 | –52 |
| StyleHeading8 | –9 | StyleList4 | –53 |
| StyleHeading9 | –10 | StyleList5 | –54 |
| StyleIndex1 | –11 | StyleListBullet2 | –55 |
| StyleIndex2 | –12 | StyleListBullet3 | –56 |
| StyleIndex3 | –13 | StyleListBullet4 | –57 |
| StyleIndex4 | –14 | StyleListBullet5 | –58 |
| StyleIndex5 | –15 | StyleListNumber2 | –59 |
| StyleIndex6 | –16 | StyleListNumber3 | –60 |
| StyleIndex7 | –17 | StyleListNumber4 | –61 |
| StyleIndex8 | –18 | StyleListNumber5 | –62 |
| StyleIndex9 | –19 | StyleTitle | –63 |
| StyleTOC1 | –20 | StyleClosing | –64 |
| StyleTOC2 | –21 | StyleSignature | –65 |
| StyleTOC3 | –22 | StyleDefaultParagraphFont | –66 |
| StyleTOC4 | –23 | StyleBodyText | –67 |
| StyleTOC5 | –24 | StyleBodyTextIndent | –68 |
| StyleTOC6 | –25 | StyleListContinue | –69 |
| StyleTOC7 | –26 | StyleListContinue2 | –70 |
| StyleTOC8 | –27 | StyleListContinue3 | –71 |
| StyleTOC9 | –28 | StyleListContinue4 | –72 |
| StyleNormalIndent | –29 | StyleListContinue5 | –73 |
| StyleFootnoteText | –30 | StyleMessageHeader | –74 |
| StyleAnnotationText | –31 | StyleSubtitle | –75 |
| StyleHeader | –32 | StyleSalutation | –76 |
| StyleFooter | –33 | StyleDate | –77 |
| StyleIndexHeading | –34 | StyleBodyTextFirstIndent | –78 |
| StyleCaption | –35 | StyleBodyTextFirstIndent2 | –79 |
| StyleTableofFigures | –36 | StyleNoteHeading | –80 |
| StyleEnvelopeAddress | –37 | StyleBodyText2 | –81 |
| StyleEnvelopeReturn | –38 | StyleBodyText3 | –82 |
| StyleFootnoteReference | –39 | StyleBodyTextIndent2 | –83 |
| StyleAnnotationReference | –40 | StyleBodyTextIndent3 | –84 |
| StyleLineNumber | –41 | StyleBlockQuotation | –85 |
| StylePageNumber | –42 | StyleHyperlink | –86 |
| StyleEndnoteReference | –43 | StyleHyperlinkFollowed | –87 |
| StyleEndnoteText | –44 |
要件
| 要件 | 値 |
|---|---|
| サポートされている最小のクライアント | Windows Vista [デスクトップ アプリのみ] |
| サポートされている最小のサーバー | Windows Server 2003 (デスクトップ アプリのみ) |
| 対象プラットフォーム | Windows |
| ヘッダー | tom.h |
| [DLL] | Msftedit.dll |
関連項目
概念
リファレンス