1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- // HideWindow.cpp : implementation file
- //
- #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 dialog
- HideWindow::HideWindow(CWnd* pParent /*=NULL*/)
- : CDialog(HideWindow::IDD, pParent)
- {
- //{{AFX_DATA_INIT(HideWindow)
- // NOTE: the ClassWizard will add member initialization here
- //}}AFX_DATA_INIT
- }
- void HideWindow::DoDataExchange(CDataExchange* pDX)
- {
- CDialog::DoDataExchange(pDX);
- //{{AFX_DATA_MAP(HideWindow)
- // NOTE: the ClassWizard will add DDX and DDV calls here
- //}}AFX_DATA_MAP
- }
- BEGIN_MESSAGE_MAP(HideWindow, CDialog)
- //{{AFX_MSG_MAP(HideWindow)
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // HideWindow message handlers
- 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("来电精灵"));
- 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);
- }
- // TODO: Add extra initialization here
-
- return TRUE; // return TRUE unless you set the focus to a control
- // EXCEPTION: OCX Property Pages should return FALSE
- }
- void HideWindow::OnOK()
- {
- // TODO: Add extra validation here
- 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();
- }
|