NTUserOptionsTab.cpp
资源名称:warftpd.zip [点击查看]
上传用户:surprise9
上传日期:2007-01-04
资源大小:426k
文件大小:2k
源码类别:
Ftp客户端
开发平台:
Visual C++
- // NTUserOptionsTab.cpp : implementation file
- //
- #include "stdafx.h"
- #include "WarClient.h"
- #include "resource.h"
- #include "UserDialog.h"
- #include "NTUserOptionsTab.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // CNTUserOptionsTab dialog
- CNTUserOptionsTab::CNTUserOptionsTab(CWnd* pParent /*=NULL*/)
- : CWarUserDlgTemplate(CNTUserOptionsTab::IDD, pParent)
- {
- //{{AFX_DATA_INIT(CNTUserOptionsTab)
- m_NTuser = FALSE;
- //}}AFX_DATA_INIT
- }
- void CNTUserOptionsTab::DoDataExchange(CDataExchange* pDX)
- {
- CDialog::DoDataExchange(pDX);
- //{{AFX_DATA_MAP(CNTUserOptionsTab)
- DDX_Control(pDX, IDC_NT_SECEXT_CHECK1, m_ctlNTUser);
- DDX_Check(pDX, IDC_NT_SECEXT_CHECK1, m_NTuser);
- //}}AFX_DATA_MAP
- if (pDX->m_bSaveAndValidate)
- {
- // Update user
- }
- else
- {
- // Update dialog
- CUserInfo *pInfo = m_pUserDlg->GetCurrentUser();
- // Only allow access to actual users
- m_ctlNTUser.EnableWindow(pInfo && (pInfo->m_AliasFor == INVALID_USER_VALUE)&& (pInfo->m_Type == UT_USER));
- m_ctlNTUser.SetCheck(0);
- if (pInfo && (pInfo->m_AliasFor == INVALID_USER_VALUE) && (pInfo->m_Type == UT_USER))
- {
- USER Origin;
- m_pUserDlg->RefreshChkButton(&m_ctlNTUser, "NT User", Origin);
- }
- }
- }
- BEGIN_MESSAGE_MAP(CNTUserOptionsTab, CWarUserDlgTemplate)
- //{{AFX_MSG_MAP(CNTUserOptionsTab)
- ON_BN_CLICKED(IDC_NT_SECEXT_CHECK1, OnNtSecextCheck1)
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // CNTUserOptionsTab message handlers
- void CNTUserOptionsTab::OnNtSecextCheck1()
- {
- USER Origin;
- // When we use ChkButtonClikked(), the auto state of the dialog button
- // must be disabled! ChkButtonClikked() will trigger the state.
- m_pUserDlg->ChkButtonClikked(&m_ctlNTUser, "NT user");
- m_pUserDlg->RefreshChkButton(&m_ctlNTUser, "NT user", Origin);
- }