1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- #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 rights=AfxGetApp()->GetProfileString (LYFZVERSION, "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;
- }
- AfxGetApp()->WriteProfileString (LYFZVERSION, "hidewindow", ret);
- MessageBox("保存成功,重启软件生效!");
- CDialog::OnOK();
- }
|