2023-01-19 07:47:12 +00:00
|
|
|
|
#pragma once
|
|
|
|
|
#include "afxdialogex.h"
|
|
|
|
|
#include <string>
|
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
|
|
// CDlgLang 对话框
|
|
|
|
|
|
|
|
|
|
class CDlgLang : public CDialogEx
|
|
|
|
|
{
|
|
|
|
|
DECLARE_DYNAMIC(CDlgLang)
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
CDlgLang(CWnd* pParent = nullptr); // 标准构造函数
|
|
|
|
|
virtual ~CDlgLang();
|
|
|
|
|
|
|
|
|
|
// 对话框数据
|
|
|
|
|
enum { IDD = IDD_LANGUAGE };
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持
|
|
|
|
|
virtual BOOL OnInitDialog();
|
|
|
|
|
|
|
|
|
|
bool select_code_page(int cp);
|
|
|
|
|
void add_2_list(void* lang_list, int id, bool unic);
|
|
|
|
|
int insert_item_2_list(const wchar_t* str, uint32_t id);
|
|
|
|
|
int find_hz_ID(const wchar_t* hz);
|
|
|
|
|
int find_list_item_by_ID(int id);
|
|
|
|
|
void on_hz_pak_initialized(bool success);
|
|
|
|
|
|
|
|
|
|
static bool find_repeat_in_vector(uint32_t val, void* param);
|
|
|
|
|
static bool find_repeat_in_list(uint32_t val, void* param);
|
|
|
|
|
|
|
|
|
|
DECLARE_MESSAGE_MAP()
|
|
|
|
|
public:
|
|
|
|
|
afx_msg void OnBnClickedButtonInitId();
|
|
|
|
|
afx_msg void OnCbnSelchangeLanguage();
|
|
|
|
|
afx_msg void OnNMDblclkList1(NMHDR* pNMHDR, LRESULT* pResult);
|
|
|
|
|
CComboBox lang_;
|
|
|
|
|
CListCtrl list_;
|
|
|
|
|
int cur_cp_;
|
|
|
|
|
|
|
|
|
|
typedef struct _base_map
|
|
|
|
|
{
|
|
|
|
|
int id;
|
|
|
|
|
std::wstring hz;
|
|
|
|
|
|
|
|
|
|
bool operator==(int i)
|
|
|
|
|
{
|
|
|
|
|
return id == i;
|
|
|
|
|
}
|
|
|
|
|
bool operator==(const wchar_t* t)
|
|
|
|
|
{
|
|
|
|
|
return hz == t;
|
|
|
|
|
}
|
|
|
|
|
}HZMAP;
|
|
|
|
|
std::vector<HZMAP> hz_;
|
|
|
|
|
afx_msg void OnBnClickedButtonSave();
|
|
|
|
|
afx_msg void OnBnClickedButtonAdd();
|
2023-01-28 07:21:23 +00:00
|
|
|
|
afx_msg void OnBnClickedButtonAddFile();
|
|
|
|
|
afx_msg void OnBnClickedButtonSaveExport();
|
2023-01-19 07:47:12 +00:00
|
|
|
|
};
|