• R/O
  • SSH
  • HTTPS

ttssh2: コミット


コミットメタ情報

リビジョン8631 (tree)
日時2020-03-27 00:40:34
作者zmatsuo

ログメッセージ

CStatDlg を Unicode化

変更サマリ

差分

--- branches/unicode_macro/teraterm/ttpmacro/statdlg.cpp (revision 8630)
+++ branches/unicode_macro/teraterm/ttpmacro/statdlg.cpp (revision 8631)
@@ -43,7 +43,7 @@
4343
4444 // CStatDlg dialog
4545
46-BOOL CStatDlg::Create(HINSTANCE hInst, const TCHAR *Text, const TCHAR *Title, int x, int y)
46+BOOL CStatDlg::Create(HINSTANCE hInst, const wchar_t *Text, const wchar_t *Title, int x, int y)
4747 {
4848 TextStr = Text;
4949 TitleStr = Title;
@@ -52,12 +52,12 @@
5252 return TTCDialog::Create(hInst, NULL, CStatDlg::IDD);
5353 }
5454
55-void CStatDlg::Update(const TCHAR *Text, const TCHAR *Title, int x, int y)
55+void CStatDlg::Update(const wchar_t *Text, const wchar_t *Title, int x, int y)
5656 {
5757 RECT R;
5858
5959 if (Title!=NULL) {
60- SetWindowText(Title);
60+ SetWindowTextW(Title);
6161 TitleStr = Title;
6262 }
6363
@@ -70,12 +70,12 @@
7070 if (Text!=NULL) {
7171 SIZE textSize;
7272 HWND hWnd = GetDlgItem(IDC_STATTEXT);
73- CalcTextExtent(hWnd, NULL, Text, &textSize);
73+ CalcTextExtentW(hWnd, NULL, Text, &textSize);
7474 TW = textSize.cx + textSize.cx/10; // (cx * (1+0.1)) ?
7575 TH = textSize.cy;
7676 s = textSize; // TODO s!?
7777
78- SetDlgItemText(IDC_STATTEXT,Text);
78+ SetDlgItemTextW(IDC_STATTEXT,Text);
7979 TextStr = Text;
8080 }
8181
--- branches/unicode_macro/teraterm/ttpmacro/statdlg.h (revision 8630)
+++ branches/unicode_macro/teraterm/ttpmacro/statdlg.h (revision 8631)
@@ -34,13 +34,13 @@
3434 class CStatDlg : public CMacroDlgBase
3535 {
3636 public:
37- BOOL Create(HINSTANCE hInst, const TCHAR *Text, const TCHAR *Title, int x, int y);
38- void Update(const TCHAR *Text, const TCHAR *Title, int x, int y);
37+ BOOL Create(HINSTANCE hInst, const wchar_t *Text, const wchar_t *Title, int x, int y);
38+ void Update(const wchar_t *Text, const wchar_t *Title, int x, int y);
3939 void Bringup();
4040 enum { IDD = IDD_STATDLG };
4141 private:
42- const TCHAR *TextStr;
43- const TCHAR *TitleStr;
42+ const wchar_t *TextStr;
43+ const wchar_t *TitleStr;
4444 int init_WW, TW, TH;
4545 SIZE s;
4646
--- branches/unicode_macro/teraterm/ttpmacro/ttl_gui.cpp (revision 8630)
+++ branches/unicode_macro/teraterm/ttpmacro/ttl_gui.cpp (revision 8631)
@@ -237,7 +237,7 @@
237237
238238 Err = 0;
239239 GetStrVal(Str1,&Err);
240- wc Str1T = tc::fromUtf8(Str1);
240+ wc Str1T = wc::fromUtf8(Str1);
241241
242242 if (Err!=0) return Err;
243243
@@ -383,7 +383,7 @@
383383 return (ret);
384384 }
385385 else if (BoxId==IdStatusBox) {
386- OpenStatDlg(tc::fromUtf8(Str1),tc::fromUtf8(Str2));
386+ OpenStatDlg(wc::fromUtf8(Str1), wc::fromUtf8(Str2));
387387
388388 } else if (BoxId==IdListBox) {
389389 // リストボックスの選択肢を取得する。
--- branches/unicode_macro/teraterm/ttpmacro/ttmdlg.cpp (revision 8630)
+++ branches/unicode_macro/teraterm/ttpmacro/ttmdlg.cpp (revision 8631)
@@ -246,7 +246,7 @@
246246 return MsgDlg.DoModal(hInst, hWndParent);
247247 }
248248
249-void OpenStatDlg(const TCHAR *Text, const TCHAR *Caption)
249+void OpenStatDlg(const wchar_t *Text, const wchar_t *Caption)
250250 {
251251 if (StatDlg==NULL) {
252252 HINSTANCE hInst = GetInstance();
--- branches/unicode_macro/teraterm/ttpmacro/ttmdlg.h (revision 8630)
+++ branches/unicode_macro/teraterm/ttpmacro/ttmdlg.h (revision 8631)
@@ -44,7 +44,7 @@
4444 const wchar_t *Default, BOOL Paswd);
4545 int OpenErrDlg(const char *Msg, const char *Line, int lineno, int start, int end, const char *FileName);
4646 int OpenMsgDlg(const wchar_t *Text, const wchar_t *Caption, BOOL YesNo);
47-void OpenStatDlg(const TCHAR *Text, const TCHAR *Caption);
47+void OpenStatDlg(const wchar_t *Text, const wchar_t *Caption);
4848 void CloseStatDlg();
4949 void BringupStatDlg();
5050
旧リポジトリブラウザで表示