home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / mfc / ole / wordpad / key.h < prev    next >
C/C++ Source or Header  |  1998-03-26  |  1KB  |  41 lines

  1. // key.h : header file
  2. //
  3. // This is a part of the Microsoft Foundation Classes C++ library.
  4. // Copyright (C) 1992-1998 Microsoft Corporation
  5. // All rights reserved.
  6. //
  7. // This source code is only intended as a supplement to the
  8. // Microsoft Foundation Classes Reference and related
  9. // electronic documentation provided with the library.
  10. // See these sources for detailed information regarding the
  11. // Microsoft Foundation Classes product.
  12.  
  13. /////////////////////////////////////////////////////////////////////////////
  14. // CKey
  15.  
  16. class CKey
  17. {
  18. public:
  19.     CKey() {m_hKey = NULL;}
  20.     ~CKey() {Close();}
  21.  
  22. // Attributes
  23. public:
  24.     HKEY m_hKey;
  25.     BOOL SetStringValue(LPCTSTR lpszValue, LPCTSTR lpszValueName = NULL);
  26.     BOOL GetStringValue(CString& str, LPCTSTR lpszValueName = NULL);
  27.  
  28. // Operations
  29. public:
  30.     BOOL Create(HKEY hKey, LPCTSTR lpszKeyName);
  31.     BOOL Open(HKEY hKey, LPCTSTR lpszKeyName);
  32.     void Close();
  33.  
  34. // Overrides
  35.  
  36. // Implementation
  37. protected:
  38. };
  39.  
  40. /////////////////////////////////////////////////////////////////////////////
  41.