Open-Source-Software-Entwicklung und Downloads

Browse Subversion Repository

Contents of /trunk/teraterm/teraterm/protodlg.cpp

Parent Directory Parent Directory | Revision Log Revision Log


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

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26