home *** CD-ROM | disk | FTP | other *** search
- // FindDlg.cpp : implementation file
- //
-
- #include "stdafx.h"
- #include "Browser.h"
- #include "FindDlg.h"
-
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
-
- /////////////////////////////////////////////////////////////////////////////
- // CFindDlg dialog
-
-
- CFindDlg::CFindDlg(CWnd* pParent /*=NULL*/)
- : CDialog(CFindDlg::IDD, pParent)
- {
- //{{AFX_DATA_INIT(CFindDlg)
- m_nMatchType = -1;
- m_strFind = _T("");
- //}}AFX_DATA_INIT
- }
-
-
- void CFindDlg::DoDataExchange(CDataExchange* pDX)
- {
- CDialog::DoDataExchange(pDX);
- //{{AFX_DATA_MAP(CFindDlg)
- DDX_Radio(pDX, IDC_RADIO_MATCH, m_nMatchType);
- DDX_Text(pDX, IDC_EDIT1, m_strFind);
- //}}AFX_DATA_MAP
- }
-
-
- BEGIN_MESSAGE_MAP(CFindDlg, CDialog)
- //{{AFX_MSG_MAP(CFindDlg)
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
-
- /////////////////////////////////////////////////////////////////////////////
- // CFindDlg message handlers
-
- BOOL CFindDlg::OnInitDialog()
- {
- CDialog::OnInitDialog();
- // TODO: Add extra initialization here
-
- CButton * pRadio;
- if ( EXACT == m_nMatchType ) //Must not be a text field
- {
- pRadio = ( CButton * ) GetDlgItem( IDC_RADIO_MATCH2 ); //EXACT
- pRadio->EnableWindow( TRUE );
- pRadio = ( CButton * ) GetDlgItem( IDC_RADIO_MATCH ); //LIKE
- pRadio->EnableWindow( FALSE );
- pRadio = ( CButton * ) GetDlgItem( IDC_RADIO_MATCH3 ); //CONTAINS
- pRadio->EnableWindow( FALSE );
- }
- else //We can do anything with text
- {
- pRadio = ( CButton * ) GetDlgItem( IDC_RADIO_MATCH2 );
- pRadio->EnableWindow( TRUE );
- pRadio = ( CButton * ) GetDlgItem( IDC_RADIO_MATCH );
- pRadio->EnableWindow( TRUE );
- pRadio = ( CButton * ) GetDlgItem( IDC_RADIO_MATCH3 );
- pRadio->EnableWindow( TRUE );
- }
-
- return TRUE; // return TRUE unless you set the focus to a control
- // EXCEPTION: OCX Property Pages should return FALSE
- }
-