www.pudn.com > CirMMI.rar > DispatchCmdDlg.h
#if !defined(AFX_DISPATCHCMDDLG_H__B302CD2E_05FC_4425_A9DE_019B0DBE4C4D__INCLUDED_)
#define AFX_DISPATCHCMDDLG_H__B302CD2E_05FC_4425_A9DE_019B0DBE4C4D__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// DispatchCmdDlg.h : header file
//
//#include ".\share\textstatic.h"
typedef struct tag_BufferOfPrint
{
BOOL bInvalidate;
INT iTotal;
BYTE cbBufPrint[2048];
tag_BufferOfPrint():bInvalidate(FALSE){}
}BufferOfPrint;
/////////////////////////////////////////////////////////////////////////////
// CDispatchCmdDlg dialog
class CDispatchCmdDlg : public CDialog
{
// Construction
public:
CDispatchCmdDlg(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CDispatchCmdDlg)
enum { IDD = IDD_DISPATCH_COMMAND_DIALOG };
CStatic m_ctYear;
CStatic m_ctTrainID;
CStatic m_ctTotalPage;
CStatic m_ctSecond;
CStatic m_ctRunning;
CStatic m_ctRevState;
CStatic m_ctPage;
CStatic m_ctMonth;
CStatic m_ctMinute;
CStatic m_ctMan;
CStatic m_ctHour;
CStatic m_ctFrom;
CStatic m_ctDay;
CStatic m_ctCmdState;
CStatic m_ctCmdNum;
CStatic m_ctCodeName;
CEdit m_editContent;
CString m_strCmdNum;
CString m_strCmdState;
CString m_strDay;
CString m_strFrom;
CString m_strHour;
CString m_strMan;
CString m_strMinute;
CString m_strMonth;
CString m_strPage;
CString m_strRevState;
CString m_strRunning;
CString m_strSecond;
CString m_strTotalPage;
CString m_strTrainID;
CString m_strYear;
//}}AFX_DATA
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CDispatchCmdDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(CDispatchCmdDlg)
virtual BOOL OnInitDialog();
afx_msg void OnCancelMode();
afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
afx_msg void OnPaint();
afx_msg void OnTimer(UINT nIDEvent);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
public:
virtual LRESULT ExitWnd(WPARAM wParam,LPARAM lParam);
virtual LRESULT InitWnd(WPARAM wParam,LPARAM lParam);
public:
UINT m_nSoundCnt; //播放声音次数:在显示内容的时候,根据条件,设置是否开启播放声音事件
UINT m_nSoundType;//播放声音类型:播放声音停止的条件:1、事件无效、并设置次数为0
//2、次数为0,并设置事件无效
CPen m_penLine;
CBrush m_brushBkGnd;
CFont m_ftTitle;
CRect m_rect;
CFont m_fontOfEdit;
UINT m_nPageCodeOfCurrent;
UINT m_nTotalPage;
BufferOfPrint m_BufferOfPrint;
CRect m_rectOfEdit;
TRANSFER_CMD m_CurTransCmd;//正在显示的调度命令(必须是的)
TRANSFER_CMD m_tmpTransCmd;
TRANSFER_CMD m_PreTransCmd;//上一个调度命令,与m_CurTransCmd
CWnd *m_pFrmWnd;
public:
void UpDataQueryUI(TRANSFER_CMD& cmd);
UINT OnKeyProc(WPARAM wData, LPARAM lex);
BOOL IsAutoHandAck();
BOOL CDispatchCmdDlg::IsNeedSave(BYTE code);
void DisplayPageInfo(void);
void DisplayTranCmd(const TRANSFER_CMD &trancmd);
BOOL PackUpDspchCmd(BYTE *data, SHORT slen);
void DCQQ(const TRANSFER_CMD &tran);
void CDispatchCmdDlg::HandACK(const TRANSFER_CMD &tran,BYTE cbCmd);
void CDispatchCmdDlg::AutoACKCmd(const BYTE *pData, SHORT sLen);
private:
HBRUSH m_hbrMainBk;
HBRUSH m_hbrRedBk;
HBRUSH m_hbrGreenBk;
HBRUSH m_hbrRamaranthBk; //紫红
HBRUSH m_hbrBrownBk;//棕
HBRUSH m_hbrBlackBk;
HBRUSH m_hbrWhiteBk;
HBRUSH m_hbrStateBk;
HBRUSH m_hbrBlueBk;
UINT m_nCurPage;
BOOL m_bReaded;
BOOL m_bShowConfirm_Left,m_bShowConfirm_Right;
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_DISPATCHCMDDLG_H__B302CD2E_05FC_4425_A9DE_019B0DBE4C4D__INCLUDED_)