home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / winui / shell / regview / infotip.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-08-27  |  2.0 KB  |  75 lines

  1. /**************************************************************************
  2.    THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
  3.    ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
  4.    THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
  5.    PARTICULAR PURPOSE.
  6.  
  7.    Copyright 1997 Microsoft Corporation.  All Rights Reserved.
  8. **************************************************************************/
  9.  
  10. /**************************************************************************
  11.  
  12.    File:          InfoTip.h
  13.    
  14.    Description:   CQueryInfo definitions.
  15.  
  16. **************************************************************************/
  17.  
  18. #include <windows.h>
  19. #include <shlobj.h>
  20.  
  21. #if (_WIN32_IE < 0x0400)
  22. #define CQueryInfo  IUnknown
  23.  
  24. #else //(_WIN32_IE >= 0x0400)
  25.  
  26. #ifndef INFOTIP_H
  27. #define INFOTIP_H
  28.  
  29. /**************************************************************************
  30.    #include statements
  31. **************************************************************************/
  32.  
  33. #include "PidlMgr.h"
  34.  
  35. /**************************************************************************
  36.    global variables
  37. **************************************************************************/
  38.  
  39. extern HINSTANCE  g_hInst;
  40. extern UINT       g_DllRefCount;
  41.  
  42. /**************************************************************************
  43.  
  44.    CQueryInfo class definition
  45.  
  46. **************************************************************************/
  47.  
  48. class CQueryInfo : public IQueryInfo
  49. {
  50. protected:
  51.    DWORD m_ObjRefCount;
  52.  
  53. public:
  54.    CQueryInfo(LPCITEMIDLIST);
  55.    ~CQueryInfo();
  56.  
  57.    //IUnknown methods
  58.    STDMETHOD (QueryInterface) (REFIID riid, LPVOID * ppvObj);
  59.    STDMETHOD_ (ULONG, AddRef) (void);
  60.    STDMETHOD_ (ULONG, Release) (void);
  61.  
  62.    //IQueryInfo methods
  63.    STDMETHOD(GetInfoTip)(DWORD dwFlags, WCHAR **ppwszTip);
  64.    STDMETHOD(GetInfoFlags)(LPDWORD pdwFlags);
  65.  
  66. private:
  67.     LPITEMIDLIST m_pidl;
  68.     LPMALLOC m_pMalloc;
  69.    LPPIDLMGR m_pPidlMgr;
  70. };
  71.  
  72. #endif   //INFOTIP_H
  73.  
  74. #endif   //(_WIN32_IE >= 0x0400)
  75.