UserInfoDlg.cpp
上传用户:yffx2008
上传日期:2014-10-12
资源大小:12414k
文件大小:2k
- // UserInfoDlg.cpp : implementation file
- //
- #include "stdafx.h"
- #include "gpssc.h"
- #include "UserInfoDlg.h"
- #include "EditPasswordDlg.h"
- #include "UserSet.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // CUserInfoDlg dialog
- CUserInfoDlg::CUserInfoDlg(CWnd* pParent /*=NULL*/)
- : CDialog(CUserInfoDlg::IDD, pParent)
- {
- //{{AFX_DATA_INIT(CUserInfoDlg)
- // NOTE: the ClassWizard will add member initialization here
- //}}AFX_DATA_INIT
- }
- void CUserInfoDlg::DoDataExchange(CDataExchange* pDX)
- {
- CDialog::DoDataExchange(pDX);
- //{{AFX_DATA_MAP(CUserInfoDlg)
- DDX_Control(pDX, IDC_USER_TREE, m_CtrlTree);
- //}}AFX_DATA_MAP
- }
- BEGIN_MESSAGE_MAP(CUserInfoDlg, CDialog)
- //{{AFX_MSG_MAP(CUserInfoDlg)
- ON_BN_CLICKED(IDC_EDIT_PASSWORD, OnEditPassword)
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // CUserInfoDlg message handlers
- void CUserInfoDlg::OnEditPassword()
- {
- // TODO: Add your control notification handler code here
- CEditPasswordDlg dlg;
- CString strTreeItem = m_CtrlTree.GetItemText(m_CtrlTree.GetSelectedItem());
- if ((strTreeItem=="管理员")||(strTreeItem=="普通用户"))
- {
- dlg.m_strUserName = strTreeItem;
- dlg.DoModal();
- }
- }
- BOOL CUserInfoDlg::OnInitDialog()
- {
- CDialog::OnInitDialog();
-
- // TODO: Add extra initialization here
- HTREEITEM hTreeItem;
- hTreeItem = m_CtrlTree.InsertItem(_T("登录用户"));
- // cSet.LoadUser(m_CtrlTree,hTreeItem);
- m_CtrlTree.InsertItem(_T("管理员"),hTreeItem);
- m_CtrlTree.InsertItem(_T("普通用户"),hTreeItem);
- m_CtrlTree.InsertItem(_T("来宾"),hTreeItem);
- m_CtrlTree.Expand(hTreeItem,TVE_EXPAND);
- return TRUE; // return TRUE unless you set the focus to a control
- // EXCEPTION: OCX Property Pages should return FALSE
- }