home *** CD-ROM | disk | FTP | other *** search
- // Xceed Binary Encoding Library - Memory Encode sample
- // Copyright (c) 2001 Xceed Software Inc.
- //
- // [MemoryEncodeDlg.h]
- //
- // This form module contains the main form's code. It demonstrates how to
- // encode a chunk of memory data using different kinds of encoding methods,
- // and decode an encoded memory data. It specifically uses:
- // - The Encode and Decode method.
- // - The ContinueOnInvalidData, IncludeHeaderFooter, EndOfLineType, MaxLineLength,
- // HeaderDataForkLength, HeaderResourceForkLength and EncodingFormat propeties.
- //
- // This file is part of the Xceed Binary Encoding Library sample applications.
- // The source code in this file is only intended as a supplement to Xceed
- // Binary Encoding Library's documentation, and is provided "as is", without
- // warranty of any kind, either expressed or implied.
-
- #if !defined(AFX_MEMORYENCODEDLG_H__56170D64_79FA_432E_AB62_1CF8342F2B91__INCLUDED_)
- #define AFX_MEMORYENCODEDLG_H__56170D64_79FA_432E_AB62_1CF8342F2B91__INCLUDED_
-
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
-
- //Here we include the xceedben.h containing the wrapper classes generated
- //by Visual C++ / MFC when we added a class from the xceedben.dll type
- //library in the Class Wizard
- #include "xceedben.h"
-
- /////////////////////////////////////////////////////////////////////////////
- // CMemoryEncodeDlg dialog
-
- class CMemoryEncodeDlg : public CDialog
- {
- // Construction
- public:
- CMemoryEncodeDlg(CWnd* pParent = NULL); // standard constructor
-
- // Dialog Data
- //{{AFX_DATA(CMemoryEncodeDlg)
- enum { IDD = IDD_MEMORYENCODE_DIALOG };
- int m_lEncodingMethod;
- int m_lEOLType;
- CComboBox m_cboEOLType;
- CComboBox m_cboEncodingMethod;
- long m_lMaxLineLength;
- CString m_sDecodedText;
- CString m_sEncodedText;
- CString m_sDecodedSize;
- CString m_sEncodedSize;
- //}}AFX_DATA
- //TODO Move above the previous line
-
- // ClassWizard generated virtual function overrides
- //{{AFX_VIRTUAL(CMemoryEncodeDlg)
- protected:
- virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
- //}}AFX_VIRTUAL
-
- // Implementation
- protected:
- HICON m_hIcon;
-
- // Generated message map functions
- //{{AFX_MSG(CMemoryEncodeDlg)
- virtual BOOL OnInitDialog();
- afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
- afx_msg void OnPaint();
- afx_msg HCURSOR OnQueryDragIcon();
- afx_msg void OnCmdEncode();
- afx_msg void OnQuit();
- afx_msg void OnChangeTxtDecodedtext();
- afx_msg void OnChangeTxtEncodedtext();
- afx_msg void OnSetfocusTxtDecodedtext();
- afx_msg void OnSetfocusTxtEncodedtext();
- afx_msg void OnCmdDecode();
- //}}AFX_MSG
- DECLARE_MESSAGE_MAP()
-
- //The different encoding methods that will serve to populate the combo box
- enum enuEncodingMethod
- {
- emUUEncode = 0,
- emXXEncode = 1,
- emHexadecimal = 2,
- emBase64 = 3,
- emQuoted = 4,
- emBinHex = 5,
- };
-
- //The different EndOfLine types that will serve to populate the combo box
- enum enuEOLType
- {
- ltNone = 0,
- ltCrLf = 1,
- ltLf = 2,
- ltCr = 3,
- };
-
- //Prepare the encoding format according to the user selection
- void PrepareEncodingFormat( DXceedBinaryEncoding& xEncoder );
- //Prepare the decoding format according to the user selection
- void PrepareDecodingFormat( DXceedBinaryEncoding& xDecoder );
- };
-
- //{{AFX_INSERT_LOCATION}}
- // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
-
- #endif // !defined(AFX_MEMORYENCODEDLG_H__56170D64_79FA_432E_AB62_1CF8342F2B91__INCLUDED_)
-