#include "stdafx.h" #include "LTScrCpr.h" LEAD_START_CLASS_MAP(LUserBitmap,LBitmapBase) LEAD_INIT_LScreenCapture(LUserScreenCapture) LEAD_END_CLASS_MAP(LUserBitmap,LBitmapBase) LEAD_IMPLEMENTOBJECT(LUserBitmap); LEAD_IMPLEMENTOBJECT(LUserScreenCapture); ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// LUserBitmap::LUserBitmap() { } LUserBitmap::~LUserBitmap() { } ////////////////////////////////////////////////////////////////////// // LUserScreenCapture Capture ////////////////////////////////////////////////////////////////////// LUserScreenCapture::LUserScreenCapture() { m_iCaptureType = CAPTURE_NONE; m_iSameCaptureTypeTimes = 0; // Enable the callback functionality EnableCallBack(TRUE); } LUserScreenCapture::~LUserScreenCapture() { } L_INT LUserScreenCapture::ScreenCaptureCallBack() { static L_TCHAR szCaption[41]; static L_TCHAR *szCaptionType[11] = {_T("Capture Active Window "), _T("Capture Client Window "), _T("Capture Full Screen "), _T("Capture Selected Object "), _T("Capture Menu Under Cursor "), _T("Capture Selected Area "), _T("Capture Wallpaper "), _T("Capture Mouse Cursor "), _T("Capture Window Under Cursor"), _T("Capture From Exe Dlg-Tree "), _T("Capture From Dlg-Tabbed View ")}; CLTScrCprApp * pTheApp = (CLTScrCprApp *)AfxGetApp(); if(pTheApp!=NULL) { if(pTheApp->m_bBeepOption) MessageBeep(0xffffffff); memset(szCaption, 0, sizeof(szCaption)); wsprintf(szCaption, _T("%s[%d]"), szCaptionType[m_iCaptureType], ++m_iSameCaptureTypeTimes); if(pTheApp->m_bRestoreOption) AfxGetMainWnd()->ShowWindow(SW_RESTORE); pTheApp->CreateNewCaptureWindow(szCaption, m_pBitmap); return SUCCESS; } return FAILURE ; }