90 lines
2.5 KiB
C++
90 lines
2.5 KiB
C++
#if !defined(AFX_SLIDESTATIC_H__739BEBCE_1AF9_41DA_8C16_9A04FE242315__INCLUDED_)
|
|
#define AFX_SLIDESTATIC_H__739BEBCE_1AF9_41DA_8C16_9A04FE242315__INCLUDED_
|
|
|
|
#if _MSC_VER > 1000
|
|
#pragma once
|
|
#endif // _MSC_VER > 1000
|
|
// SlideStatic.h : header file
|
|
//
|
|
//#include <imageDc.h>
|
|
#include "TAPI.h"
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// CSlideStatic window
|
|
|
|
class TELAPI CSlideStatic : public CStatic
|
|
{
|
|
// Construction
|
|
public:
|
|
CSlideStatic(const TCHAR* szTKName, const TCHAR* szType);
|
|
CSlideStatic();
|
|
|
|
// Attributes
|
|
public:
|
|
|
|
// Operations
|
|
public:
|
|
|
|
// Overrides
|
|
// ClassWizard generated virtual function overrides
|
|
//{{AFX_VIRTUAL(CSlideStatic)
|
|
public:
|
|
virtual BOOL PreTranslateMessage(MSG* pMsg);
|
|
//}}AFX_VIRTUAL
|
|
|
|
// Implementation
|
|
public:
|
|
int m_iColNum; //显示幻灯行数
|
|
int m_iRowNum; //显示幻灯列数
|
|
CString m_csTKName, m_csTKType;
|
|
CString m_csTKAllName, m_csCurDwbName, m_csCurRecord, m_csCurDesName;
|
|
CString m_csMoveDesName, m_csMoveRecord;
|
|
BOOL m_bOnlyCurType;
|
|
int m_iIndex, m_iPage, m_iCurPos;//幻灯片总索引 页号 在当前页中的当前选中位置
|
|
|
|
virtual ~CSlideStatic();
|
|
|
|
void OnPgup();
|
|
void OnPgdown();
|
|
void GoPage(int iPage);
|
|
|
|
void ResetSource(const TCHAR* szTKName, const TCHAR* szTType, int iIndex = 0, int iPage = 0, int iCurPos = 0);
|
|
int TotalPages() { // 0--not ready, >0--OK
|
|
int len = (int)m_lstSlide.GetCount();
|
|
int total = len>0 ? ((len-1)/(m_iColNum*m_iRowNum)+1) : 0;
|
|
return total;
|
|
}
|
|
CList<CBlockStruct, CBlockStruct&> m_lstSlide;//用于记录所有当前页中幻灯片的信息
|
|
|
|
|
|
CRect m_rectSel; //选中红色矩形框尺寸
|
|
// Generated message map functions
|
|
protected:
|
|
CImageDC m_img;
|
|
CRect m_rectStatic; //幻灯片容器坐标
|
|
CRect m_rectLeftUpSlide; //幻灯片容器中左上角幻灯片的坐标
|
|
BOOL EndOfFile; //显示幻灯是否到结尾
|
|
|
|
|
|
void DisplayStatic(CDC *pDC, CString& strPathSlideName);
|
|
void DrawFrame(CRect& cr);
|
|
void UpdateRecord();
|
|
void EraseFrame();
|
|
|
|
//{{AFX_MSG(CSlideStatic)
|
|
afx_msg void OnPaint();
|
|
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
|
|
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
|
|
//}}AFX_MSG
|
|
virtual INT_PTR OnToolHitTest(CPoint point,TOOLINFO*pTI)const;
|
|
|
|
DECLARE_MESSAGE_MAP()
|
|
};
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
//{{AFX_INSERT_LOCATION}}
|
|
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
|
|
|
|
#endif // !defined(AFX_SLIDESTATIC_H__739BEBCE_1AF9_41DA_8C16_9A04FE242315__INCLUDED_)
|