-
Notifications
You must be signed in to change notification settings - Fork 2
/
LocalizeRCDlg.h
117 lines (91 loc) · 3.56 KB
/
LocalizeRCDlg.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
// LocalizeRCDlg.h : header file
//
#pragma once
#include <tchar.h>
#include "afxcmn.h"
#include "afxwin.h"
// CLocalizeRCDlg dialog
class CLocalizeRCDlg : public CDialog
{
// Construction
public:
CLocalizeRCDlg(CString& strWorkspace, CWnd* pParent = NULL); // standard constructor
// Dialog Data
enum { IDD = IDD_LOCALIZERC_DIALOG };
LANGID LangID;
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
// Implementation
private:
HICON hLargeIcon, hSmallIcon;
// Generated message map functions
virtual BOOL OnInitDialog();
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
afx_msg void OnBnClickedNewWorkspace();
afx_msg void OnBnClickedChngWorkspace();
afx_msg void OnBnClickedReverseini();
afx_msg void OnCbnSelchangeLanguage();
afx_msg void OnDestroy();
afx_msg void OnBnClickedCreateini();
afx_msg void OnBnClickedOpenini();
afx_msg void OnBnClickedCreateoutput();
afx_msg void OnCbnSelchangeObsItems();
afx_msg void OnBnKillfocusCopy();
afx_msg void OnBnKillfocusNosort();
afx_msg void OnBnClickedChngInputrc();
afx_msg void OnBnClickedChngLangini();
afx_msg void OnBnClickedChngOutputrc();
DECLARE_MESSAGE_MAP()
// content of rich edit control
CString m_strEdit;
// absolute filenames
/////////////////////
// filename of resource-file with source language
CString m_strInputRC;
// file of the INI File with IDC and text-strings
CString m_strLangINI;
// filename of the generated RC
CString m_strOutputRC;
CString newRCdata; // Working buffer for new RC data output
BOOL m_bCopy;
int m_nObsoleteItems;
CString m_strWorkspace;
CComboBox m_CtrlLanguage;
CString m_strTextmode;
CString m_strAbout;
BOOL m_bNoSort;
// checks if line contents strings that have to be translated
bool MustBeTranslated(CString strLine, CString strKeyword);
// search for '"' that is not a quotation mark inside the text ("")
int FindQuote(CString strLine, int nStartPos=0);
int WriteReadIni(bool bWrite);
CString ExtractCaption(CString& strText, int* pnPosition, CString strKeyword, CString &strIDC);
static CString GetFolder(CString strPath);
BOOL OpenRCFile( CString filename, CString &strbuf, BOOL bShowError );
BOOL OpenInputRC(BOOL bShowError = true);
BOOL LoadWorkspace(BOOL bShowError = true);
BOOL SaveWorkspace(void);
CString GetAbsolutePathFromIni(CIniEx* pIniEx, CString strKey, CString strPath);
void LogUserMessage( int strID ); // Log message to status window
void LogUserMessage( CString msg );
void MergeOldRCFileDialogLayout( CString &oldRCdata );
void MergeOldRCFileDesignInfo( CString &oldRCdata );
void RemoveNewRCFileRESItems( );
void CheckTextClipping();
static int AddLanguage(CComboBox* pComboBox, LPCTSTR strLangCode, LANGID SelectedID);
static CString StringTokenize(CString strSource, LPCTSTR strDelimiters, int* pnStart);
static int FindSeperateWord(CString strText, LPCTSTR strWord, int nStartPos);
static int StringSpanIncluding( LPCTSTR pszBlock, LPCTSTR pszSet ) throw()
{
return (int)_tcsspn( ( pszBlock ), ( pszSet ) );
}
static int StringSpanExcluding( LPCTSTR pszBlock, LPCTSTR pszSet ) throw()
{
return (int)_tcscspn( ( pszBlock ), ( pszSet ) );
}
BOOL OpenSaveDialog(BOOL bOpen, BOOL bRelative, UINT nExtID, UINT nExtDescriptionID, CString& strEdit, CString strIniEntry);
BOOL ShowError(UINT nIDString1, bool bGetLastError = false, DWORD dwErrCode = 0);
static CString ConvertErrorToString( DWORD dwErrCode );
};