home *** CD-ROM | disk | FTP | other *** search
- // mydlg.cpp : implementation file
- //
-
- #include "stdafx.h"
- #include "myradio.h"
- #include "mydlg.h"
-
- #ifdef _DEBUG
- #undef THIS_FILE
- static char BASED_CODE THIS_FILE[] = __FILE__;
- #endif
-
- /////////////////////////////////////////////////////////////////////////////
- // CMyDlg dialog
-
-
- CMyDlg::CMyDlg(CWnd* pParent /*=NULL*/)
- : CDialog(CMyDlg::IDD, pParent)
- {
- //{{AFX_DATA_INIT(CMyDlg)
-
- //////////////////////
- // MY CODE STARTS HERE
- //////////////////////
-
- m_BeepStatus = 2; // Third radio button
- m_VoiceStatus = 1; // Second radio button
-
-
- ////////////////////
- // MY CODE ENDS HERE
- ////////////////////
-
- //}}AFX_DATA_INIT
-
- }
-
- void CMyDlg::DoDataExchange(CDataExchange* pDX)
- {
- CDialog::DoDataExchange(pDX);
- //{{AFX_DATA_MAP(CMyDlg)
- DDX_Radio(pDX, IDC_RADIO_BEEP1, m_BeepStatus);
- DDX_Radio(pDX, IDC_RADIO_HELLO, m_VoiceStatus);
- //}}AFX_DATA_MAP
- }
-
- BEGIN_MESSAGE_MAP(CMyDlg, CDialog)
- //{{AFX_MSG_MAP(CMyDlg)
- ON_BN_CLICKED(IDC_DEFAULT, OnDefault)
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
-
-
- /////////////////////////////////////////////////////////////////////////////
- // CMyDlg message handlers
-
- void CMyDlg::OnDefault()
- {
- // TODO: Add your control notification handler code here
-
-
- //////////////////////
- // MY CODE STARTS HERE
- //////////////////////
-
-
- // Set the default values for the variables of
- // the radio buttons.
- m_BeepStatus = 2; // Third radio button
- m_VoiceStatus = 1; // Second radio button
-
- // Update the screen with the values of the variables.
- UpdateData (FALSE );
-
- ////////////////////
- // MY CODE ENDS HERE
- ////////////////////
- }
-