#include #include "all.h" LEAD_START_CLASS_MAP(LUserBitmap,LBitmapBase) LEAD_INIT_LTwain(LUserTwain) LEAD_INIT_LIsis(LUserIsis) LEAD_INIT_LScreenCapture(LUserScrCapture) LEAD_END_CLASS_MAP(LUserBitmap,LBitmapBase) LEAD_IMPLEMENTOBJECT(LUserBitmap); LEAD_IMPLEMENTOBJECT(LUserTwain); LEAD_IMPLEMENTOBJECT(LUserScrCapture); LEAD_IMPLEMENTOBJECT(LUserIsis); ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// LUserBitmap::LUserBitmap() { } LUserBitmap::~LUserBitmap() { } ////////////////////////////////////////////////////////////////////// // LUserTwain Class ////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// LUserTwain::LUserTwain() { EnableCallBack(TRUE); m_nScanNo=0; } LUserTwain::~LUserTwain() { } L_INT LUserTwain::AcquireCallBack() { if(LDictionary_IsBitmap(m_pBitmap)) { if(m_pBitmap->IsAllocated()) { L_CHAR szFileName[255]; memset(szFileName,0,sizeof(szFileName)); wsprintf(szFileName," Twain Scan %d",++m_nScanNo); MainForm->CreateNewWindow(szFileName,NORMAL_MODE); return SUCCESS; } } return FAILURE; } ////////////////////////////////////////////////////////////////////// // LUserScrCapture Capture ////////////////////////////////////////////////////////////////////// LUserScrCapture::LUserScrCapture() { m_CaptureOptions.uHotKeyModifiers=0; m_nCaptureType=CAPTURE_NONE; m_nCaptureNo=0; m_bImmediateCapture=FALSE; EnableCallBack(TRUE); } LUserScrCapture::~LUserScrCapture() { } L_VOID LUserScrCapture::EnableImmediateCapture(L_BOOL bEnable) { if(bEnable) { m_nHotKey=m_CaptureOptions.nHotKey; m_uHotKeyModifiers=m_CaptureOptions.uHotKeyModifiers; if(m_bImmediateCapture==TRUE) { m_CaptureOptions.nHotKey=0; m_CaptureOptions.uHotKeyModifiers=0; } } else { m_CaptureOptions.nHotKey=m_nHotKey; m_CaptureOptions.uHotKeyModifiers=m_uHotKeyModifiers; } } L_INT LUserScrCapture::ScreenCaptureCallBack() { static L_CHAR *szCapFileNameType[11]={ "Capture Full Screen ", "Capture Client Window ", "Capture Active Window ", "Capture Window under Cursor", "Capture Menu Under Cursor ", "Capture Selected Object ", "Capture Selected Area", "Capture Mouse Cursor", "Capture WallPaper", "Capture From Exe Dlg Tree", "Capture From Tabbed View", }; if(LDictionary_IsBitmap(m_pBitmap)) { if(m_pBitmap->IsAllocated()) { L_CHAR szFileName[255]; MessageBeep (0xffffffff); memset(szFileName,0,sizeof(szFileName)); wsprintf(szFileName,"%s[%d]", szCapFileNameType[m_nCaptureType-1], ++m_nCaptureNo); MainForm->CreateNewWindow(szFileName,NORMAL_MODE); return SUCCESS; } } return FAILURE; } ////////////////////////////////////////////////////////////////////// // LUserIsis Class ////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// LUserIsis::LUserIsis() { EnableCallBack(TRUE); } LUserIsis::~LUserIsis() { } L_INT LUserIsis::AcquireMultiCallBack(L_INT32 nPage,L_CHAR L_FAR* pszFileName) { if(LDictionary_IsBitmap(m_pBitmap)) { if(m_pBitmap->IsAllocated()) { L_CHAR szFileName[255]; memset(szFileName,0,sizeof(szFileName)); if(pszFileName!=NULL) wsprintf(szFileName,"%s[%d]",pszFileName,nPage); else wsprintf(szFileName,"ISIS [%d]",nPage); MainForm->CreateNewWindow(szFileName,NORMAL_MODE); return SUCCESS; } } return FAILURE; }