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.

90 lines
2.1 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 "chicago.h"
  18. #include "SetupDlg.h"
  19. #include "..\..\LgLib\Version.h"
  20. #ifdef _DEBUG
  21. #define new DEBUG_NEW
  22. #undef THIS_FILE
  23. static char THIS_FILE[] = __FILE__;
  24. #endif
  25. /////////////////////////////////////////////////////////////////////////////
  26. // CSetupDlg dialog
  27. CSetupDlg::CSetupDlg(CWnd* pParent /*=NULL*/)
  28. : CDialog(CSetupDlg::IDD, pParent)
  29. {
  30. //{{AFX_DATA_INIT(CSetupDlg)
  31. // NOTE: the ClassWizard will add member initialization here
  32. //}}AFX_DATA_INIT
  33. m_SetupName = _T("");
  34. LGLOG( LOG_LEVEL_MEDIUM, LOG_TYPE_INFO, this, _T("CSetupDlg::CSetupDlg") );
  35. }
  36. void CSetupDlg::DoDataExchange(CDataExchange* pDX)
  37. {
  38. CDialog::DoDataExchange(pDX);
  39. //{{AFX_DATA_MAP(CSetupDlg)
  40. DDX_Control(pDX, IDC_LIST_SETUP, m_List);
  41. //}}AFX_DATA_MAP
  42. }
  43. BEGIN_MESSAGE_MAP(CSetupDlg, CDialog)
  44. //{{AFX_MSG_MAP(CSetupDlg)
  45. //}}AFX_MSG_MAP
  46. END_MESSAGE_MAP()
  47. /////////////////////////////////////////////////////////////////////////////
  48. // CSetupDlg message handlers
  49. BOOL CSetupDlg::OnInitDialog()
  50. {
  51. CDialog::OnInitDialog();
  52. SetWindowPos( &wndTopMost, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE );
  53. CFileFind finder;
  54. BOOL bWorking = finder.FindFile( _T("*.lgs") );
  55. while( bWorking )
  56. {
  57. bWorking = finder.FindNextFile();
  58. m_List.AddString( finder.GetFileName() );
  59. }
  60. return TRUE; // return TRUE unless you set the focus to a control
  61. // EXCEPTION: OCX Property Pages should return FALSE
  62. }
  63. void CSetupDlg::OnOK()
  64. {
  65. int nIndex = m_List.GetCurSel();
  66. if( nIndex == LB_ERR )
  67. {
  68. CDialog::OnCancel();
  69. return;
  70. }
  71. m_List.GetText( nIndex, m_SetupName );
  72. CDialog::OnOK();
  73. }