You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
147 lines
3.3 KiB
147 lines
3.3 KiB
//----------------------------------------------------------------------------
|
|
// Laser Guard Ltd.
|
|
// Copyright © 2000-2002. All Rights Reserved.
|
|
// Version 1.0 24/04/2000
|
|
// Last modification: 08/10/2003
|
|
// Project Intruder Position Indicator
|
|
// SUBSYSTEM: Report view system
|
|
// FILE: ReportView.h
|
|
// AUTHOR: Chizhevskiy Sergey
|
|
// OVERVIEW
|
|
// ~~~~~~~~
|
|
// Header file of class CReportView
|
|
//----------------------------------------------------------------------------
|
|
|
|
#ifndef __REPORTVIEW__H__INCLUDED__
|
|
#define __REPORTVIEW__H__INCLUDED__
|
|
|
|
#include "Profile.h"
|
|
#include "..\LgLib\LgFileMap.h"
|
|
#include "ImageWnd.h"
|
|
|
|
struct IMAGE_FILE {
|
|
HANDLE hFile;
|
|
HANDLE hMap;
|
|
LPBYTE pByte;
|
|
DWORD nFirst;
|
|
DWORD nCount;
|
|
|
|
};
|
|
|
|
typedef IMAGE_FILE* LPIMAGE_FILE;
|
|
|
|
class CApplication;
|
|
|
|
class CReportView {
|
|
public:
|
|
CReportView();
|
|
~CReportView();
|
|
|
|
BOOL Create(HWND hWnd, CApplication *pApplication, CProfile *pProfile);
|
|
|
|
void Close();
|
|
|
|
void LoadDirectoryTree(HTREEITEM hParent, LPCTSTR pFolder);
|
|
void OpenFolder(HTREEITEM hItem);
|
|
BOOL IsWork();
|
|
|
|
private:
|
|
static DWORD CALLBACK ThreadProc_( LPVOID lpvParam );
|
|
static BOOL CALLBACK WndProc_(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
|
|
|
private:
|
|
void Empty();
|
|
BOOL ImageDraw();
|
|
BOOL PreviewDraw();
|
|
void ScrollImage(INT nScrollCode, INT nPos);
|
|
void ScrollPreview(INT nScrollCode, INT nPos);
|
|
void AttachTextFile(LPCTSTR pName);
|
|
void AttachLocatorFile(LPCTSTR pName);
|
|
void AttachPreviewFile(LPCTSTR pName);
|
|
void AttachImageFile(LPCTSTR pName);
|
|
|
|
private:
|
|
static DWORD CALLBACK EditStreamCallback( DWORD_PTR dwCookie, LPBYTE pbBuff, LONG cb, LONG *pcb );
|
|
|
|
private:
|
|
void OnPaint( HWND hWnd );
|
|
void OnDraw( HDC hDC );
|
|
void OnDrawTime( HDC hDC );
|
|
void OnTimer();
|
|
LRESULT OnEraseBackground( WPARAM, LPARAM );
|
|
|
|
private:
|
|
volatile BOOL m_bIsWorking;
|
|
|
|
CProfile *m_pProfile;
|
|
|
|
HMODULE m_hLibrary;
|
|
HANDLE m_hThread;
|
|
DWORD m_hThreadID;
|
|
HWND m_hParentWnd;
|
|
HWND m_hWnd;
|
|
|
|
HWND m_hWndTreeReport;
|
|
HWND m_hWndEditText;
|
|
// HWND m_hWndStaticLocator;
|
|
// HWND m_hWndStaticImage;
|
|
// HWND m_hWndStaticPreview;
|
|
HWND m_hWndScrollBarImage;
|
|
HWND m_hWndScrollBarPreview;
|
|
HWND m_hWndButtonClose;
|
|
|
|
// HBITMAP m_hLocatorBitmap;
|
|
// HBITMAP m_hLocatorMemBitmap;
|
|
// HBITMAP m_hLocatorMemOldBitmap;
|
|
// HDC m_hLocatorDC;
|
|
// HDC m_hLocatorMemDC;
|
|
|
|
// HBITMAP m_hPreviewBitmap;
|
|
// HBITMAP m_hPreviewMemBitmap;
|
|
// HBITMAP m_hPreviewMemOldBitmap;
|
|
// DWORD m_nPreviewCount;
|
|
// DWORD m_nPreviewCurrent;
|
|
// HDC m_hPreviewDC;
|
|
// HDC m_hPreviewMemDC;
|
|
|
|
// HBITMAP m_hImageBitmap;
|
|
// HDC m_hImageMemDC;
|
|
// HDC m_hImageDC;
|
|
|
|
// LPIMAGE_FILE m_pImageFile;
|
|
// DWORD m_nImageCount;
|
|
// DWORD m_nImageCurrent;
|
|
// DWORD m_nImageFileCount;
|
|
|
|
CApplication *m_pApplication;
|
|
|
|
private:
|
|
CLgArray<CLgFileMap*,CLgFileMap*> m_ImageArray;
|
|
INT m_nImageCount;
|
|
INT m_nImageCurrent;
|
|
|
|
private:
|
|
CLgFileMap m_PreviewFileMap;
|
|
INT m_nJpegPreviewCount;
|
|
INT m_nJpegPreviewCurrent;
|
|
|
|
private:
|
|
CImageWnd m_ImageWnd;
|
|
CImageWnd m_LocatorWnd;
|
|
CImageWnd m_PreviewWnd;
|
|
};
|
|
|
|
inline
|
|
void CReportView::Close()
|
|
{
|
|
if(m_bIsWorking)
|
|
::PostThreadMessage(m_hThreadID, WM_QUIT, 0, 0);
|
|
}
|
|
|
|
inline
|
|
BOOL CReportView::IsWork()
|
|
{
|
|
return m_bIsWorking;
|
|
}
|
|
|
|
#endif
|