home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / addins / wins / dlgwinmgr.h < prev    next >
C/C++ Source or Header  |  1998-04-08  |  3KB  |  102 lines

  1. #if !defined(AFX_DLGWINMGR_H__C1AC212C_8ABF_11D1_B145_000000000000__INCLUDED_)
  2. #define AFX_DLGWINMGR_H__C1AC212C_8ABF_11D1_B145_000000000000__INCLUDED_
  3.  
  4. #if _MSC_VER > 1000
  5. #pragma once
  6. #endif // _MSC_VER > 1000
  7. // DlgWinMgr.h : header file
  8. //
  9.  
  10. #include "MyListCtrl.h"
  11. #include "dirlist.h"
  12. #include "resource.h"
  13. #include "winsapp.h"
  14.  
  15.  
  16. enum {
  17.     COL_FILENAME = 0,
  18.     COL_TIME,
  19.     COL_EXT,
  20.     COL_DIRNAME,
  21.     COL_SIZE,
  22.     COL_DEBUGSIZE,
  23. };
  24.  
  25.  
  26. /////////////////////////////////////////////////////////////////////////////
  27. // CDlgWinMgr dialog
  28.  
  29. class CWindowsList; // FORWARD
  30.  
  31. class CDlgWinMgr : public CDialog
  32. {
  33. // Construction
  34. public:
  35.     void DoClear();
  36.     void SetButtonStates();
  37.     int FillList();
  38.     void SetVars(BOOL fAutoVis, BOOL fAutoDir, BOOL fAutoSize, int iSortedCol, long lSize);
  39.     void GetVars(BOOL& fAutoVis, BOOL& fAutoDir, BOOL& fAutoSize, int& iSortedCol, long& lSize);
  40.     void SetDirList(CDirList* pList, CWindowsList *pWndList);
  41.     virtual BOOL PreTranslateMessage(MSG* pMsg);
  42.     CDlgWinMgr(CWnd* pParent = NULL);   // standard constructor
  43.  
  44.     static int CALLBACK MySort(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort);
  45.     static void CALLBACK OnListClick(NMHDR *pNMHDR, LRESULT *pResult, LPARAM lParam);
  46.     static void CALLBACK OnListDblClick(NMHDR *pNMHDR, LRESULT *pResult, LPARAM lParam);
  47.     static void CALLBACK OnColClick(NMHDR *pNMHDR, LRESULT *pResult, LPARAM lParam, SortInfo *pSortInfo);
  48.  
  49. // Dialog Data
  50.     //{{AFX_DATA(CDlgWinMgr)
  51.     enum { IDD = IDD_DLGWINMGR };
  52.     CButton    m_ctlSelectAll;
  53.     CButton    m_ctlRefresh;
  54.     CButton    m_ctlOpen;
  55.     CButton    m_ctlMakeList;
  56.     CButton    m_ctlLoad;
  57.     CButton    m_ctlInvert;
  58.     CButton    m_ctlClose;
  59.     CMyListCtrl    m_ctlListWinMgr;
  60.     BOOL    m_fAutoDir;
  61.     BOOL    m_fAutoSize;
  62.     BOOL    m_fAutoVis;
  63.     //}}AFX_DATA
  64.     int m_iSortedCol;
  65.     long m_lSize;
  66.  
  67. // Overrides
  68.     // ClassWizard generated virtual function overrides
  69.     //{{AFX_VIRTUAL(CDlgWinMgr)
  70.     protected:
  71.     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  72.     //}}AFX_VIRTUAL
  73.  
  74. // Implementation
  75. protected:
  76.     CToolTipCtrl m_tooltip;
  77.     CWindowsList * m_pWndList;
  78.     CDirList *m_pdirList;
  79.     TCHAR m_szToolTipBuffer[256];
  80.  
  81.     // Generated message map functions
  82.     //{{AFX_MSG(CDlgWinMgr)
  83.     virtual BOOL OnInitDialog();
  84.     afx_msg void OnButtonclose();
  85.     afx_msg void OnButtoninvertsel();
  86.     afx_msg void OnButtonopen();
  87.     afx_msg void OnButtonselectall();
  88.     afx_msg void OnButtonmakelist();
  89.     afx_msg void OnButtonloadlist();
  90.     afx_msg void OnButtonrefresh();
  91.     afx_msg void OnButtonminwins();
  92.     afx_msg void OnButtonclear();
  93.     afx_msg void OnNotify( NMHDR * pNotifyStruct, LRESULT * result );
  94.     //}}AFX_MSG
  95.     DECLARE_MESSAGE_MAP()
  96. };
  97.  
  98. //{{AFX_INSERT_LOCATION}}
  99. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  100.  
  101. #endif // !defined(AFX_DLGWINMGR_H__C1AC212C_8ABF_11D1_B145_000000000000__INCLUDED_)
  102.