| 193 |
|
|
| 194 |
static void SetDialogCation(struct FileVarProto *fv, const char *key, const wchar_t *default_caption) |
static void SetDialogCation(struct FileVarProto *fv, const char *key, const wchar_t *default_caption) |
| 195 |
{ |
{ |
| 196 |
const char *UILanguageFile = ts.UILanguageFile; |
const wchar_t *UILanguageFile = ts.UILanguageFileW; |
| 197 |
wchar_t uimsg[MAX_UIMSG]; |
wchar_t *uimsg; |
| 198 |
wchar_t caption[MAX_UIMSG]; |
wchar_t *caption; |
| 199 |
wcsncpy_s(caption, _countof(caption), L"Tera Term: ", _TRUNCATE); |
GetI18nStrWW("Tera Term", key, default_caption, UILanguageFile, &uimsg); |
| 200 |
get_lang_msgW(key, uimsg, _countof(uimsg), default_caption, UILanguageFile); |
aswprintf(&caption, L"Tera Term: %s", uimsg); |
| 201 |
wcsncat_s(caption, _countof(caption), uimsg, _TRUNCATE); |
free(uimsg); |
| 202 |
free((void *)fv->DlgCaption); |
free((void *)fv->DlgCaption); |
| 203 |
fv->DlgCaption = _wcsdup(caption); |
fv->DlgCaption = caption; |
| 204 |
} |
} |
| 205 |
|
|
| 206 |
static BOOL NewFileVar_(PFileVarProto *pfv) |
static BOOL NewFileVar_(PFileVarProto *pfv) |
| 338 |
return FALSE; |
return FALSE; |
| 339 |
} |
} |
| 340 |
CProtoDlgInfo info; |
CProtoDlgInfo info; |
| 341 |
info.UILanguageFile = ts.UILanguageFile; |
info.UILanguageFileW = ts.UILanguageFileW; |
| 342 |
info.HMainWin = fv->HMainWin; |
info.HMainWin = fv->HMainWin; |
| 343 |
pd->Create(hInst, HVTWin, &info); |
pd->Create(hInst, HVTWin, &info); |
| 344 |
fv->HWin = pd->m_hWnd; |
fv->HWin = pd->m_hWnd; |
| 429 |
{ IDC_XOPT1K, "DLG_XOPT_1K" }, |
{ IDC_XOPT1K, "DLG_XOPT_1K" }, |
| 430 |
{ IDC_XOPTBIN, "DLG_XOPT_BINARY" }, |
{ IDC_XOPTBIN, "DLG_XOPT_BINARY" }, |
| 431 |
}; |
}; |
|
LPOPENFILENAMEW ofn; |
|
| 432 |
WORD Hi, Lo; |
WORD Hi, Lo; |
| 433 |
LPLONG pl; |
LPLONG pl; |
| 434 |
LPOFNOTIFY notify; |
LPOFNOTIFY notify; |
|
LOGFONT logfont; |
|
|
HFONT font; |
|
|
const char *UILanguageFile = ts.UILanguageFile; |
|
| 435 |
const wchar_t *UILanguageFileW = ts.UILanguageFileW; |
const wchar_t *UILanguageFileW = ts.UILanguageFileW; |
| 436 |
static HFONT DlgXoptFont; |
static HFONT DlgXoptFont; |
| 437 |
|
|
| 438 |
switch (Message) { |
switch (Message) { |
| 439 |
case WM_INITDIALOG: |
case WM_INITDIALOG: { |
| 440 |
ofn = (LPOPENFILENAMEW)lParam; |
LPOPENFILENAMEW ofn = (LPOPENFILENAMEW)lParam; |
| 441 |
|
LOGFONTA logfont; |
| 442 |
|
HFONT font; |
| 443 |
|
const char *UILanguageFile = ts.UILanguageFile; |
| 444 |
|
|
| 445 |
pl = (LPLONG)ofn->lCustData; |
pl = (LPLONG)ofn->lCustData; |
| 446 |
SetWindowLongPtr(Dialog, DWLP_USER, (LONG_PTR)pl); |
SetWindowLongPtr(Dialog, DWLP_USER, (LONG_PTR)pl); |
| 447 |
|
|
| 484 |
} |
} |
| 485 |
CenterCommonDialog(Dialog); |
CenterCommonDialog(Dialog); |
| 486 |
return TRUE; |
return TRUE; |
| 487 |
|
} |
| 488 |
case WM_COMMAND: // for old style dialog |
case WM_COMMAND: // for old style dialog |
| 489 |
switch (LOWORD(wParam)) { |
switch (LOWORD(wParam)) { |
| 490 |
case IDOK: |
case IDOK: |
| 857 |
}; |
}; |
| 858 |
LPWORD pw; |
LPWORD pw; |
| 859 |
LPOFNOTIFY notify; |
LPOFNOTIFY notify; |
|
LOGFONT logfont; |
|
|
HFONT font; |
|
| 860 |
static HFONT DlgFoptFont; |
static HFONT DlgFoptFont; |
| 861 |
|
|
| 862 |
switch (Message) { |
switch (Message) { |
| 864 |
const char *UILanguageFile = ts.UILanguageFile; |
const char *UILanguageFile = ts.UILanguageFile; |
| 865 |
const wchar_t *UILanguageFileW = ts.UILanguageFileW; |
const wchar_t *UILanguageFileW = ts.UILanguageFileW; |
| 866 |
LPOPENFILENAMEW ofn = (LPOPENFILENAMEW)lParam; |
LPOPENFILENAMEW ofn = (LPOPENFILENAMEW)lParam; |
| 867 |
|
HFONT font; |
| 868 |
|
LOGFONTA logfont; |
| 869 |
pw = (LPWORD)ofn->lCustData; |
pw = (LPWORD)ofn->lCustData; |
| 870 |
SetWindowLongPtr(Dialog, DWLP_USER, (LONG_PTR)pw); |
SetWindowLongPtr(Dialog, DWLP_USER, (LONG_PTR)pw); |
| 871 |
|
|