Leaked source code of windows server 2003
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.

63 lines
1.5 KiB

  1. // MSConfigFind.cpp : implementation file
  2. //
  3. #include "stdafx.h"
  4. #include "msconfig.h"
  5. #include "MSConfigFind.h"
  6. #ifdef _DEBUG
  7. #define new DEBUG_NEW
  8. #undef THIS_FILE
  9. static char THIS_FILE[] = __FILE__;
  10. #endif
  11. /////////////////////////////////////////////////////////////////////////////
  12. // CMSConfigFind dialog
  13. CMSConfigFind::CMSConfigFind(CWnd* pParent /*=NULL*/)
  14. : CDialog(CMSConfigFind::IDD, pParent)
  15. {
  16. //{{AFX_DATA_INIT(CMSConfigFind)
  17. m_fSearchFromTop = FALSE;
  18. m_strSearchFor = _T("");
  19. //}}AFX_DATA_INIT
  20. }
  21. void CMSConfigFind::DoDataExchange(CDataExchange* pDX)
  22. {
  23. CDialog::DoDataExchange(pDX);
  24. //{{AFX_DATA_MAP(CMSConfigFind)
  25. DDX_Check(pDX, IDC_CHECK1, m_fSearchFromTop);
  26. DDX_Text(pDX, IDC_SEARCHFOR, m_strSearchFor);
  27. //}}AFX_DATA_MAP
  28. }
  29. BEGIN_MESSAGE_MAP(CMSConfigFind, CDialog)
  30. //{{AFX_MSG_MAP(CMSConfigFind)
  31. ON_EN_CHANGE(IDC_SEARCHFOR, OnChangeSearchFor)
  32. //}}AFX_MSG_MAP
  33. END_MESSAGE_MAP()
  34. /////////////////////////////////////////////////////////////////////////////
  35. // CMSConfigFind message handlers
  36. void CMSConfigFind::OnChangeSearchFor()
  37. {
  38. CString str;
  39. GetDlgItemText(IDC_SEARCHFOR, str);
  40. ::EnableWindow(GetDlgItem(IDOK)->GetSafeHwnd(), !str.IsEmpty());
  41. }
  42. BOOL CMSConfigFind::OnInitDialog()
  43. {
  44. CDialog::OnInitDialog();
  45. CString str;
  46. GetDlgItemText(IDC_SEARCHFOR, str);
  47. ::EnableWindow(GetDlgItem(IDOK)->GetSafeHwnd(), !str.IsEmpty());
  48. return TRUE; // return TRUE unless you set the focus to a control
  49. }