> ## 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 インターフェイスの OnCorrectResolution メソッド

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

このメソッドはクライアント側で実装されます。[Image Viewer](/ja/fine-reader/engine/visual-components-reference/imageviewer) で画像の解像度が変更される前に、ABBYY FineReader Engine によって呼び出されます。次の場合、この処理が開始されます。

* Image Editor ダイアログの Image Resolution セクションで <img src="https://mintcdn.com/abbyy/6udH-pkk8zkVafYH/images/fine-reader/engine/button_correctresolution.gif?s=71db37cdf002336891a66ae4107af719" alt="Button_CorrectResolution" width="24" height="23" data-path="images/fine-reader/engine/button_correctresolution.gif" /> Apply ボタンがクリックされた場合
* Image Resolution ダイアログで OK ボタンがクリックされた場合
* Image Viewer の Image Properties タブの Resolution field で新しい解像度が指定された場合

このメソッドは、解像度の補正対象となるページのインデックスと、新しい解像度の値をクライアントに渡します。このメソッドを使用すると、この操作をキャンセルできます。

[<img src="https://mintcdn.com/abbyy/lsETHFYUFiongXSm/images/fine-reader/engine/editimage_correctresolution_zoom50.png?fit=max&auto=format&n=lsETHFYUFiongXSm&q=85&s=809869f07b89eb87b6b1206ef69dd874" alt="editimage_correctresolution_zoom50" width="304" height="228" data-path="images/fine-reader/engine/editimage_correctresolution_zoom50.png" />](#broken-link-editimage-correctresolution-png)

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

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

```cpp theme={null}
HRESULT OnCorrectResolution(
  IIntsCollection* PageIndices,
  int              NewResolution,
  VARIANT_BOOL*    Cancel
);
```

### C\#

```csharp theme={null}
void OnCorrectResolution(
  IIntsCollection PageIndices,
  int             NewResolution,
  out bool        Cancel
);
```

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

```vb theme={null}
Sub OnCorrectPerspective( _
  PageIndices As IIntsCollection, _
  NewResolution As Integer, _
  ByRef Cancel As Boolean _
)
```

<div id="parameters">
  ## Parameters
</div>

PageIndices

\[in] 解像度を変更するページのインデックスを、[IntsCollection](/ja/fine-reader/engine/api-reference/supplementary-objects-and-methods/intscollection) オブジェクトとして指定します。

NewResolution

\[in] 新しい解像度の値を指定します。

Cancel

\[out] 処理を中止する場合は、この変数を TRUE に設定します。この場合、解像度は変更されません。

<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)
