跳轉到主要內容
此方法在用戶端實作。當 Image Viewer 或與 Image Viewer 同步的 Zoom Viewer 中的 block type 變更後,ABBYY FineReader Engine 會呼叫此方法。此方法可讓您取消型別變更。 block type 可透過 Block 屬性工具列或快顯功能表進行變更,也可間接透過將表格分隔符新增至原本為非表格型別的 Block 來進行變更。

語法

C++

HRESULT OnChangeBlockType(
  int           Index,
  BlockTypeEnum NewType,
  VARIANT_BOOL* Cancel
);

C#

void OnChangeBlockType(
  int           Index,
  BlockTypeEnum NewType,
  out bool      Cancel
);

Visual Basic .NET

Sub OnChangeBlockType( _
  Index As Integer, _
  NewType As BlockTypeEnum, _
  ByRef Cancel As Boolean _
)

參數

Index [in] 包含所選 Block 的索引。此索引位於 ILayout::VisualBlocks 集合中。 NewType [in] 由 BlockTypeEnum 列舉常數指定的 Block 新型別。 Cancel [out] 您可以將此變數設為 TRUE,以取消變更 Block 的型別。

回傳值

此方法沒有特定的回傳值。它會回傳 ABBYY FineReader Engine 函式的標準回傳值

備註

此 method 的客戶端實作必須確保在 method 內部拋出的所有例外都會被捕捉並妥善處理,且不會有任何例外傳播到 method 外部。若例外傳播到 method 外部,可能會導致無法預期的結果 (例如程式終止) 。

另請參閱

IImageViewerEvents