1 |
/* Tera Term |
/* Tera Term |
2 |
Copyright(C) 1994-1998 T. Teranishi |
Copyright(C) 1994-1998 T. Teranishi |
3 |
All rights reserved. */ |
All rights reserved. */ |
4 |
|
|
5 |
/* TERATERM.EXE, file-transfer-protocol dialog box */ |
/* TERATERM.EXE, file-transfer-protocol dialog box */ |
6 |
#include "stdafx.h" |
#include "stdafx.h" |
7 |
#include "teraterm.h" |
#include "teraterm.h" |
8 |
#include "tt_res.h" |
#include "tt_res.h" |
9 |
#include "tttypes.h" |
#include "tttypes.h" |
10 |
#include "ttftypes.h" |
#include "ttftypes.h" |
11 |
#include "ttlib.h" |
#include "ttlib.h" |
12 |
#include "protodlg.h" |
#include "protodlg.h" |
13 |
|
|
14 |
#ifdef _DEBUG |
#ifdef _DEBUG |
15 |
#define new DEBUG_NEW |
#define new DEBUG_NEW |
16 |
#undef THIS_FILE |
#undef THIS_FILE |
17 |
static char THIS_FILE[] = __FILE__; |
static char THIS_FILE[] = __FILE__; |
18 |
#endif |
#endif |
19 |
|
|
20 |
///////////////////////////////////////////////////////////////////////////// |
///////////////////////////////////////////////////////////////////////////// |
21 |
// CProtoDlg dialog |
// CProtoDlg dialog |
22 |
|
|
23 |
BEGIN_MESSAGE_MAP(CProtoDlg, CDialog) |
BEGIN_MESSAGE_MAP(CProtoDlg, CDialog) |
24 |
//{{AFX_MSG_MAP(CProtoDlg) |
//{{AFX_MSG_MAP(CProtoDlg) |
25 |
//}}AFX_MSG_MAP |
//}}AFX_MSG_MAP |
26 |
END_MESSAGE_MAP() |
END_MESSAGE_MAP() |
27 |
|
|
28 |
BOOL CProtoDlg::Create(PFileVar pfv, PTTSet pts) |
BOOL CProtoDlg::Create(PFileVar pfv, PTTSet pts) |
29 |
{ |
{ |
30 |
BOOL Ok; |
BOOL Ok; |
31 |
LOGFONT logfont; |
LOGFONT logfont; |
32 |
HFONT font; |
HFONT font; |
33 |
|
|
34 |
fv = pfv; |
fv = pfv; |
35 |
|
|
36 |
Ok = CDialog::Create(CProtoDlg::IDD, NULL); |
Ok = CDialog::Create(CProtoDlg::IDD, NULL); |
37 |
fv->HWin = GetSafeHwnd(); |
fv->HWin = GetSafeHwnd(); |
38 |
|
|
39 |
font = (HFONT)SendMessage(WM_GETFONT, 0, 0); |
font = (HFONT)SendMessage(WM_GETFONT, 0, 0); |
40 |
GetObject(font, sizeof(LOGFONT), &logfont); |
GetObject(font, sizeof(LOGFONT), &logfont); |
41 |
if (get_lang_font("DLG_SYSTEM_FONT", GetSafeHwnd(), &logfont, &DlgFont, pts->UILanguageFile)) { |
if (get_lang_font("DLG_SYSTEM_FONT", GetSafeHwnd(), &logfont, &DlgFont, pts->UILanguageFile)) { |
42 |
SendDlgItemMessage(IDC_PROT_FILENAME, WM_SETFONT, (WPARAM)DlgFont, MAKELPARAM(TRUE,0)); |
SendDlgItemMessage(IDC_PROT_FILENAME, WM_SETFONT, (WPARAM)DlgFont, MAKELPARAM(TRUE,0)); |
43 |
SendDlgItemMessage(IDC_PROTOFNAME, WM_SETFONT, (WPARAM)DlgFont, MAKELPARAM(TRUE,0)); |
SendDlgItemMessage(IDC_PROTOFNAME, WM_SETFONT, (WPARAM)DlgFont, MAKELPARAM(TRUE,0)); |
44 |
SendDlgItemMessage(IDC_PROT_PROT, WM_SETFONT, (WPARAM)DlgFont, MAKELPARAM(TRUE,0)); |
SendDlgItemMessage(IDC_PROT_PROT, WM_SETFONT, (WPARAM)DlgFont, MAKELPARAM(TRUE,0)); |
45 |
SendDlgItemMessage(IDC_PROTOPROT, WM_SETFONT, (WPARAM)DlgFont, MAKELPARAM(TRUE,0)); |
SendDlgItemMessage(IDC_PROTOPROT, WM_SETFONT, (WPARAM)DlgFont, MAKELPARAM(TRUE,0)); |
46 |
SendDlgItemMessage(IDC_PROT_PACKET, WM_SETFONT, (WPARAM)DlgFont, MAKELPARAM(TRUE,0)); |
SendDlgItemMessage(IDC_PROT_PACKET, WM_SETFONT, (WPARAM)DlgFont, MAKELPARAM(TRUE,0)); |
47 |
SendDlgItemMessage(IDC_PROTOPKTNUM, WM_SETFONT, (WPARAM)DlgFont, MAKELPARAM(TRUE,0)); |
SendDlgItemMessage(IDC_PROTOPKTNUM, WM_SETFONT, (WPARAM)DlgFont, MAKELPARAM(TRUE,0)); |
48 |
SendDlgItemMessage(IDC_PROT_TRANS, WM_SETFONT, (WPARAM)DlgFont, MAKELPARAM(TRUE,0)); |
SendDlgItemMessage(IDC_PROT_TRANS, WM_SETFONT, (WPARAM)DlgFont, MAKELPARAM(TRUE,0)); |
49 |
SendDlgItemMessage(IDC_PROTOBYTECOUNT, WM_SETFONT, (WPARAM)DlgFont, MAKELPARAM(TRUE,0)); |
SendDlgItemMessage(IDC_PROTOBYTECOUNT, WM_SETFONT, (WPARAM)DlgFont, MAKELPARAM(TRUE,0)); |
50 |
SendDlgItemMessage(IDC_PROTOPERCENT, WM_SETFONT, (WPARAM)DlgFont, MAKELPARAM(TRUE,0)); |
SendDlgItemMessage(IDC_PROTOPERCENT, WM_SETFONT, (WPARAM)DlgFont, MAKELPARAM(TRUE,0)); |
51 |
SendDlgItemMessage(IDCANCEL, WM_SETFONT, (WPARAM)DlgFont, MAKELPARAM(TRUE,0)); |
SendDlgItemMessage(IDCANCEL, WM_SETFONT, (WPARAM)DlgFont, MAKELPARAM(TRUE,0)); |
52 |
} |
} |
53 |
|
|
54 |
return Ok; |
return Ok; |
55 |
} |
} |
56 |
|
|
57 |
///////////////////////////////////////////////////////////////////////////// |
///////////////////////////////////////////////////////////////////////////// |
58 |
// CProtoDlg message handler |
// CProtoDlg message handler |
59 |
|
|
60 |
void CProtoDlg::OnCancel( ) |
void CProtoDlg::OnCancel( ) |
61 |
{ |
{ |
62 |
::PostMessage(fv->HMainWin,WM_USER_PROTOCANCEL,0,0); |
::PostMessage(fv->HMainWin,WM_USER_PROTOCANCEL,0,0); |
63 |
} |
} |
64 |
|
|
65 |
BOOL CProtoDlg::OnCommand(WPARAM wParam, LPARAM lParam) |
BOOL CProtoDlg::OnCommand(WPARAM wParam, LPARAM lParam) |
66 |
{ |
{ |
67 |
switch (LOWORD(wParam)) { |
switch (LOWORD(wParam)) { |
68 |
case IDCANCEL: |
case IDCANCEL: |
69 |
::PostMessage(fv->HMainWin,WM_USER_PROTOCANCEL,0,0); |
::PostMessage(fv->HMainWin,WM_USER_PROTOCANCEL,0,0); |
70 |
return TRUE; |
return TRUE; |
71 |
default: |
default: |
72 |
return (CDialog::OnCommand(wParam,lParam)); |
return (CDialog::OnCommand(wParam,lParam)); |
73 |
} |
} |
74 |
} |
} |
75 |
|
|
76 |
void CProtoDlg::PostNcDestroy() |
void CProtoDlg::PostNcDestroy() |
77 |
{ |
{ |
78 |
delete this; |
delete this; |
79 |
} |
} |