// AccessRights.cpp : implementation file // #include "stdafx.h" #include "datasyncsend.h" #include "AccessRights.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif extern CString g_enterprisename; ///////////////////////////////////////////////////////////////////////////// // AccessRights dialog AccessRights::AccessRights(CWnd* pParent /*=NULL*/) : CDialog(AccessRights::IDD, pParent) { //{{AFX_DATA_INIT(AccessRights) // NOTE: the ClassWizard will add member initialization here //}}AFX_DATA_INIT } void AccessRights::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(AccessRights) DDX_Control(pDX, IDC_COMBO1, m_combo1); DDX_Control(pDX, IDC_LIST3, m_List2); DDX_Control(pDX, IDC_LIST1, m_List1); //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(AccessRights, CDialog) //{{AFX_MSG_MAP(AccessRights) ON_BN_CLICKED(IDC_BUTTON1, OnButton1) ON_BN_CLICKED(IDC_BUTTON2, OnButton2) ON_CBN_SELCHANGE(IDC_COMBO1, OnSelchangeCombo1) //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // AccessRights message handlers extern CArrayg_List1array; BOOL AccessRights::OnInitDialog() { CDialog::OnInitDialog(); // TODO: Add extra initialization here for(int i=0; i=0; ii--) { if(g_enterprisename!=m_List1array.ElementAt (ii).ElementAt (0)) m_List1array.RemoveAt(ii); } } int size=m_List1array.GetSize (); CString str; for(i=0; iWriteProfileInt (version, "needupload", 1); AfxMessageBox("保存成功!"); } void AccessRights::SaveToArray() { int pos=m_combo1.GetCurSel(); if(pos==-1) { return; } CString str; m_combo1.GetLBText (pos, str); int size=m_List1array.GetSize (); for(int j=0; j