home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 September / Chip_2002-09_cd1.bin / zkuste / vbasic / Data / Utils / XZipComp.exe / XceedEncoding.Cab / F112928_MemoryEncodeDlg.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-05-10  |  3.5 KB  |  110 lines

  1. // Xceed Binary Encoding Library - Memory Encode sample
  2. // Copyright (c) 2001 Xceed Software Inc.
  3. //
  4. // [MemoryEncodeDlg.h]
  5. //
  6. // This form module contains the main form's code. It demonstrates how to
  7. // encode a chunk of memory data using different kinds of encoding methods,
  8. // and decode an encoded memory data. It specifically uses:
  9. //  - The Encode and Decode method.
  10. //  - The ContinueOnInvalidData, IncludeHeaderFooter, EndOfLineType, MaxLineLength,
  11. //    HeaderDataForkLength, HeaderResourceForkLength and EncodingFormat propeties.
  12. //
  13. // This file is part of the Xceed Binary Encoding Library sample applications.
  14. // The source code in this file is only intended as a supplement to Xceed
  15. // Binary Encoding Library's documentation, and is provided "as is", without
  16. // warranty of any kind, either expressed or implied.
  17.  
  18. #if !defined(AFX_MEMORYENCODEDLG_H__56170D64_79FA_432E_AB62_1CF8342F2B91__INCLUDED_)
  19. #define AFX_MEMORYENCODEDLG_H__56170D64_79FA_432E_AB62_1CF8342F2B91__INCLUDED_
  20.  
  21. #if _MSC_VER > 1000
  22. #pragma once
  23. #endif // _MSC_VER > 1000
  24.  
  25. //Here we include the xceedben.h containing the wrapper classes generated
  26. //by Visual C++ / MFC when we added a class from the xceedben.dll type 
  27. //library in the Class Wizard
  28. #include "xceedben.h"
  29.  
  30. /////////////////////////////////////////////////////////////////////////////
  31. // CMemoryEncodeDlg dialog
  32.  
  33. class CMemoryEncodeDlg : public CDialog
  34. {
  35. // Construction
  36. public:
  37.     CMemoryEncodeDlg(CWnd* pParent = NULL);    // standard constructor
  38.  
  39. // Dialog Data
  40.     //{{AFX_DATA(CMemoryEncodeDlg)
  41.     enum { IDD = IDD_MEMORYENCODE_DIALOG };
  42.     int        m_lEncodingMethod;
  43.     int        m_lEOLType;
  44.     CComboBox    m_cboEOLType;
  45.     CComboBox    m_cboEncodingMethod;
  46.     long    m_lMaxLineLength;
  47.     CString    m_sDecodedText;
  48.     CString    m_sEncodedText;
  49.     CString    m_sDecodedSize;
  50.     CString    m_sEncodedSize;
  51.     //}}AFX_DATA
  52.   //TODO Move above the previous line
  53.  
  54.     // ClassWizard generated virtual function overrides
  55.     //{{AFX_VIRTUAL(CMemoryEncodeDlg)
  56.     protected:
  57.     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  58.     //}}AFX_VIRTUAL
  59.  
  60. // Implementation
  61. protected:
  62.     HICON m_hIcon;
  63.  
  64.     // Generated message map functions
  65.     //{{AFX_MSG(CMemoryEncodeDlg)
  66.     virtual BOOL OnInitDialog();
  67.     afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
  68.     afx_msg void OnPaint();
  69.     afx_msg HCURSOR OnQueryDragIcon();
  70.     afx_msg void OnCmdEncode();
  71.     afx_msg void OnQuit();
  72.     afx_msg void OnChangeTxtDecodedtext();
  73.     afx_msg void OnChangeTxtEncodedtext();
  74.     afx_msg void OnSetfocusTxtDecodedtext();
  75.     afx_msg void OnSetfocusTxtEncodedtext();
  76.     afx_msg void OnCmdDecode();
  77.     //}}AFX_MSG
  78.     DECLARE_MESSAGE_MAP()
  79.  
  80.   //The different encoding methods that will serve to populate the combo box
  81.   enum enuEncodingMethod
  82.   {
  83.     emUUEncode = 0,
  84.     emXXEncode = 1,
  85.     emHexadecimal = 2,
  86.     emBase64 = 3,
  87.     emQuoted = 4,
  88.     emBinHex = 5,
  89.   };
  90.  
  91.   //The different EndOfLine types that will serve to populate the combo box
  92.   enum enuEOLType
  93.   {
  94.     ltNone = 0,
  95.     ltCrLf = 1,
  96.     ltLf = 2,
  97.     ltCr = 3,
  98.   };
  99.  
  100.   //Prepare the encoding format according to the user selection
  101.   void PrepareEncodingFormat( DXceedBinaryEncoding& xEncoder );
  102.   //Prepare the decoding format according to the user selection
  103.   void PrepareDecodingFormat( DXceedBinaryEncoding& xDecoder );
  104. };
  105.  
  106. //{{AFX_INSERT_LOCATION}}
  107. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  108.  
  109. #endif // !defined(AFX_MEMORYENCODEDLG_H__56170D64_79FA_432E_AB62_1CF8342F2B91__INCLUDED_)
  110.