home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / mfc / general / dlgcbr32 / ratedlg.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1998-03-27  |  2.0 KB  |  73 lines

  1. // RateDlg.cpp : Implementation file
  2. //
  3.  
  4. // This is a part of the Microsoft Foundation Classes C++ library.
  5. // Copyright (C) 1992-1998 Microsoft Corporation
  6. // All rights reserved.
  7. //
  8. // This source code is only intended as a supplement to the
  9. // Microsoft Foundation Classes Reference and related
  10. // electronic documentation provided with the library.
  11. // See these sources for detailed information regarding the
  12. // Microsoft Foundation Classes product.
  13.  
  14. /*****************************************************************************
  15.   Purpose:
  16.     Implements CRateDlg, which allows the user to specify how often to
  17.     update the main dialog display.
  18.  
  19.   Functions:
  20.     CRateDlg::CRateDlg()            -- constructor
  21.     CRateDlg::DoDataExchange()      -- dialog data exchange/validation
  22.     CRateDlg::OnInitDialog()        -- initialize dialog
  23.  
  24.   Development Team:
  25.     Mary Kirtland
  26.   Ported to 32-bit by:
  27.     Mike Hedley
  28.   Created by Microsoft Product Support Services, Premier ISV Support
  29.   Copyright (c) 1998 Microsoft Corporation. All rights reserved.
  30. \****************************************************************************/
  31.  
  32. #include "stdafx.h"
  33. #include "resource.h"
  34. #include "ratedlg.h"
  35.  
  36. #ifdef _DEBUG
  37. #define new DEBUG_NEW
  38. #undef THIS_FILE
  39. static char THIS_FILE[] = __FILE__;
  40. #endif
  41.  
  42. /////////////////////////////////////////////////////////////////////////////
  43. // CRateDlg dialog
  44.  
  45. CRateDlg::CRateDlg(UINT iRate, CWnd* pParent /*=NULL*/)
  46.     : CDialog(CRateDlg::IDD, pParent)
  47. {
  48.     //{{AFX_DATA_INIT(CRateDlg)
  49.     //}}AFX_DATA_INIT
  50.     m_iRate = iRate;
  51. }
  52.  
  53. void CRateDlg::DoDataExchange(CDataExchange* pDX)
  54. {
  55.     CDialog::DoDataExchange(pDX);
  56.     //{{AFX_DATA_MAP(CRateDlg)
  57.     DDX_Text(pDX, IDC_INTERVAL, m_iRate);
  58.     DDV_MinMaxUInt(pDX, m_iRate, 0, 3600);
  59.     //}}AFX_DATA_MAP
  60. }
  61.  
  62. BOOL CRateDlg::OnInitDialog()
  63. {
  64.     CDialog::OnInitDialog();
  65.     CenterWindow();
  66.     return TRUE;
  67. }
  68.  
  69. BEGIN_MESSAGE_MAP(CRateDlg, CDialog)
  70.     //{{AFX_MSG_MAP(CRateDlg)
  71.     //}}AFX_MSG_MAP
  72. END_MESSAGE_MAP()
  73.