gps/GPSProject/ImageViewer/ImageViewerDlg.h

114 lines
2.9 KiB
C++
Executable File

// ImageViewerDlg.h : header file
//
extern "C" {
#include "../JpegLib/jpeglib.h"
}
#include "ByteArray.h"
#include "STScreenBuffer.h"
#include "BmpButton.h"
#include "OpenImageFileDlg.h"
#include "DIBSectionCE.h"
#if !defined(AFX_IMAGEVIEWERDLG_H__0F141971_BB5D_431E_9B78_CB5A6CDFEEAC__INCLUDED_)
#define AFX_IMAGEVIEWERDLG_H__0F141971_BB5D_431E_9B78_CB5A6CDFEEAC__INCLUDED_
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
#define IMG_UNKNOWN 0xFFFFFFFF
#define IMG_BMP 0
#define IMG_JPG 1
#define MAX_ZOOM 5
/////////////////////////////////////////////////////////////////////////////
// CImageViewerDlg dialog
class CImageViewerDlg : public CDialog
{
private:
HBITMAP m_hBitmap;
int m_SrcWidth;
int m_SrcHeight;
int m_DstWidth;
int m_DstHeight;
int m_DelayTime;
int m_SrcStartX;
int m_SrcStartY;
int m_DstStartX;
int m_DstStartY;
CRect m_DefaultRect;
CSize m_ImageSize;
int m_FileNumber;
CString m_WorkFileName;
bool m_InitDC;
bool m_bFullScreen;
bool m_bAutoPlay;
bool m_bReDraw;
int m_Zoom;
int m_ZoomQuotiety;
CDC m_BgDC;
//CDC m_MemDC;
CFont m_txtFont;
CDIBSectionCE m_DIBSection;
// Construction
public:
CRect GetZoomRect(CRect* rcScreen,CSize sizePicture);
CString GetFileName(CString strFileName);
void ShowControl(BOOL bShow);
void ZoomImage(int iZoom);
int GetImageType(CString strFileName);
bool LoadImage(CString strFileName);
HBITMAP LoadImageJPG(const CString &strFileName);
CImageViewerDlg(CWnd* pParent = NULL); // standard constructor
~CImageViewerDlg();
// Dialog Data
//{{AFX_DATA(CImageViewerDlg)
enum { IDD = IDD_IMAGEVIEWER_DIALOG };
CBmpButton m_butZoomOut;
CBmpButton m_butOpen;
CBmpButton m_butZoomIn;
CBmpButton m_butNext;
CBmpButton m_butFullScreen;
CBmpButton m_butClose;
CBmpButton m_butBack;
CBmpButton m_butAutoPlay;
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CImageViewerDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
HICON m_hIcon;
// Generated message map functions
//{{AFX_MSG(CImageViewerDlg)
virtual BOOL OnInitDialog();
afx_msg void OnPaint();
afx_msg BOOL OnEraseBkgnd(CDC* pDC);
afx_msg void OnButtonAutoplay();
afx_msg void OnButtonBack();
afx_msg void OnButtonClose();
afx_msg void OnButtonFullscreen();
afx_msg void OnButtonNext();
afx_msg void OnButtonOpen();
afx_msg void OnButtonZoomin();
afx_msg void OnButtonZoomout();
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnTimer(UINT nIDEvent);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft eMbedded Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_IMAGEVIEWERDLG_H__0F141971_BB5D_431E_9B78_CB5A6CDFEEAC__INCLUDED_)