Develop and Download Open Source Software

Browse Subversion Repository

Annotation of /trunk/teraterm/teraterm/prnabort.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3392 - (hide annotations) (download) (as text)
Tue May 12 11:55:27 2009 UTC (14 years, 11 months ago) by maya
File MIME type: text/x-c++src
File size: 1824 byte(s)
インデントを調整。コード的な変更はないはず。
1 maya 3227 /* 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 maya 3392 BOOL Ok;
29     HWND HParent;
30     LOGFONT logfont;
31     HFONT font;
32 maya 3227
33 maya 3392 m_pParent = p_Parent;
34     if (p_Parent!=NULL) {
35     HParent = p_Parent->GetSafeHwnd();
36     }
37     else {
38     HParent = NULL;
39     }
40     Abort = AbortFlag;
41     Ok = (CDialog::Create(CPrnAbortDlg::IDD, m_pParent));
42     if (Ok) {
43     ::EnableWindow(HParent,FALSE);
44     ::EnableWindow(GetSafeHwnd(),TRUE);
45     }
46 maya 3227
47 maya 3392 font = (HFONT)SendMessage(WM_GETFONT, 0, 0);
48     GetObject(font, sizeof(LOGFONT), &logfont);
49     if (get_lang_font("DLG_SYSTEM_FONT", GetSafeHwnd(), &logfont, &DlgFont, pts->UILanguageFile)) {
50     SendDlgItemMessage(IDC_PRNABORT_PRINTING, WM_SETFONT, (WPARAM)DlgFont, MAKELPARAM(TRUE,0));
51     SendDlgItemMessage(IDCANCEL, WM_SETFONT, (WPARAM)DlgFont, MAKELPARAM(TRUE,0));
52     }
53 maya 3227
54 maya 3392 return Ok;
55 maya 3227 }
56    
57     void CPrnAbortDlg::OnCancel()
58     {
59 maya 3392 *Abort = TRUE;
60     DestroyWindow();
61 maya 3227 }
62    
63     BOOL CPrnAbortDlg::OnCommand(WPARAM wParam, LPARAM lParam)
64     {
65 maya 3392 *Abort = TRUE;
66     DestroyWindow();
67    
68     return CDialog::OnCommand(wParam, lParam);
69 maya 3227 }
70    
71     void CPrnAbortDlg::PostNcDestroy()
72     {
73 maya 3392 delete this;
74 maya 3227 }
75    
76     BOOL CPrnAbortDlg::DestroyWindow()
77     {
78 maya 3392 HWND HParent;
79 maya 3227
80 maya 3392 HParent = m_pParent->GetSafeHwnd();
81     ::EnableWindow(HParent,TRUE);
82     ::SetFocus(HParent);
83     return CDialog::DestroyWindow();
84 maya 3227 }

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