FontTestDlg.h
资源名称:fontcurve.rar [点击查看]
上传用户:sz81710966
上传日期:2013-03-01
资源大小:409k
文件大小:3k
源码类别:
多国语言处理
开发平台:
Visual C++
- // FontTestDlg.h : header file
- //
- //{{AFX_INCLUDES()
- #include "fontcurve.h"
- //}}AFX_INCLUDES
- #if !defined(AFX_FONTTESTDLG_H__484BD160_0E8D_4440_8BC2_2BB1C720E664__INCLUDED_)
- #define AFX_FONTTESTDLG_H__484BD160_0E8D_4440_8BC2_2BB1C720E664__INCLUDED_
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- #include "NumEdit.h"
- #include "NumSpinCtrl.h"
- #include "EnumFontComboBox.h"
- #include "..includeCommonHead.h"
- /////////////////////////////////////////////////////////////////////////////
- // CFontTestDlg dialog
- class CFontTestDlg : public CDialog
- {
- // Construction
- public:
- CFontTestDlg(CWnd* pParent = NULL); // standard constructor
- // Dialog Data
- //{{AFX_DATA(CFontTestDlg)
- enum { IDD = IDD_FONTTEST_DIALOG };
- CEdit m_ctlEditSource;
- CComboBox m_ctlSourceFrom;
- CEnumFontComboBox m_ctlFontSel;
- CComboBox m_ctlFontColor;
- CNumSpinCtrl m_spinWidth;
- CNumSpinCtrl m_spinHeight;
- CComboBox m_ctlCombox;
- CEdit m_ctlCode;
- CEdit m_ctlEdit;
- CString m_strBeginCode;
- CFontCurve m_fontCurve;
- int m_nFontHeight;
- int m_nFontWidth;
- //}}AFX_DATA
- // ClassWizard generated virtual function overrides
- //{{AFX_VIRTUAL(CFontTestDlg)
- protected:
- virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
- //}}AFX_VIRTUAL
- // Implementation
- protected:
- HICON m_hIcon;
- // Generated message map functions
- //{{AFX_MSG(CFontTestDlg)
- virtual BOOL OnInitDialog();
- afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
- afx_msg void OnPaint();
- afx_msg HCURSOR OnQueryDragIcon();
- afx_msg void OnButtonStop();
- afx_msg void OnButtonNext();
- virtual void OnCancel();
- afx_msg void OnFileUrl();
- afx_msg void OnButtonApply();
- afx_msg void OnSelchangeComboCodeType();
- afx_msg void OnSize(UINT nType, int cx, int cy);
- afx_msg void OnChangeEditFontWidth();
- afx_msg void OnChangeEditFontHeight();
- afx_msg void OnCreateFont();
- afx_msg void OnSelectFile();
- afx_msg void OnSelchangeComboSource();
- //}}AFX_MSG
- DECLARE_MESSAGE_MAP()
- private:
- int m_nAddOrDelete;
- BYTE *m_pFont;
- int m_nPrevCX;
- int m_nPrevCY;
- int m_nMemWidth;
- LOGFONT m_logFont;
- LANGID m_langID;
- short m_nShowType;
- HANDLE m_fontHandle;
- DWORD m_dwThreadID;
- CString m_strCodeSel;
- COffsetDiffList m_offSetDiffList; //用于记录GBK,GB2312,BIG5编码在转换成UNICODE时不存在的地方
- int m_nMaxOffset;
- BYTE m_byShowBuf[TRAN_FILE_BUF_LEN];
- CString m_strSourceFile; //保存手动选择的源文件名
- int m_nCurHandSel; //当前手动选项的指针位置
- private:
- bool ShowInfo();
- bool InitParameter();
- bool GetFontSize(FONT_SHOW_SIZE &fontShow);
- bool TranFile(CFile * pDesFile, CFile * pSrcFile);
- bool GetCharToWORD(bool bInitBegin = false);
- bool PreviewShow(int nMemWidth, int nMemHeight, int nOffset);
- int AnalyzeOffset(int nMemWidth, int nMemHeight, int nSourceType = SOURCE_ALL_CODE);
- bool ShowGridInfo();
- bool FreeResource();
- public:
- bool CreateFontLibrary(int nCreateType = SOURCE_ALL_CODE);
- };
- //{{AFX_INSERT_LOCATION}}
- // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
- #endif // !defined(AFX_FONTTESTDLG_H__484BD160_0E8D_4440_8BC2_2BB1C720E664__INCLUDED_)