> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# IImageViewerEvents インターフェイスの OnSplitImages メソッド

> Windows 上の ABBYY FineReader Engine Visual Components における IImageViewerEvents インターフェイスの OnSplitImages メソッド — このメソッドはクライアント側で実装されます。

このメソッドはクライアント側で実装されます。[Image Viewer](/ja/fine-reader/engine/visual-components-reference/imageviewer) で画像を分割する前に、ABBYY FineReader Engine によって呼び出されます。この処理は、Image Editor ダイアログの Split セクションで <img src="https://mintcdn.com/abbyy/6udH-pkk8zkVafYH/images/fine-reader/engine/button_splitbyline.gif?s=cecb4b7e169c0033dfbe27850cd471fb" alt="Button_SplitByLine" width="24" height="23" data-path="images/fine-reader/engine/button_splitbyline.gif" /> Split by Line または <img src="https://mintcdn.com/abbyy/6udH-pkk8zkVafYH/images/fine-reader/engine/button_splitautomatically.gif?s=eec5519d630ef07f660b63aab36daef4" alt="Button_SplitAutomatically" width="24" height="23" data-path="images/fine-reader/engine/button_splitautomatically.gif" /> Split Automatically ボタンをクリックすると開始されます。

このメソッドは、分割対象となる画像と、分割に使用される領域に関する情報をクライアントに渡します。このメソッドを使用すると、この操作をキャンセルできます。

<Accordion title="図を見る">
  <img src="https://mintcdn.com/abbyy/lsETHFYUFiongXSm/images/fine-reader/engine/editimage_split.png?fit=max&auto=format&n=lsETHFYUFiongXSm&q=85&s=8607ce023504e3c9473bb69b9598b563" alt="EditImage_Split" width="684" height="367" data-path="images/fine-reader/engine/editimage_split.png" />
</Accordion>

<div id="syntax">
  ## 構文
</div>

<div id="c">
  ### C++
</div>

```cpp theme={null}
HRESULT OnSplitImages(
  IIntsCollection*    PageIndices,
  IRegionsCollection* Regions,
  VARIANT_BOOL*       Cancel
);
```

### C\#

```csharp theme={null}
void OnSplitImages(
  IIntsCollection    PageIndices,
  IRegionsCollection Regions,
  out bool          Cancel
);
```

<div id="visual-basic-net">
  ### Visual Basic .NET
</div>

```vb theme={null}
Sub OnReadBlocks( _
  PageIndices As IIntsCollection, _
  Regions As IRegionsCollection, _
  ByRef Cancel As Boolean _
)
```

<div id="parameters">
  ## パラメータ
</div>

PageIndices

\[in] 分割対象となるページのインデックスを、[IntsCollection](/ja/fine-reader/engine/api-reference/supplementary-objects-and-methods/intscollection) オブジェクトとして格納します。

Regions

\[in] 画像の分割に使用する領域のコレクションを、[RegionsCollection](/ja/fine-reader/engine/api-reference/supplementary-objects-and-methods/regionscollection) オブジェクトとして格納します。

Cancel

\[out] 処理を中止する必要があることを示すには、この変数に TRUE を設定します。この場合、対応する関数は E\_ABORT を返します。

<div id="return-values">
  ## 戻り値
</div>

\[C++ のみ] このメソッドが S\_OK 以外の値を返した場合は、クライアント側でエラーが発生したことを示します。この場合、Cancel Parameter の値は考慮されません。

<div id="remarks">
  ## 備考
</div>

このメソッドのクライアント実装では、メソッド内でスローされるすべての例外を確実にキャッチして処理し、例外がメソッドの外部に伝播しないようにする必要があります。例外がメソッドの外部に伝播すると、予期しない結果 (プログラムの終了など) を招くおそれがあります。

<div id="see-also">
  ## 関連項目
</div>

[IImageViewerEvents](/ja/fine-reader/engine/visual-components-reference/iimageviewerevents)
