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

📄 flashwriterdlg.h

📁 将XLS文件的内容下载到LED显示屏上显示
💻 H
字号:
// FlashWriterDlg.h : header file
//

#if !defined(AFX_FLASHWRITERDLG_H__E09B78A0_8483_4381_891D_ED9E62FC7C16__INCLUDED_)
#define AFX_FLASHWRITERDLG_H__E09B78A0_8483_4381_891D_ED9E62FC7C16__INCLUDED_

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

#include "resource.h"		// main symbols
#include	"math.h"

/////////////////////////////////////////////////////////////////////////////
// CFlashWriterDlg dialog


const int TableDataLength = 366*6*2;
const int NFStartAddress = 0x478000;
const int MaxLine = 368;
const int MaxRow = 8;

#define	USE_BLOCK0_SIZE		0x200 // 512bytes

typedef struct iDate
{
	long Month;
	long Date;
}MonthDate, *PMonthDate;

typedef struct iTime
{
	long Hour;
	long Minute;
}HourMin, *PHourMin;


// 消息定义
enum
{
	MSG_INIT = WM_USER+100,
	MSG_READ,
	MSG_ERASE,
	MSG_WRITE,
	MSG_CHECK
};


typedef struct stFileInformation
{
	UINT StartAddress;
	UINT Size;
} FileInformation, *PFileInformation;


class CFlashWriterDlg : public CDialog
{
// Construction
public:
	CFlashWriterDlg(CWnd* pParent = NULL);	// standard constructor
	virtual ~CFlashWriterDlg();


// Dialog Data
	//{{AFX_DATA(CFlashWriterDlg)
	enum { IDD = IDD_DIALOG_FLASH_WRITER };
	int		m_CS;
	int		m_Debug;
	CString	m_SourceFile;
	CString	m_Status;
	//}}AFX_DATA
	CListBox m_ListFiles;

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CFlashWriterDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);
	//}}AFX_VIRTUAL

// Implementation
protected:

	// Generated message map functions
	//{{AFX_MSG(CFlashWriterDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnEraseFlash();
	afx_msg void OnProgramFlash();
	afx_msg void OnPlayFile();
	afx_msg bool OnReFlash();
	afx_msg void OnBrowse();
	afx_msg void OnClose();
	afx_msg void UsbSucessClose();
	afx_msg void OnTimer(UINT nIDEvent);
	afx_msg void OnButton2();
	afx_msg void OnOutofmemoryProgress1(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnButton3();
	afx_msg MonthDate GetMonthDate(CString stDateMonth);
	afx_msg HourMin GetHourMin(CString stHorMin);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
public:
	void UpdateFileInfomation();
	bool ReFlash(void);

	PFileInformation m_FileInformation;
	UINT m_FileInforCount;
	UINT m_TotalFiles;
	CString m_NFlashSpace;
	int FlashAddress;
	bool USBReadyFlag;
	bool CSFlag;		//0-----CS1    1-------CS2
private:
	void ProgressPrg(int Temp_Counter);
	void SetProgress(short MaxIndex);

	void OnProcEvent();

	static unsigned long __stdcall ThreadInit(PVOID param);
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_FLASHWRITERDLG_H__E09B78A0_8483_4381_891D_ED9E62FC7C16__INCLUDED_)


⌨️ 快捷键说明

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