12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- #include "stdafx.h"
- #include "LYFZIPManage.h"
- #include "SetStyle.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- SetStyle::SetStyle(CWnd* pParent )
- : CDialog(SetStyle::IDD, pParent)
- {
-
-
-
- m_style="";
- }
- void SetStyle::DoDataExchange(CDataExchange* pDX)
- {
- CDialog::DoDataExchange(pDX);
-
-
-
- }
- BEGIN_MESSAGE_MAP(SetStyle, CDialog)
-
-
- END_MESSAGE_MAP()
- void SetStyle::OnOK()
- {
-
- m_style=GetRights();
- CDialog::OnOK();
- }
- BOOL SetStyle::OnInitDialog()
- {
- CDialog::OnInitDialog();
-
-
- CStringArray strarray;
- strarray.Add("复古典雅");
- strarray.Add("温文尔雅");
- strarray.Add("豪华艳丽");
- strarray.Add("传统大方");
- strarray.Add("新潮个性");
- strarray.Add("浪漫奔放");
- strarray.Add("简单素雅");
- strarray.Add("活泼俏丽");
- strarray.Add("妩媚温馨");
- strarray.Add("温柔贤惠");
- strarray.Add("成熟感性");
- strarray.Add("清纯可爱");
- for(int i=0; i<12; i++)
- {
- SetDlgItemText(IDC_CHECK1+i, strarray.ElementAt (i));
- }
- SetRights(m_style);
- return TRUE;
-
- }
- CString SetStyle::GetRights()
- {
- CString ret,temp;
- for(int i=0; i<12; i++)
- {
- temp.Format ("%d",((CButton*)GetDlgItem(IDC_CHECK1+i))->GetCheck());
- ret+=temp;
- }
- return ret;
- }
- void SetStyle::SetRights(CString rights)
- {
- for(int i=0; i<rights.GetLength (); i++)
- {
- if(i>=12)break;
- ((CButton*)GetDlgItem(IDC_CHECK1+i))->SetCheck(rights.GetAt (i)=='1');
- }
- }
|