📄 hdlg.h
字号:
// hDlg.h : header file
//
#if !defined(AFX_HDLG_H__1D013AF0_8B7A_42FA_A679_C989817AB2F5__INCLUDED_)
#define AFX_HDLG_H__1D013AF0_8B7A_42FA_A679_C989817AB2F5__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
/////////////////////////////////////////////////////////////////////////////
// CHDlg dialog
typedef struct Huffmantree
{
char ch; /*键值*/
int weight,mark; /*weight为权值,mark为标志域*/
struct Huffmantree *parent,*lchild,*rchild,*next; //结构指针,双亲,左孩子,右孩子,下一个节点
}Hftree,*linktree;
class CHDlg : public CDialog
{
// Construction
public:
CHDlg(CWnd* pParent = NULL); // standard constructor
static linktree initialize(char character[]);
static linktree Order(linktree tree);
static linktree createHftree(linktree tree) ;
char *Huffmancoding(linktree tree) ;
double Huffmancoding1(linktree tree) ;
double Huffmancoding2(linktree tree) ;
char *decode(linktree tree,char code[]) ;
// Dialog Data
//{{AFX_DATA(CHDlg)
enum { IDD = IDD_H_DIALOG };
CString m_x;
CString m_y;
CString m_z;
CString m_p;
CString m_q;
CString m_r;
CString m_s;
CString m_t;
double m_u;
double m_v;
double m_w;
int m_o;
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CHDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
HICON m_hIcon;
// Generated message map functions
//{{AFX_MSG(CHDlg)
virtual BOOL OnInitDialog();
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
afx_msg void OnButton4();
afx_msg void OnButton5();
afx_msg void OnButton6();
afx_msg void OnSelendcancelCombo1();
afx_msg void OnSelendcancelCombo2();
afx_msg void OnSelendcancelCombo3();
afx_msg void OnSelendcancelCombo4();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_HDLG_H__1D013AF0_8B7A_42FA_A679_C989817AB2F5__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -