Old fashion design for PC-104
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

85 lines
2.0 KiB

4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. //----------------------------------------------------------------------------
  2. // Laser Guard Ltd.
  3. // Copyright � 2000-2002. All Rights Reserved.
  4. // Version 1.0 01/01/2000
  5. // Last modification: 08/10/2003
  6. // PROJECT:
  7. // SUBSYSTEM:
  8. // FILE: SetupDlg.cpp
  9. // AUTHOR: Sergey Chizhevskiy
  10. // OVERVIEW
  11. // ~~~~~~~~
  12. // Source file of SetupDlg.cpp
  13. //----------------------------------------------------------------------------
  14. // SetupDlg.cpp : implementation file
  15. //
  16. #include "stdafx.h"
  17. #include "Calibration.h"
  18. #include "SetupDlg.h"
  19. #ifdef _DEBUG
  20. #define new DEBUG_NEW
  21. #undef THIS_FILE
  22. static char THIS_FILE[] = __FILE__;
  23. #endif
  24. /////////////////////////////////////////////////////////////////////////////
  25. // CSetupDlg dialog
  26. CSetupDlg::CSetupDlg(CWnd* pParent /*=NULL*/)
  27. : CDialog(CSetupDlg::IDD, pParent)
  28. {
  29. //{{AFX_DATA_INIT(CSetupDlg)
  30. // NOTE: the ClassWizard will add member initialization here
  31. //}}AFX_DATA_INIT
  32. m_SetupName = _T("");
  33. }
  34. void CSetupDlg::DoDataExchange(CDataExchange* pDX)
  35. {
  36. CDialog::DoDataExchange(pDX);
  37. //{{AFX_DATA_MAP(CSetupDlg)
  38. DDX_Control(pDX, IDC_LIST_SETUP, m_List);
  39. //}}AFX_DATA_MAP
  40. }
  41. BEGIN_MESSAGE_MAP(CSetupDlg, CDialog)
  42. //{{AFX_MSG_MAP(CSetupDlg)
  43. //}}AFX_MSG_MAP
  44. END_MESSAGE_MAP()
  45. /////////////////////////////////////////////////////////////////////////////
  46. // CSetupDlg message handlers
  47. BOOL CSetupDlg::OnInitDialog()
  48. {
  49. CDialog::OnInitDialog();
  50. CFileFind finder;
  51. BOOL bWorking = finder.FindFile( _T("*.lgs") );
  52. while( bWorking )
  53. {
  54. bWorking = finder.FindNextFile();
  55. m_List.AddString( finder.GetFileName() );
  56. }
  57. return TRUE; // return TRUE unless you set the focus to a control
  58. // EXCEPTION: OCX Property Pages should return FALSE
  59. }
  60. void CSetupDlg::OnOK()
  61. {
  62. int nIndex = m_List.GetCurSel();
  63. if( nIndex == LB_ERR )
  64. {
  65. CDialog::OnCancel();
  66. return;
  67. }
  68. m_List.GetText( nIndex, m_SetupName );
  69. CDialog::OnOK();
  70. }