SelectPhotoDlg.cpp 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. // SelectPhotoDlg.cpp : implementation file
  2. //
  3. #include "stdafx.h"
  4. #include "LYFZIPManage.h"
  5. #include "SelectPhotoDlg.h"
  6. #ifdef _DEBUG
  7. #define new DEBUG_NEW
  8. #undef THIS_FILE
  9. static char THIS_FILE[] = __FILE__;
  10. #endif
  11. /////////////////////////////////////////////////////////////////////////////
  12. // SelectPhotoDlg dialog
  13. SelectPhotoDlg::SelectPhotoDlg(CWnd* pParent /*=NULL*/)
  14. : CDialog(SelectPhotoDlg::IDD, pParent)
  15. {
  16. //{{AFX_DATA_INIT(SelectPhotoDlg)
  17. m_mode = 0;
  18. m_check1 = 1;
  19. //}}AFX_DATA_INIT
  20. }
  21. void SelectPhotoDlg::DoDataExchange(CDataExchange* pDX)
  22. {
  23. CDialog::DoDataExchange(pDX);
  24. //{{AFX_DATA_MAP(SelectPhotoDlg)
  25. DDX_Radio(pDX, IDC_RADIO1, m_mode);
  26. DDX_Check(pDX, IDC_CHECK1, m_check1);
  27. //}}AFX_DATA_MAP
  28. }
  29. BEGIN_MESSAGE_MAP(SelectPhotoDlg, CDialog)
  30. //{{AFX_MSG_MAP(SelectPhotoDlg)
  31. //}}AFX_MSG_MAP
  32. END_MESSAGE_MAP()
  33. /////////////////////////////////////////////////////////////////////////////
  34. // SelectPhotoDlg message handlers
  35. void SelectPhotoDlg::OnOK()
  36. {
  37. // TODO: Add extra validation here
  38. UpdateData();
  39. CString version = _T ("Version 1.0");
  40. AfxGetApp()->WriteProfileInt (version, "appendname", m_check1);
  41. CDialog::OnOK();
  42. }
  43. BOOL SelectPhotoDlg::OnInitDialog()
  44. {
  45. CDialog::OnInitDialog();
  46. // TODO: Add extra initialization here
  47. CString version = _T ("Version 1.0");
  48. m_check1=AfxGetApp()->GetProfileInt (version, "appendname", 1);
  49. UpdateData(false);
  50. return TRUE; // return TRUE unless you set the focus to a control
  51. // EXCEPTION: OCX Property Pages should return FALSE
  52. }
  53. void SelectPhotoDlg::OnCancel()
  54. {
  55. // TODO: Add extra cleanup here
  56. UpdateData();
  57. CString version = _T ("Version 1.0");
  58. AfxGetApp()->WriteProfileInt (version, "appendname", m_check1);
  59. CDialog::OnOK();
  60. }