summaryrefslogtreecommitdiffabout
path: root/ConfirmWRQDlg.cpp
Unidiff
Diffstat (limited to 'ConfirmWRQDlg.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--ConfirmWRQDlg.cpp89
1 files changed, 89 insertions, 0 deletions
diff --git a/ConfirmWRQDlg.cpp b/ConfirmWRQDlg.cpp
new file mode 100644
index 0000000..c0380e3
--- a/dev/null
+++ b/ConfirmWRQDlg.cpp
@@ -0,0 +1,89 @@
1// ConfirmWRQDlg.cpp : implementation file
2//
3
4#include "stdafx.h"
5#include "PumpKIN.h"
6#include "ConfirmWRQDlg.h"
7
8#include "PumpKINDlg.h"
9
10#ifdef _DEBUG
11#define new DEBUG_NEW
12#undef THIS_FILE
13static char THIS_FILE[] = __FILE__;
14#endif
15
16/////////////////////////////////////////////////////////////////////////////
17// CConfirmWRQDlg dialog
18
19
20CConfirmWRQDlg::CConfirmWRQDlg(CWnd* pParent /*=NULL*/)
21 : CDialog(CConfirmWRQDlg::IDD, pParent)
22{
23 //{{AFX_DATA_INIT(CConfirmWRQDlg)
24 m_File = _T("");
25 m_Host = _T("");
26 //}}AFX_DATA_INIT
27}
28
29
30void CConfirmWRQDlg::DoDataExchange(CDataExchange* pDX)
31{
32 CDialog::DoDataExchange(pDX);
33 //{{AFX_DATA_MAP(CConfirmWRQDlg)
34 DDX_Control(pDX, IDC_RESUME, m_ResumeCtl);
35 DDX_Control(pDX, IDOK, m_OkCtl);
36 DDX_Control(pDX, IDC_RENAME, m_RenameCtl);
37 DDX_Text(pDX, IDC_FILE, m_File);
38 DDX_Text(pDX, IDC_HOST, m_Host);
39 //}}AFX_DATA_MAP
40}
41
42
43BEGIN_MESSAGE_MAP(CConfirmWRQDlg, CDialog)
44 //{{AFX_MSG_MAP(CConfirmWRQDlg)
45 ON_BN_CLICKED(IDC_RENAME, OnRename)
46 ON_WM_TIMER()
47 ON_BN_CLICKED(IDC_RESUME, OnResume)
48 //}}AFX_MSG_MAP
49END_MESSAGE_MAP()
50
51/////////////////////////////////////////////////////////////////////////////
52// CConfirmWRQDlg message handlers
53
54void CConfirmWRQDlg::OnRename()
55{
56 EndDialog(IDC_RENAME);
57}
58
59BOOL CConfirmWRQDlg::OnInitDialog()
60{
61 CDialog::OnInitDialog();
62
63 m_Daddy->m_Daddy->m_bnw.StartSound(m_Daddy->m_Daddy->m_bnwRequest);
64 if(m_Daddy->m_Daddy->m_PromptTimeOut)
65 SetTimer(1,m_Daddy->m_Daddy->m_PromptTimeOut*1000,NULL);
66 SetWindowPos(&CWnd::wndTopMost,0,0,0,0,SWP_NOACTIVATE|SWP_NOMOVE|SWP_NOSIZE);
67 m_ResumeCtl.EnableWindow(m_Daddy->m_bResume);
68 if(m_Daddy->m_Rename){
69 m_OkCtl.SetButtonStyle(m_OkCtl.GetButtonStyle()&~BS_DEFPUSHBUTTON);
70 m_RenameCtl.SetButtonStyle(m_RenameCtl.GetButtonStyle()|BS_DEFPUSHBUTTON);
71 m_RenameCtl.SetFocus();
72 return FALSE;
73 }
74
75 return TRUE; // return TRUE unless you set the focus to a control
76 // EXCEPTION: OCX Property Pages should return FALSE
77}
78
79void CConfirmWRQDlg::OnTimer(UINT nIDEvent)
80{
81 if(nIDEvent==1)
82 EndDialog(IDCANCEL);
83 CDialog::OnTimer(nIDEvent);
84}
85
86void CConfirmWRQDlg::OnResume()
87{
88 EndDialog(IDC_RESUME);
89}