// Userbtmp.cpp: implementation of the User Twain and Bitmap classs. // ////////////////////////////////////////////////////////////////////// #include "stdafx.h" #include "BarCode.h" #ifdef _DEBUG #undef THIS_FILE static char THIS_FILE[]=__FILE__; #define new DEBUG_NEW #endif LEAD_START_CLASS_MAP(LUserBitmap,LBitmapBase) LEAD_INIT_LTwain(LUserTwain) LEAD_END_CLASS_MAP(LUserBitmap,LBitmapBase) LEAD_IMPLEMENTOBJECT(LUserBitmap); LEAD_IMPLEMENTOBJECT(LUserTwain); ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// LUserBitmap::LUserBitmap() { } LUserBitmap::~LUserBitmap() { } ////////////////////////////////////////////////////////////////////// // LUserTwain Class ////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// LUserTwain::LUserTwain() { EnableCallBack(TRUE); m_nScanNo = 0; } LUserTwain::~LUserTwain() { } L_INT LUserTwain::BitmapCallBack(pBITMAPHANDLE pBitmap) { L_TCHAR str[50]; CBarCodeApp * pTheApp = (CBarCodeApp*)AfxGetApp(); LBitmapBase btmpBase; btmpBase.SetHandle(pBitmap); memset(str,0,sizeof(0)); wsprintf(str,_T("Twain Scan %d"),++m_nScanNo); pTheApp->CreateNewBitmapWindow(str,&btmpBase); return SUCCESS; }