Win32 API 日本語リファレンス
ホームUI.Controls.RichEdit › ITextStory

ITextStory

COM
IIDc241f5f3-7206-11d8-a2c7-00a0d1d6c6b3継承元IUnknown自前メソッド開始 vtbl3

メソッド 12

vtbl = vtable インデックス(0始まり)。HSP等からCOMメソッドをインデックス指定で呼ぶ際に使用します。0〜2 は IUnknown。

vtbl 3 HRESULT GetActive(INT* pValue)
pValueINT*outこのストーリーがアクティブかどうかを示す値を受け取る。
vtbl 4 HRESULT SetActive(INT Value)
ValueINTinストーリーをアクティブにするかどうかを指定する。
vtbl 5 HRESULT GetDisplay(IUnknown** ppDisplay)
ppDisplayIUnknown**outこのストーリーに関連付けられた表示オブジェクトを受け取る。
vtbl 6 HRESULT GetIndex(INT* pValue)
pValueINT*outストーリーのインデックス(1 始まり)を受け取る。
vtbl 7 HRESULT GetType(INT* pValue)
pValueINT*outストーリーの種別を示す値を受け取る。
vtbl 8 HRESULT SetType(INT Value)
ValueINTinストーリーの種別を示す値を指定する。
vtbl 9 HRESULT GetProperty(INT Type, INT* pValue)
TypeINTin取得するプロパティの種別を指定する。
pValueINT*out取得したプロパティ値を受け取る。
vtbl 10 HRESULT GetRange(INT cpActive, INT cpAnchor, ITextRange2** ppRange)
cpActiveINTin範囲のアクティブ端の文字位置(cp)を指定する。
cpAnchorINTin範囲のアンカー端の文字位置(cp)を指定する。
ppRangeITextRange2**out生成された ITextRange2 オブジェクトを受け取る。
vtbl 11 HRESULT GetText(INT Flags, LPWSTR* pbstr)
FlagsINTinテキスト取得の動作を制御するフラグを指定する。
pbstrLPWSTR*out取得したテキストを格納した BSTR を受け取る。
vtbl 12 HRESULT SetFormattedText(IUnknown* pUnk)
pUnkIUnknown*inoptional設定する書式付きテキストを保持するオブジェクトへのポインタである。
vtbl 13 HRESULT SetProperty(INT Type, INT Value)
TypeINTin設定するプロパティの種別を指定する。
ValueINTin設定するプロパティ値を指定する。
vtbl 14 HRESULT SetText(INT Flags, LPWSTR bstr)
FlagsINTinテキスト設定の動作を制御するフラグを指定する。
bstrLPWSTRin設定するテキスト文字列(BSTR)を指定する。

HSP用 COM定義

#usecom / #comfunc によるHSPのCOM呼び出し定義。数字は vtbl インデックス(0始まり)。クラスIDが無い場合 #usecom の末尾は "{}"、ある場合は "{CLSID}"

出力引数:
#define global IID_ITextStory "{C241F5F3-7206-11D8-A2C7-00A0D1D6C6B3}"
#usecom global ITextStory IID_ITextStory "{}"
#comfunc global ITextStory_GetActive         3 var
#comfunc global ITextStory_SetActive         4 int
#comfunc global ITextStory_GetDisplay        5 sptr
#comfunc global ITextStory_GetIndex          6 var
#comfunc global ITextStory_GetType           7 var
#comfunc global ITextStory_SetType           8 int
#comfunc global ITextStory_GetProperty       9 int,var
#comfunc global ITextStory_GetRange          10 int,int,sptr
#comfunc global ITextStory_GetText           11 int,var
#comfunc global ITextStory_SetFormattedText  12 sptr
#comfunc global ITextStory_SetProperty       13 int,int
#comfunc global ITextStory_SetText           14 int,wstr
; ※数字は vtbl インデックス(0始まり)。0/1/2 は IUnknown(QueryInterface/AddRef/Release)。
; ※このインターフェースは直接 CoCreateInstance するクラスIDが無いため "{}"(他メソッド/アクティベーションで取得)。
; ※出力/バッファ引数は var(変数直渡し)。varptr 方式にも切替可。
; ※ハンドル/void*等の不透明ポインタは IronHSP では intptr 指定が可能。