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

  1. /*
  2.  -  P R O P V U . H
  3.  -  Copyright (C) 1995 Microsoft Corporation
  4.  -
  5.  *  Purpose:
  6.  *      Header for PROPVU.CPP property viewer dll
  7.  *
  8.  */
  9.  
  10. #ifndef __PROPVU_H__
  11. #define __PROPVU_H__
  12.  
  13. /******************** Utility/Tool Function Prototypes ***************/
  14.  
  15.  
  16. /******************** Application Defines ****************************/
  17.  
  18. // listbox sizes
  19.  
  20. #define PROP_LISTBOX_HORIZONTAL_SIZE    2000
  21. #define PROP_LISTBOX_TAB1_SIZE          120
  22. #define PROP_LISTBOX_TAB2_SIZE          185
  23. #define MAPILOG_LISTBOX_TAB1_SIZE       90
  24.  
  25. // Message Box Styles 
  26.  
  27. #define MBS_ERROR                       (MB_ICONSTOP | MB_OK )
  28. #define MBS_INFO                        (MB_ICONINFORMATION | MB_OK)
  29. #define MBS_OOPS                        (MB_ICONEXCLAMATION | MB_OK)
  30.  
  31. #define MAX_LOG_BUFF                    4096 // for displaying PT_BINARY
  32. #define MAX_SET_PROPS                   500 // maximum number of propvals in setprops
  33.         
  34. /******************** Class Definitions ******************************/
  35.  
  36. /*********************************************************************/
  37. /*
  38.  -  CGetError
  39.  -
  40.  *  Purpose:
  41.  *      Defines the methods to Get Error Strings.
  42.  *
  43.  */
  44. /*********************************************************************/
  45.  
  46. class CGetError
  47. {
  48.     private:
  49.         char    m_szMessage[80];
  50.         char    m_szResult[80];
  51.         char    m_szBuffer[80];
  52.  
  53.     public:
  54.         CGetError()
  55.         {
  56.             m_szMessage[0]  = '\0';
  57.             m_szResult[0]   = '\0';
  58.         };
  59.  
  60.         ~CGetError() { };           
  61.  
  62. #ifdef WIN16
  63.         LPSTR SzError( LPSTR, HRESULT );
  64. #endif        
  65.         LPSTR SzError( LPSTR, SCODE );
  66. };
  67.  
  68.  
  69. /*********************************************************************/
  70. /*
  71.  -  CPropDlg Class
  72.  -
  73.  *  Purpose:
  74.  */
  75. /*********************************************************************/
  76.  
  77. class CPropDlg : public CDialog
  78. {
  79. protected:
  80.  
  81.     void OnType();  
  82.     void OnID();
  83.     void OnData();  
  84.     void OnString();   
  85.     void OnHex();
  86.     void OnDecimal();    
  87.     void RedrawPropTable();             
  88.     void ResetPropButtons();          
  89.  
  90. public:
  91.     LPMAPIPROP  m_lpEntry;   
  92.     CString     m_CurrentProp;
  93.     HRESULT     m_hResult;
  94.     ULONG       m_ulRefCount;
  95.  
  96.     LPVOID      m_lpvDestObj;
  97.  
  98.     CPropDlg(   CString     PropName,
  99.                 LPMAPIPROP  *lppEntry,
  100.                 LPVOID      lpvDest,
  101.                 HWND        hWnd)
  102.             : CDialog(PROPVIEW,  NULL) 
  103.         {
  104.             m_lpvDestObj    = lpvDest;
  105.             m_lpEntry       = *lppEntry;
  106.                     
  107.             m_CurrentProp   = PropName;            
  108.             // prevent user from Releasing on first instance 
  109.             //   AddRef will affect this, as will subsequent Releases
  110.             m_ulRefCount    = 1;
  111.  
  112.             if( ! Create(PROPVIEW,NULL) )         // create dialog here
  113.             {
  114.                 MessageBox("CreateDialog PropVu Failed","Client",MBS_ERROR);           
  115.                 delete this;
  116.             }
  117.         }
  118.     
  119.     ~CPropDlg() { Cleanup();  }
  120.  
  121.     BOOL OnInitDialog();
  122.     void Stub();                        // generic NYI message
  123.     void OnClearMapiLog();
  124.     void OnStorePropValsToFile();
  125.     void OnCancel();
  126.     void Cleanup();
  127.     
  128.     // PROPERTY OPERATIONS    
  129.     void OnAddRef();
  130.     void OnCopyTo();
  131.     void OnDeleteProps();
  132.     void OnGetIDsFromNames();
  133.     void OnGetLastError();
  134.     void OnGetNamesFromIDs();
  135.     void OnGetProps();
  136.     void OnGetPropList();
  137.     void OnOpenProperty();
  138.     void OnQueryInterface();
  139.     void OnRelease();    
  140.     void OnSaveChanges();                   
  141.     void OnSetProps();
  142.     void OnCopyProps();
  143.     
  144.     DECLARE_MESSAGE_MAP();
  145.         
  146. };
  147.  
  148.  
  149. /*********************************************************************/
  150. /*
  151.  -  CStorePropValDlg Class
  152.  -
  153.  *  Purpose:
  154.  *      Defines the controls for the GetPropList Property Dialog
  155.  *
  156.  */
  157. /*********************************************************************/
  158.  
  159. class CStorePropValDlg : public CModalDialog
  160. {
  161. public:
  162.     CString m_TagID;
  163.     CString m_FileName;
  164.  
  165.     char    m_szTagID[80];
  166.     char    m_szFileName[80];
  167.     ULONG   m_ulFlags;
  168.     
  169.     CStorePropValDlg(CWnd  *pParentWnd)
  170.         : CModalDialog(STOREPROP, pParentWnd)
  171.     {
  172.         m_ulFlags = 0;
  173.     }
  174.  
  175.     ~CStorePropValDlg();    
  176.  
  177.     BOOL OnInitDialog();
  178.  
  179.     void OnOK();
  180.     void OnDumpBinary();
  181.  
  182.     DECLARE_MESSAGE_MAP();
  183.  
  184. };
  185.  
  186. #endif  /* __PROPVU_H__ */
  187.