Open-Source-Software-Entwicklung und Downloads

Browse Subversion Repository

Contents of /trunk/teraterm/teraterm/prnabort.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, 1 month ago) by maya
File MIME type: text/x-c++src
File size: 1849 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, print-abort dialog box */
6 #include "stdafx.h"
7 #include "teraterm.h"
8 #include "tttypes.h"
9 #include "ttlib.h"
10 #include "tt_res.h"
11 #include "prnabort.h"
12
13 #ifdef _DEBUG
14 #define new DEBUG_NEW
15 #undef THIS_FILE
16 static char THIS_FILE[] = __FILE__;
17 #endif
18
19 // CPrnAbortDlg dialog
20 BEGIN_MESSAGE_MAP(CPrnAbortDlg, CDialog)
21 //{{AFX_MSG_MAP(CPrnAbortDlg)
22 //}}AFX_MSG_MAP
23 END_MESSAGE_MAP()
24
25 // CPrnAbortDlg message handler
26 BOOL CPrnAbortDlg::Create(CWnd* p_Parent, PBOOL AbortFlag, PTTSet pts)
27 {
28 BOOL Ok;
29 HWND HParent;
30 LOGFONT logfont;
31 HFONT font;
32
33 m_pParent = p_Parent;
34 if (p_Parent!=NULL)
35 HParent = p_Parent->GetSafeHwnd();
36 else
37 HParent = NULL;
38 Abort = AbortFlag;
39 Ok = (CDialog::Create(CPrnAbortDlg::IDD, m_pParent));
40 if (Ok)
41 {
42 ::EnableWindow(HParent,FALSE);
43 ::EnableWindow(GetSafeHwnd(),TRUE);
44 }
45
46 font = (HFONT)SendMessage(WM_GETFONT, 0, 0);
47 GetObject(font, sizeof(LOGFONT), &logfont);
48 if (get_lang_font("DLG_SYSTEM_FONT", GetSafeHwnd(), &logfont, &DlgFont, pts->UILanguageFile)) {
49 SendDlgItemMessage(IDC_PRNABORT_PRINTING, WM_SETFONT, (WPARAM)DlgFont, MAKELPARAM(TRUE,0));
50 SendDlgItemMessage(IDCANCEL, WM_SETFONT, (WPARAM)DlgFont, MAKELPARAM(TRUE,0));
51 }
52
53 return Ok;
54 }
55
56 void CPrnAbortDlg::OnCancel()
57 {
58 *Abort = TRUE;
59 DestroyWindow();
60 }
61
62 BOOL CPrnAbortDlg::OnCommand(WPARAM wParam, LPARAM lParam)
63 {
64 *Abort = TRUE;
65 DestroyWindow();
66
67 return CDialog::OnCommand(wParam, lParam);
68 }
69
70 void CPrnAbortDlg::PostNcDestroy()
71 {
72 delete this;
73 }
74
75 BOOL CPrnAbortDlg::DestroyWindow()
76 {
77 HWND HParent;
78
79 HParent = m_pParent->GetSafeHwnd();
80 ::EnableWindow(HParent,TRUE);
81 ::SetFocus(HParent);
82 return CDialog::DestroyWindow();
83 }

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