CStatDlg を Unicode化
@@ -43,7 +43,7 @@ | ||
43 | 43 | |
44 | 44 | // CStatDlg dialog |
45 | 45 | |
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) | |
47 | 47 | { |
48 | 48 | TextStr = Text; |
49 | 49 | TitleStr = Title; |
@@ -52,12 +52,12 @@ | ||
52 | 52 | return TTCDialog::Create(hInst, NULL, CStatDlg::IDD); |
53 | 53 | } |
54 | 54 | |
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) | |
56 | 56 | { |
57 | 57 | RECT R; |
58 | 58 | |
59 | 59 | if (Title!=NULL) { |
60 | - SetWindowText(Title); | |
60 | + SetWindowTextW(Title); | |
61 | 61 | TitleStr = Title; |
62 | 62 | } |
63 | 63 |
@@ -70,12 +70,12 @@ | ||
70 | 70 | if (Text!=NULL) { |
71 | 71 | SIZE textSize; |
72 | 72 | HWND hWnd = GetDlgItem(IDC_STATTEXT); |
73 | - CalcTextExtent(hWnd, NULL, Text, &textSize); | |
73 | + CalcTextExtentW(hWnd, NULL, Text, &textSize); | |
74 | 74 | TW = textSize.cx + textSize.cx/10; // (cx * (1+0.1)) ? |
75 | 75 | TH = textSize.cy; |
76 | 76 | s = textSize; // TODO s!? |
77 | 77 | |
78 | - SetDlgItemText(IDC_STATTEXT,Text); | |
78 | + SetDlgItemTextW(IDC_STATTEXT,Text); | |
79 | 79 | TextStr = Text; |
80 | 80 | } |
81 | 81 |
@@ -34,13 +34,13 @@ | ||
34 | 34 | class CStatDlg : public CMacroDlgBase |
35 | 35 | { |
36 | 36 | 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); | |
39 | 39 | void Bringup(); |
40 | 40 | enum { IDD = IDD_STATDLG }; |
41 | 41 | private: |
42 | - const TCHAR *TextStr; | |
43 | - const TCHAR *TitleStr; | |
42 | + const wchar_t *TextStr; | |
43 | + const wchar_t *TitleStr; | |
44 | 44 | int init_WW, TW, TH; |
45 | 45 | SIZE s; |
46 | 46 |
@@ -237,7 +237,7 @@ | ||
237 | 237 | |
238 | 238 | Err = 0; |
239 | 239 | GetStrVal(Str1,&Err); |
240 | - wc Str1T = tc::fromUtf8(Str1); | |
240 | + wc Str1T = wc::fromUtf8(Str1); | |
241 | 241 | |
242 | 242 | if (Err!=0) return Err; |
243 | 243 |
@@ -383,7 +383,7 @@ | ||
383 | 383 | return (ret); |
384 | 384 | } |
385 | 385 | else if (BoxId==IdStatusBox) { |
386 | - OpenStatDlg(tc::fromUtf8(Str1),tc::fromUtf8(Str2)); | |
386 | + OpenStatDlg(wc::fromUtf8(Str1), wc::fromUtf8(Str2)); | |
387 | 387 | |
388 | 388 | } else if (BoxId==IdListBox) { |
389 | 389 | // リストボックスの選択肢を取得する。 |
@@ -246,7 +246,7 @@ | ||
246 | 246 | return MsgDlg.DoModal(hInst, hWndParent); |
247 | 247 | } |
248 | 248 | |
249 | -void OpenStatDlg(const TCHAR *Text, const TCHAR *Caption) | |
249 | +void OpenStatDlg(const wchar_t *Text, const wchar_t *Caption) | |
250 | 250 | { |
251 | 251 | if (StatDlg==NULL) { |
252 | 252 | HINSTANCE hInst = GetInstance(); |
@@ -44,7 +44,7 @@ | ||
44 | 44 | const wchar_t *Default, BOOL Paswd); |
45 | 45 | int OpenErrDlg(const char *Msg, const char *Line, int lineno, int start, int end, const char *FileName); |
46 | 46 | 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); | |
48 | 48 | void CloseStatDlg(); |
49 | 49 | void BringupStatDlg(); |
50 | 50 |