home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / mfc / general / vcterm / mainfrm.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-03-27  |  2.1 KB  |  90 lines

  1. // MainFrm.h : interface of the CMainFrame class
  2. //
  3.  
  4. // This is a part of the Microsoft Foundation Classes C++ library.
  5. // Copyright (C) 1992-1998 Microsoft Corporation
  6. // All rights reserved.
  7. //
  8. // This source code is only intended as a supplement to the
  9. // Microsoft Foundation Classes Reference and related
  10. // electronic documentation provided with the library.
  11. // See these sources for detailed information regarding the
  12. // Microsoft Foundation Classes product.
  13.  
  14.  
  15. #include "termedit.h"
  16. #include "commctrl.h"
  17.  
  18. #ifndef _MAINFRM_H_
  19. #define _MAINFRM_H_
  20.  
  21. #define ID_COMMCTRL 2001  // Ctrl ID for comm control
  22.  
  23. class CMainFrame : public CFrameWnd
  24. {
  25. public:
  26.     CMainFrame();
  27.     DECLARE_DYNCREATE(CMainFrame)
  28.  
  29. // Attributes
  30. public:
  31.     BOOL        m_bCancel;
  32.  
  33. // Operations
  34. public:
  35.  
  36. // Overrides
  37.     // ClassWizard generated virtual function overrides
  38.     //{{AFX_VIRTUAL(CMainFrame)
  39.     //}}AFX_VIRTUAL
  40.  
  41. // Implementation
  42. public:
  43.     virtual ~CMainFrame();
  44.  
  45. #ifdef _DEBUG
  46.     virtual void AssertValid() const;
  47.     virtual void Dump(CDumpContext& dc) const;
  48. #endif
  49.  
  50. protected:
  51.     CStatusBar  m_wndStatusBar;
  52.     CToolBar    m_wndToolBar;
  53.  
  54.     CTermEdit   m_edit;
  55.     CCommCtrl   m_commctrl;
  56.     CFile       m_file;
  57.     CString     m_strLogFile;
  58.     CString     m_strPhoneNum;
  59.  
  60. // Generated message map functions
  61. protected:
  62.     //{{AFX_MSG(CMainFrame)
  63.     afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  64.     afx_msg void OnActivate(UINT nState, CWnd* pWndOther, BOOL bMinimized);
  65.     afx_msg void OnClose();
  66.     afx_msg void OnUpdateFile(CCmdUI* pCmdUI);
  67.     afx_msg void OnFileOpenlog();
  68.     afx_msg void OnFileCloselog();
  69.     afx_msg void OnFileTransmit();
  70.     afx_msg void OnUpdateCommPort(CCmdUI* pCmdUI);
  71.     afx_msg void OnCommPort(UINT nID);
  72.     afx_msg void OnUpdatePropDTREnable(CCmdUI* pCmdUI);
  73.     afx_msg void OnProperties(UINT nID);
  74.     //}}AFX_MSG
  75.     afx_msg void OnCommEvent();
  76.  
  77.     DECLARE_EVENTSINK_MAP()
  78.     DECLARE_MESSAGE_MAP()
  79.  
  80. public:
  81.     CTermEdit* GetEditCtrl(){return &m_edit;}
  82.     CCommCtrl* GetCommCtrl(){return &m_commctrl;}
  83.  
  84.     void ShowData(LPCTSTR strData);
  85.     void DoEvents();
  86. };
  87.  
  88. #endif // _MAINFRM_H_
  89. /////////////////////////////////////////////////////////////////////////////
  90.