home *** CD-ROM | disk | FTP | other *** search
/ PC Press 1997 July / Sezamfile97_2.iso / windows / program / activex / axtsamp.exe / TSBRANCH.EXE / STOCLIEN / PAPFILE.H < prev    next >
C/C++ Source or Header  |  1996-12-29  |  3KB  |  77 lines

  1. /*+==========================================================================
  2.   File:      PAPFILE.H
  3.  
  4.   Summary:   Include file for the application's paper data file related
  5.              classes. Declares the CPapFile C++ class. A CPapFile is a C++
  6.              object that encapsulates load and save operations on a
  7.              structured storage compound file.  CPapFile knows about an
  8.              underlying server-based COM object, COPaper, that manages the
  9.              actual paper drawing data and uses an IStorage provided
  10.              to store and retrieve that paper drawing data.
  11.  
  12.              For a comprehensive tutorial code tour of PAPFILE's contents
  13.              and offerings see the tutorial STOCLIEN.HTM file. For
  14.              more specific technical details on the internal workings see
  15.              the comments dispersed throughout the PAPFILE source code.
  16.  
  17.   Classes:   CPapFile.
  18.  
  19.   Origin:    6-13-96: atrent - Created for STOCLIEN Code Sample.
  20.  
  21. ----------------------------------------------------------------------------
  22.   This file is part of the Microsoft ActiveX Tutorial Code Samples.
  23.  
  24.   Copyright (C) Microsoft Corporation, 1997.  All rights reserved.
  25.  
  26.   This source code is intended only as a supplement to Microsoft
  27.   Development Tools and/or on-line documentation.  See these other
  28.   materials for detailed information regarding Microsoft code samples.
  29.  
  30.   THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
  31.   KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
  32.   IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
  33.   PARTICULAR PURPOSE.
  34. ==========================================================================+*/
  35.  
  36. #if !defined(PAPFILE_H)
  37. #define PAPFILE_H
  38.  
  39. #if defined(__cplusplus)
  40.  
  41.  
  42. /*C+C+++C+++C+++C+++C+++C+++C+++C+++C+++C+++C+++C+++C+++C+++C+++C+++C+++C+++C
  43.   Class:    CPapFile
  44.  
  45.   Summary:  Class to encapsulate the paper data compound file.
  46.  
  47.   Methods:  CPapFile
  48.               Constructor.
  49.             ~CPapFile
  50.               Destructor.
  51.             HRESULT Init(TCHAR* pszFileName, IPaper* pIPaper);
  52.               Initialize CPapFile.
  53.             HRESULT Load(SHORT nLockKey, TCHAR* pszFileName);
  54.               Load default paper data file or a specified paper data file.
  55.             HRESULT Save(SHORT nLockKey, TCHAR* pszFileName);
  56.               Save drawing data to the current paper data file.
  57. C---C---C---C---C---C---C---C---C---C---C---C---C---C---C---C---C---C---C-C*/
  58. class CPapFile
  59. {
  60.   public:
  61.     CPapFile(void);
  62.     ~CPapFile(void);
  63.     HRESULT Init(TCHAR* pszFileName, IPaper* pIPaper);
  64.     HRESULT Load(SHORT nLockKey, TCHAR* pszFileName);
  65.     HRESULT Save(SHORT nLockKey, TCHAR* pszFileName);
  66.  
  67.   private:
  68.     TCHAR          m_szCurFileName[MAX_PATH];
  69.     IPaper*        m_pIPaper;
  70.     IStorage*      m_pIStorage;
  71. };
  72.  
  73.  
  74. #endif // __cplusplus
  75.  
  76. #endif
  77.