[Ttssh2-commit] [5158] listbox マクロコマンドのダイアログを i18n 対応

svnno****@sourc***** svnno****@sourc*****
2013年 3月 22日 (金) 20:10:09 JST


Revision: 5158
          http://sourceforge.jp/projects/ttssh2/scm/svn/commits/5158
Author:   maya
Date:     2013-03-22 20:10:08 +0900 (Fri, 22 Mar 2013)
Log Message:
-----------
listbox マクロコマンドのダイアログを i18n 対応

Modified Paths:
--------------
    trunk/teraterm/ttpmacro/ListDlg.cpp
    trunk/teraterm/ttpmacro/ListDlg.h

-------------- next part --------------
Modified: trunk/teraterm/ttpmacro/ListDlg.cpp
===================================================================
--- trunk/teraterm/ttpmacro/ListDlg.cpp	2013-03-22 10:36:31 UTC (rev 5157)
+++ trunk/teraterm/ttpmacro/ListDlg.cpp	2013-03-22 11:10:08 UTC (rev 5158)
@@ -22,6 +22,7 @@
 	m_Text = Text;
 	m_Caption = Caption;
 	m_Lists = Lists;
+	DlgFont = NULL;
 }
 
 CListDlg::~CListDlg()
@@ -53,10 +54,29 @@
 BOOL CListDlg::OnInitDialog()
 {
 	char **p;
+	char uimsg[MAX_UIMSG], uimsg2[MAX_UIMSG];
+	LOGFONT logfont;
+	HFONT font;
 
 	CDialog::OnInitDialog();
 
 	// TODO:  \x82\xB1\x82\xB1\x82ɏ\x89\x8A\xFA\x89\xBB\x82\xF0\x92lj\xC1\x82\xB5\x82Ă\xAD\x82\xBE\x82\xB3\x82\xA2
+	font = (HFONT)SendMessage(WM_GETFONT, 0, 0);
+	GetObject(font, sizeof(LOGFONT), &logfont);
+	if (get_lang_font("DLG_SYSTEM_FONT", m_hWnd, &logfont, &DlgFont, UILanguageFile)) {
+		SendDlgItemMessage(IDC_LISTBOX, WM_SETFONT, (WPARAM)DlgFont, MAKELPARAM(TRUE,0));
+		SendDlgItemMessage(IDC_STATIC, WM_SETFONT, (WPARAM)DlgFont, MAKELPARAM(TRUE,0));
+		SendDlgItemMessage(IDOK, WM_SETFONT, (WPARAM)DlgFont, MAKELPARAM(TRUE,0));
+		SendDlgItemMessage(IDCANCEL, WM_SETFONT, (WPARAM)DlgFont, MAKELPARAM(TRUE,0));
+	}
+
+	GetDlgItemText(IDOK, uimsg2, sizeof(uimsg2));
+	get_lang_msg("BTN_OK", uimsg, sizeof(uimsg), uimsg2, UILanguageFile);
+	SetDlgItemText(IDOK, uimsg);
+	GetDlgItemText(IDCANCEL, uimsg2, sizeof(uimsg2));
+	get_lang_msg("BTN_CANCEL", uimsg, sizeof(uimsg), uimsg2, UILanguageFile);
+	SetDlgItemText(IDCANCEL, uimsg);
+
 	p = m_Lists;
 	while (*p) {
 		m_xcList.InsertString(-1, _T(*p));

Modified: trunk/teraterm/ttpmacro/ListDlg.h
===================================================================
--- trunk/teraterm/ttpmacro/ListDlg.h	2013-03-22 10:36:31 UTC (rev 5157)
+++ trunk/teraterm/ttpmacro/ListDlg.h	2013-03-22 11:10:08 UTC (rev 5158)
@@ -20,6 +20,7 @@
 	PCHAR m_Caption;
 	CHAR **m_Lists;
 	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV \x83T\x83|\x81[\x83g
+	HFONT DlgFont;
 
 	DECLARE_MESSAGE_MAP()
 public:



Ttssh2-commit メーリングリストの案内