Available in the LEADTOOLS Imaging toolkit. |
CancelAcquire Example for C++ 5.0 and later
void CRasterTwainSink::OnAcquireMultiEvent(short nPage, BSTR bstrFileName, BOOL bFinishScan) { m_pView->m_pltRasTwain->CancelAcquire(); } void CTwainView::OnTwainAcquire() { short iRet; pltRasTwain->UnlockSupport(L_SUPPORT_DOCUMENT, TEXT("test key")); pltRasTwain->InitSession ((long)GetSafeHwnd()); pltRasTwain->SelectSource(); pltRasTwain->FastTransferMode = L_LTWAIN_BUFFER_MODE; pltRasTwain->FastFormat = FILE_TIF; pltRasTwain->FastBitsPerPixel = 1; pltRasTwain->FastBufferSize = 0; pltRasTwain->FastUsePreferredBufferSize = TRUE; pltRasTwain->EnableAcquireMultiEvent = TRUE; iRet = pltRasTwain->AcquireMulti("c:\\test.tif", L_LTWAIN_SHOW_USER_INTERFACE, TRUE); if (iRet != 0) MessageBox (TEXT("Error acquiring from source")); }