⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 photoviewerdlg.h

📁 EVC环境下用SDK开发WINCE的应用程序
💻 H
字号:
// PhotoViewerDlg.h: interface for the CPhotoViewerDlg class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_PHOTOVIEWERDLG_H__85CACB82_2D4D_4A51_8105_2C3CADCFA3CF__INCLUDED_)
#define AFX_PHOTOVIEWERDLG_H__85CACB82_2D4D_4A51_8105_2C3CADCFA3CF__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000


#include "NDialog.h"
#include "resource.h"
#include "NavButton.h"

class CNListBox;
class CxImage;
class CPhotoViewerDlg : public CNDialog  
{
public:
	CPhotoViewerDlg(CNWnd* pParent=NULL, UINT uID = IDD);
	virtual ~CPhotoViewerDlg();
// Dialog Data
	enum {IDD = IDD_PHOTOVIEWERDLG};

	void SetFileList(CNListBox* pList) { m_pFileList = pList; }
protected:
	// Override
	virtual BOOL OnInitDialog();
	virtual BOOL OnEraseBkgnd(HDC hdc);
	virtual HBRUSH OnCtlColor(HDC hdc,HWND hwnd, UINT nCtlColor);
	virtual void OnMouseMove(UINT nFlags, POINT point);
	virtual void OnLButtonDown(UINT nFlags, POINT point);
	virtual void OnLButtonUp(UINT nFlags, POINT point);

	// message handles
	void OnPrevious();
	void OnNext();
	void OnZoomIn();
	void OnZoomOut();
	void OnBestfit();
	void OnActualSize();

	// helper functions
	void CreateCxImage();
	void DrawImage(HDC hdc);
protected:
	CNavButton	m_btnBestFit;
	CNavButton	m_btnActualSize;
	CNavButton	m_btnPrevious;
	CNavButton	m_btnNext;
	CNavButton	m_btnZoomIn;
	CNavButton	m_btnZoomOut;

	CxImage		*m_pImage;
	BOOL		m_bActualSize;
	BOOL		m_bBestFit;
	// zoom in or zoom out the picture according to this ratio.
	double		m_dZoomRatio;

	// for drag the picture.
	POINT		m_ptMouseDown;
	int			m_nCurOffsetX, m_nOffsetX;
	int			m_nCurOffsetY, m_nOffsetY;

	// point to a List box control in which picture files store.
	CNListBox	*m_pFileList;
	TCHAR	m_szFileName[MAX_PATH+1];
	void FindExtension(LPCTSTR name, LPTSTR ext);
	int FindType(LPCTSTR ext);

	DECLARE_MESSAGE_MAP()
};

#endif // !defined(AFX_PHOTOVIEWERDLG_H__85CACB82_2D4D_4A51_8105_2C3CADCFA3CF__INCLUDED_)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -