12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- #include "stdafx.h"
- #include "ylgl.h"
- #include "HideWindow.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- HideWindow::HideWindow(CWnd* pParent )
- : CDialog(HideWindow::IDD, pParent)
- {
-
-
-
- }
- void HideWindow::DoDataExchange(CDataExchange* pDX)
- {
- CDialog::DoDataExchange(pDX);
-
-
-
- }
- BEGIN_MESSAGE_MAP(HideWindow, CDialog)
-
-
- END_MESSAGE_MAP()
- BOOL HideWindow::OnInitDialog()
- {
- CDialog::OnInitDialog();
- CString version = _T ("Version 1.0");
- CString rights=AfxGetApp()->GetProfileString (version, "hidewindow", "");
- if(rights.IsEmpty ())rights="111111111111111";
- CStringArray array;
- array.Add (_T("门市流程"));
- array.Add(_T("财务管理"));
- array.Add(_T("统计查询"));
-
- array.Add(_T("短信管理"));
- array.Add(_T("会员管理"));
- array.Add(_T("礼服管理"));
- array.Add(_T("库存管理"));
- array.Add(_T("客户管理"));
- array.Add(_T("来电精灵"));
- array.Add(_T("员工考勤"));
- for(int i=0; i<array.GetSize (); i++)
- {
- GetDlgItem(IDC_CHECK1+i)->SetWindowText (array.ElementAt (i));
- if(rights.Mid (i,1)=="1")
- ((CButton*)GetDlgItem(IDC_CHECK1+i))->SetCheck(1);
- }
-
-
- return TRUE;
-
- }
- void HideWindow::OnOK()
- {
-
- CString ret,temp;
- for(int i=0; i<15; i++)
- {
- temp.Format ("%d",((CButton*)GetDlgItem(IDC_CHECK1+i))->GetCheck());
- ret+=temp;
- }
- CString version = _T ("Version 1.0");
- AfxGetApp()->WriteProfileString (version, "hidewindow", ret);
- MessageBox("保存成功,重启软件生效!");
- CDialog::OnOK();
- }
|