www.pudn.com > CapIT_src.zip > CapITDoc.h


// CapITDoc.h : interface of the CCapITDoc class 
// 
///////////////////////////////////////////////////////////////////////////// 
 
#if !defined(AFX_CAPITDOC_H__CA8E7EC0_8563_488F_80D7_04DA78F3C8BA__INCLUDED_) 
#define AFX_CAPITDOC_H__CA8E7EC0_8563_488F_80D7_04DA78F3C8BA__INCLUDED_ 
 
#if _MSC_VER > 1000 
#pragma once 
#endif // _MSC_VER > 1000 
 
 
#define PW_WINDOW        1  
#define PW_CLIENT        2  
 
#define HDIB HANDLE  
 
#define DIB_HEADER_MARKER   ((WORD) ('M' << 8) | 'B')  
 
#define WIDTHBYTES(bits)    (((bits) + 31) / 32 * 4)  
 
#define RECTWIDTH(lpRect)     ((lpRect)->right - (lpRect)->left)  
#define RECTHEIGHT(lpRect)    ((lpRect)->bottom - (lpRect)->top)  
 
 /* Error constants */  
 enum {        
 ERR_MIN = 0,                     // All error #s >= this value        
 ERR_NOT_DIB = 0,                 // Tried to load a file, NOT a DIB!        
 ERR_MEMORY,                      // Not enough memory!        
 ERR_READ,                        // Error reading file!        
 ERR_LOCK,                        // Error on a GlobalLock()!        
 ERR_OPEN,                        // Error opening a file!        
 ERR_CREATEPAL,                   // Error creating palette.        
 ERR_GETDC,                       // Couldn't get a DC.        
 ERR_CREATEDDB,                   // Error create a DDB.        
 ERR_STRETCHBLT,                  // StretchBlt() returned failure.        
 ERR_STRETCHDIBITS,               // StretchDIBits() returned failure.        
 ERR_SETDIBITSTODEVICE,           // SetDIBitsToDevice() failed.        
 ERR_STARTDOC,                    // Error calling StartDoc().        
 ERR_NOGDIMODULE,                 // Couldn't find GDI module in memory.        
 ERR_SETABORTPROC,                // Error calling SetAbortProc().        
 ERR_STARTPAGE,                   // Error calling StartPage().        
 ERR_NEWFRAME,                    // Error calling NEWFRAME escape.        
 ERR_ENDPAGE,                     // Error calling EndPage().        
 ERR_ENDDOC,                      // Error calling EndDoc().        
 ERR_SETDIBITS,                   // Error calling SetDIBits().        
 ERR_FILENOTFOUND,                // Error opening file in GetDib()        
 ERR_INVALIDHANDLE,               // Invalid Handle        
 ERR_DIBFUNCTION,                 // Error on call to DIB function        
 ERR_MAX                          // All error #s < this value       
  
 };    
 
class CCapITDoc : public CDocument 
{ 
protected: // create from serialization only 
	CCapITDoc(); 
	DECLARE_DYNCREATE(CCapITDoc) 
 
// Attributes 
public: 
 
// Operations 
public: 
 
// Overrides 
	// ClassWizard generated virtual function overrides 
	//{{AFX_VIRTUAL(CCapITDoc) 
	public: 
	virtual BOOL OnNewDocument(); 
	virtual void Serialize(CArchive& ar); 
	//}}AFX_VIRTUAL 
 
// Implementation 
public: 
 
	virtual ~CCapITDoc(); 
#ifdef _DEBUG 
	virtual void AssertValid() const; 
	virtual void Dump(CDumpContext& dc) const; 
#endif 
 
protected: 
 
// Generated message map functions 
protected: 
	//{{AFX_MSG(CCapITDoc) 
		// NOTE - the ClassWizard will add and remove member functions here. 
		//    DO NOT EDIT what you see in these blocks of generated code ! 
	//}}AFX_MSG 
	DECLARE_MESSAGE_MAP() 
}; 
 
///////////////////////////////////////////////////////////////////////////// 
 
//{{AFX_INSERT_LOCATION}} 
// Microsoft Visual C++ will insert additional declarations immediately before the previous line. 
 
#endif // !defined(AFX_CAPITDOC_H__CA8E7EC0_8563_488F_80D7_04DA78F3C8BA__INCLUDED_)