1
/* Copyright 2000, International Business Machines Corporation and others.
4
This software has been released under the terms of the IBM Public
5
License. For details, see the LICENSE file in the top-level source
6
directory or online at http://www.openafs.org/dl/license10.html
8
// CommandSettings.cpp : implementation file
12
#include "winafsload.h"
13
#include "CommandSettings.h"
18
static char THIS_FILE[] = __FILE__;
21
/////////////////////////////////////////////////////////////////////////////
22
// CCommandSettings dialog
25
CCommandSettings::CCommandSettings(CWnd* pParent /*=NULL*/)
26
: CDialog(CCommandSettings::IDD, pParent)
28
//{{AFX_DATA_INIT(CCommandSettings)
29
m_ConnectOnStart = FALSE;
31
m_LogToWindow = FALSE;
34
m_uMaxPowerRestartDelay = 0;
39
void CCommandSettings::DoDataExchange(CDataExchange* pDX)
41
CDialog::DoDataExchange(pDX);
42
//{{AFX_DATA_MAP(CCommandSettings)
43
DDX_Control(pDX, IDC_OPTIONLINE, m_cOptionLine);
44
DDX_Control(pDX, IDC_CHECKADVANCED, m_cCheckAdvanceDisplay);
45
DDX_Check(pDX, IDC_CONNECTONSTART, m_ConnectOnStart);
46
DDX_Check(pDX, IDC_LOGTOFILE, m_LogToFile);
47
DDX_Check(pDX, IDC_LOGTOWINDOW, m_LogToWindow);
48
DDX_Text(pDX, IDC_USERNAME, m_UserName);
49
DDX_Text(pDX, IDC_MAXLOGINTIME, m_uMaxLoginTime);
50
DDV_MinMaxUInt(pDX, m_uMaxLoginTime, 1, 300);
51
DDX_Text(pDX, IDC_POWERRESTARTDELAY, m_uMaxPowerRestartDelay);
52
DDV_MinMaxUInt(pDX, m_uMaxPowerRestartDelay, 0, 120);
57
BEGIN_MESSAGE_MAP(CCommandSettings, CDialog)
58
//{{AFX_MSG_MAP(CCommandSettings)
59
ON_BN_CLICKED(IDH_SETTINGS, OnSettings)
60
ON_BN_CLICKED(IDC_CHECKADVANCED, OnCheckadvanced)
64
/////////////////////////////////////////////////////////////////////////////
65
// CCommandSettings message handlers
67
void CCommandSettings::OnSettings()
69
// TODO: Add your control notification handler code here
70
::WinHelp(m_hWnd,CWINAFSLOADAPP->m_pszHelpFilePath,HELP_CONTEXT,IDH_SETTINGS);
74
void CCommandSettings::OnCheckadvanced()
76
// TODO: Add your control notification handler code here
77
if (m_cCheckAdvanceDisplay.GetCheck())
79
SetWindowPos(&wndTop,0,0,m_OriginalRect.right-m_OriginalRect.left,m_OriginalRect.bottom-m_OriginalRect.top,SWP_NOMOVE|SWP_NOZORDER);
81
SetWindowPos(&wndTop,0,0,m_OriginalRect.right-m_OriginalRect.left,m_DialogShrink,SWP_NOMOVE|SWP_NOZORDER);
86
BOOL CCommandSettings::OnInitDialog()
88
CDialog::OnInitDialog();
90
// TODO: Add extra initialization here
93
GetWindowRect(&m_OriginalRect);
94
m_cOptionLine.GetWindowRect(&rect);
95
m_DialogShrink=rect.top-m_OriginalRect.top+5; //make it above the edit box
96
SetWindowPos(&wndTop,0,0,m_OriginalRect.right-m_OriginalRect.left,m_DialogShrink,SWP_NOMOVE|SWP_NOZORDER);
97
return TRUE; // return TRUE unless you set the focus to a control
98
// EXCEPTION: OCX Property Pages should return FALSE