www.pudn.com > CirMMI.rar > DlgBook.h
#if !defined(AFX_DLGBOOK_H__6DC55715_97B6_4D28_86E6_49042BE25188__INCLUDED_) #define AFX_DLGBOOK_H__6DC55715_97B6_4D28_86E6_49042BE25188__INCLUDED_ #if _MSC_VER >= 1000 #pragma once #endif // _MSC_VER >= 1000 // DlgBook.h : header file // #include "stdafx.h" #include ".\share\StaticText.h"//CStaticText #include ".\share\DataGram.h" #include "RecordBook.h" #include///////////////////////////////////////////////////////////////////////////// // CDlgBook dialog /* typedef struct tag_RecordOfBook { BYTE cbType;//0xf0-ISDN, 0xf1-MSISDN, 0xf2-xxx,0xf3-yyy 。。。 BYTE cbName;//0xf0-前方车站 0xf1-车长 0xf2-XXX WORD wIndex;//序号? BYTE cbTele[40];//还是用TCHAR cbType[10]好呢?不知道怎么存储 }RecordOfBook; */ //单个电话的属性 typedef struct tag_SingleTele { INT iWhitchJu;//路局代号,自己定义的 INT iType;//电话类型代号,自己定义的 TCHAR cbWhitchJu[10];//属于xxx路局(最多9个汉字) TCHAR cbType[10];//电话类型:机务调度、电力调度、维护中心... TCHAR cbTele[20];//电话号码 tag_SingleTele() { INT iCnt= 0; for(; iCnt< 10; iCnt++) { cbWhitchJu[iCnt]= '\0'; } for(iCnt= 0; iCnt< 10; iCnt++) { cbType[iCnt]= '\0'; } for(iCnt= 0; iCnt< 20; iCnt++) { cbTele[iCnt]= '\0'; } } }TeleCode; class CDlgBook : public CDialog { // Construction public: BOOL AppendRecord(BYTE cbType, CString strName, CString strTele); BOOL AppendRecord(INT iJu, INT iType, CString strJu, CString strType, CString strTele); void DisplayJu(void);//显示中国各个铁路局 void DisplayRecord(void); void DisplayRecord(INT iJu); CDlgBook(CWnd* pParent = NULL); // standard constructor //函数 UINT OnKeyProc(WPARAM wKey, LPARAM lunUse);//按键处理 virtual LRESULT ExitWnd(WPARAM wParam,LPARAM lParam); virtual LRESULT InitWnd(WPARAM wParam,LPARAM lParam); //控件 CStaticText m_staticTopic;//标题 CStaticText m_staticHeader;//题头 CStaticText m_staticType;//最大值 CStaticText m_staticName;//最小值 CStaticText m_staticTelecode;//音量值 //变量 CWnd *m_pFrmWnd; INT m_iLayer;//当前层次,也相当于ZOrder // CArray m_ArrayRecords; CArray m_TeleBook; UINT m_nCurrentIndex;//索引序号 UINT m_nTotal;//总索引数值 CRecordBook m_records; CFont m_fontOfList; // Dialog Data //{{AFX_DATA(CDlgBook) enum { IDD = IDD_DLG_BOOK }; CListBox m_listboxView; //}}AFX_DATA // Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CDlgBook) protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support //}}AFX_VIRTUAL // Implementation protected: // Generated message map functions //{{AFX_MSG(CDlgBook) virtual BOOL OnInitDialog(); afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor); //}}AFX_MSG DECLARE_MESSAGE_MAP() }; //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. #endif // !defined(AFX_DLGBOOK_H__6DC55715_97B6_4D28_86E6_49042BE25188__INCLUDED_)