home *** CD-ROM | disk | FTP | other *** search
/ Softwarová Záchrana 3 / Softwarova-zachrana-3.bin / pserv.cpl / pserv-2.4.exe / source / pserv2View.h < prev    next >
C/C++ Source or Header  |  2005-01-05  |  5KB  |  141 lines

  1. // pserv2View.h : interface of the CPserv2View class
  2. //
  3. /////////////////////////////////////////////////////////////////////////////
  4.  
  5. #if !defined(AFX_PSERV2VIEW_H__FA4F3738_2872_4C02_85DA_6C647D5D4415__INCLUDED_)
  6. #define AFX_PSERV2VIEW_H__FA4F3738_2872_4C02_85DA_6C647D5D4415__INCLUDED_
  7.  
  8. #if _MSC_VER > 1000
  9. #pragma once
  10. #endif // _MSC_VER > 1000
  11.  
  12. #include "FindDialog.h"
  13. void DisplayErrorMessage(LPCTSTR lpszCaption, ...);
  14.  
  15. class CPserv2View : public CListView
  16. {
  17. protected: // create from serialization only
  18.     CPserv2View();
  19.     DECLARE_DYNCREATE(CPserv2View)
  20.  
  21. // Attributes
  22. public:
  23.     CPserv2Doc* GetDocument();
  24.     static BOOL KillProcess(DWORD dwProcessID);
  25.  
  26. // Operations
  27. public:
  28.  
  29. // Overrides
  30.     // ClassWizard generated virtual function overrides
  31.     //{{AFX_VIRTUAL(CPserv2View)
  32.     public:
  33.     virtual void OnDraw(CDC* pDC);  // overridden to draw this view
  34.     virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
  35.     protected:
  36.     virtual void OnInitialUpdate(); // called first time after construct
  37.     virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
  38.     virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
  39.     virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
  40.     virtual void OnPrint(CDC* pDC, CPrintInfo* pInfo);
  41.     virtual void OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint);
  42.     //}}AFX_VIRTUAL
  43.  
  44. // Implementation
  45. public:
  46.     virtual ~CPserv2View();
  47. #ifdef _DEBUG
  48.     virtual void AssertValid() const;
  49.     virtual void Dump(CDumpContext& dc) const;
  50. #endif
  51.  
  52. protected:
  53.     CListViewEntries* m_pEntries;
  54.     CObArray* m_pServices;
  55.     int m_nCurrentIndex;
  56.     CFont m_Font;
  57.     int m_nPointSize;
  58.     CPoint m_LastPoint;
  59.     int m_nPrintServiceIndex;
  60.     DWORD m_dwNumberOfColumns;
  61.     BOOL m_bAnythingHasBeenDisplayed;
  62.     BOOL m_bInsideAutoResize;
  63.  
  64.     void DisplayAllItems(CListViewEntry* pSelect = NULL);
  65.     CListViewEntry* GetCurrentEntry();
  66.     CService* GetCurrentService()
  67.     {
  68.         return (CService*) GetCurrentEntry();
  69.     }
  70.     int GetSelectedIndices(CUIntArray& listOfIndices);
  71.     int GetFirstSelectedIndex();
  72.     void UpdateCurrentService();
  73.     void OnObjectControl(BEGINSTATFN begin, QUERYSTATEFN query, LPCTSTR lpszAction);
  74.     void OnSetObjectsStartType(SETSTARTTYPEFN lpfn, LPCTSTR lpszAction);
  75.  
  76. // Generated message map functions
  77. protected:
  78.     CSearchContext m_SearchContext;
  79.     //{{AFX_MSG(CPserv2View)
  80.     afx_msg void OnCustomDraw(NMHDR* pNMHDR, LRESULT* pResult);
  81.     afx_msg void OnColumnclick(NMHDR* pNMHDR, LRESULT* pResult);
  82.     afx_msg void OnObjectStop();
  83.     afx_msg void OnObjectStart();
  84.     afx_msg void OnObjectRestart();
  85.     afx_msg void OnViewRefresh();
  86.     afx_msg void OnObjectPause();
  87.     afx_msg void OnObjectContinue();
  88.     afx_msg BOOL OnMouseWheel(UINT nFlags, short zDelta, CPoint pt);
  89.     afx_msg void OnUpdateObjectStop(CCmdUI* pCmdUI);
  90.     afx_msg void OnUpdateObjectStart(CCmdUI* pCmdUI);
  91.     afx_msg void OnUpdateObjectRestart(CCmdUI* pCmdUI);
  92.     afx_msg void OnUpdateObjectPause(CCmdUI* pCmdUI);
  93.     afx_msg void OnUpdateObjectContinue(CCmdUI* pCmdUI);
  94.     afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
  95.     afx_msg void OnDoubleClickItem(NMHDR* pNMHDR, LRESULT* pResult);
  96.     afx_msg void OnObjectStartOrContinue();
  97.     afx_msg void OnUpdateObjectStartOrContinue(CCmdUI* pCmdUI);
  98.     afx_msg void OnGetInfoTip(NMHDR* pNMHDR, LRESULT* pResult);
  99.     afx_msg void OnMouseMove(UINT nFlags, CPoint point);
  100.     afx_msg void OnConnectToLocalMachine();
  101.     afx_msg void OnConnectToRemoteMachine();
  102.     afx_msg void OnOptionsFont();
  103.     afx_msg void OnObjectProperties();
  104.     afx_msg void OnViewFind();
  105.     afx_msg void OnViewFindNext();
  106.     afx_msg void OnObjectEnable();
  107.     afx_msg void OnUpdateObjectEnable(CCmdUI* pCmdUI);
  108.     afx_msg void OnObjectDisable();
  109.     afx_msg void OnUpdateObjectDisable(CCmdUI* pCmdUI);
  110.     afx_msg void OnObjectStartAutomatically();
  111.     afx_msg void OnUpdateObjectStartAutomatically(CCmdUI* pCmdUI);
  112.     afx_msg void OnUpdateObjectProperties(CCmdUI* pCmdUI);
  113.     afx_msg void OnObjectInstall();
  114.     afx_msg void OnObjectDelete();
  115.     afx_msg void OnUpdateObjectDelete(CCmdUI* pCmdUI);
  116.     afx_msg void OnUpdateObjectKillprocess(CCmdUI* pCmdUI);
  117.     afx_msg void OnObjectKillprocess();
  118.     afx_msg void OnHeaderItemChanged(NMHDR* pNMHDR, LRESULT* pResult);
  119.     afx_msg void OnUpdateFilePrintPreview(CCmdUI* pCmdUI);
  120.     afx_msg void OnUpdateFilePrint(CCmdUI* pCmdUI);
  121.     afx_msg void OnUpdateObjectInstall(CCmdUI* pCmdUI);
  122.     afx_msg void OnUpdateDisplayExportAsxml(CCmdUI* pCmdUI);
  123.     afx_msg void OnUpdateTemplatesApply(CCmdUI* pCmdUI);
  124.     afx_msg void OnOptionsAutoresizeallcolumns();
  125.     afx_msg void OnViewChoosecolumns();
  126.     //}}AFX_MSG
  127.     DECLARE_MESSAGE_MAP()
  128. };
  129.  
  130. #ifndef _DEBUG  // debug version in pserv2View.cpp
  131. inline CPserv2Doc* CPserv2View::GetDocument()
  132.    { return (CPserv2Doc*)m_pDocument; }
  133. #endif
  134.  
  135. /////////////////////////////////////////////////////////////////////////////
  136.  
  137. //{{AFX_INSERT_LOCATION}}
  138. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  139.  
  140. #endif // !defined(AFX_PSERV2VIEW_H__FA4F3738_2872_4C02_85DA_6C647D5D4415__INCLUDED_)
  141.