proppgs.h
Upload User: caisha3
Upload Date: 2013-09-21
Package Size: 208739k
Code Size: 2k
Category:

Windows Develop

Development Platform:

Visual C++

  1. //\//\//\//\//\//\//\//\//\//\//\//\//\//\//\//\//\//\//\//\
  2. //
  3. // proppgs.h 
  4. //
  5. //   IShellPropSheetExt menu interface for items.
  6. //
  7. //   History:
  8. //
  9. //       3/26/97  edwardp   Created.
  10. //
  11. ////////////////////////////////////////////////////////////////////////////////
  12. //
  13. // Check for previous includes of this file.
  14. //
  15. #ifndef _PROPPGS_H_
  16. #define _PROPPGS_H_
  17. //
  18. // Class definition for the item context menu class.
  19. //
  20. class CPropertyPages : public IShellPropSheetExt,
  21.                        public IShellExtInit
  22. {
  23. //
  24. // Methods
  25. //
  26. public:
  27.     // Constructor
  28.     CPropertyPages(void);
  29.     // IUnknown
  30.     STDMETHODIMP         QueryInterface(REFIID, void **);
  31.     STDMETHODIMP_(ULONG) AddRef(void);
  32.     STDMETHODIMP_(ULONG) Release(void);
  33.     // IShellPropSheetExt
  34.     STDMETHODIMP AddPages(LPFNADDPROPSHEETPAGE lpfnAddPage, LPARAM lParam);
  35.     STDMETHODIMP ReplacePage(UINT uPageID, LPFNADDPROPSHEETPAGE lpfnAddPage,
  36.                              LPARAM lParam);
  37.     
  38.     // IShellExtInit
  39.     STDMETHODIMP Initialize(LPCITEMIDLIST pidl, LPDATAOBJECT pdobj, HKEY hkey);
  40. private:
  41.     // Destructor.
  42.     ~CPropertyPages(void);
  43.     // Helper functions.
  44.     BOOL OnInitDialog(HWND hdlg);
  45.     BOOL OnCommand(HWND hdlg, WORD wNotifyCode, WORD wID, HWND hwndCtl);
  46.     BOOL OnNotify(HWND hdlg, WPARAM idCtrl, LPNMHDR pnmh);
  47.     void OnDestroy(HWND hdlg);
  48.     void ShowOfflineSummary(HWND hdlg, BOOL bShow);
  49.     void AddRemoveSubsPages(HWND hdlg, BOOL bAdd);
  50.     HRESULT InitializeSubsMgr2();
  51.     static INT_PTR PropSheetDlgProc(HWND hdlg, UINT msg, WPARAM wParam, LPARAM lParam);
  52.     static UINT PropSheetCallback(HWND hwnd, UINT uMsg, LPPROPSHEETPAGE ppsp);
  53.     inline static CPropertyPages *GetThis(HWND hdlg)
  54.     {
  55.         CPropertyPages *pThis = (CPropertyPages*) GetWindowLongPtr(hdlg, DWLP_USER);
  56.         ASSERT(NULL != pThis);
  57.         return pThis;
  58.     }
  59. //
  60. // Member variables.
  61. //
  62. private:
  63.     ULONG               m_cRef;
  64.     ISubscriptionMgr2*  m_pSubscriptionMgr2;
  65.     IDataObject*        m_pInitDataObject;
  66.     TCHAR               m_szPath[MAX_PATH];
  67.     TCHAR               m_szURL[INTERNET_MAX_URL_LENGTH];
  68.     WORD                m_wHotkey;
  69.     BOOL                m_bStartSubscribed;
  70. };
  71. #endif // _PROPPGS_H_