home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / sdk / mapi / win16 / dev / abview / tbllist.h < prev   
Encoding:
C/C++ Source or Header  |  1995-07-11  |  1.9 KB  |  96 lines

  1. /*
  2.  -  T B L L I S T . H
  3.  -  Copyright (C) 1995 Microsoft Corporation
  4.  *
  5.  */
  6.  
  7. #ifndef __TBLLIST_H__
  8. #define __TBLLIST_H__
  9.  
  10. #define INDENT   10
  11. #define BMHEIGHT 16
  12. #define BMWIDTH  20
  13. #define BMCOUNT  5
  14.  
  15. #define fRoot                   ((ULONG) 0x00000001)
  16. #define fHierarchy              ((ULONG) 0x00000002)
  17. #define fContents               ((ULONG) 0x00000004)
  18.  
  19. /*
  20.  *  Static properties
  21.  */
  22. static const SizedSPropTagArray(6, ABHN_PropTagArray) =
  23. {
  24.     6,
  25.     {
  26.         PR_DISPLAY_NAME,
  27.         PR_ENTRYID,
  28.         PR_OBJECT_TYPE,
  29.         PR_DISPLAY_TYPE,
  30.         PR_DEPTH,
  31.         PR_CONTAINER_FLAGS
  32.     }
  33. };
  34.  
  35.  
  36. static const SizedSPropTagArray(6, ABHW_PropTagArray) =
  37. {
  38.     6,
  39.     {
  40.         PR_DISPLAY_NAME_W,
  41.         PR_ENTRYID,
  42.         PR_OBJECT_TYPE,
  43.         PR_DISPLAY_TYPE,
  44.         PR_DEPTH,
  45.         PR_CONTAINER_FLAGS
  46.     }
  47. };
  48.  
  49.  
  50. /*
  51.  -  CTblList
  52.  -
  53.  *  Purpose:
  54.  *      Defines the ListBox for Open Directory
  55.  *
  56.  *
  57.  */
  58.  
  59.  
  60. class CTblList : public CListBox
  61. {
  62. protected:
  63.     int             m_nPageSize;
  64.     CBitmap*        m_lpbBitmap;         
  65.  
  66. private:
  67.     afx_msg void    OnVScroll( UINT, UINT, CScrollBar * );
  68.     afx_msg void    OnKeyDown( UINT, UINT, UINT );
  69.     
  70.             void    VScroll( short );
  71.             int     GetPageSize();
  72.     
  73. public:
  74.                     CTblList( UINT, LPMAPITABLE, ULONG );
  75.                     ~CTblList();
  76.             void    InitListBox();
  77.     
  78.     UINT            m_nIDTemplate;
  79.     LPMAPITABLE     m_lpMAPITable;
  80.     ULONG           m_ulCurrentTableType;
  81.     ULONG           m_ulCount;
  82.  
  83.             int     DeleteString(UINT);
  84.  
  85. // Implementation
  86.     virtual void    MeasureItem(LPMEASUREITEMSTRUCT lpMIS);
  87.     virtual void    DrawItem(LPDRAWITEMSTRUCT lpDIS);
  88.     virtual int     CompareItem(LPCOMPAREITEMSTRUCT lpCIS);
  89.     virtual void    DeleteItem(LPDELETEITEMSTRUCT);
  90.  
  91.     DECLARE_MESSAGE_MAP();
  92.     
  93. };
  94.  
  95. #endif  /* __TBLLIST_H__ */
  96.