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

  1. // rectdlg.cpp : implementation file
  2. //
  3. // This is a part of the Microsoft Foundation Classes C++ library.
  4. // Copyright (C) 1992-1998 Microsoft Corporation
  5. // All rights reserved.
  6. //
  7. // This source code is only intended as a supplement to the
  8. // Microsoft Foundation Classes Reference and related
  9. // electronic documentation provided with the library.
  10. // See these sources for detailed information regarding the
  11. // Microsoft Foundation Classes product.
  12.  
  13.  
  14. #include "stdafx.h"
  15. #include "drawcli.h"
  16. #include "rectdlg.h"
  17.  
  18. #ifdef _DEBUG
  19. #undef THIS_FILE
  20. static char BASED_CODE THIS_FILE[] = __FILE__;
  21. #endif
  22.  
  23. /////////////////////////////////////////////////////////////////////////////
  24. // CRectDlg dialog
  25.  
  26. CRectDlg::CRectDlg(CWnd* /*pParent = NULL*/)
  27.     : CPropertyPage(CRectDlg::IDD)
  28. {
  29.     //{{AFX_DATA_INIT(CRectDlg)
  30.     m_bNoFill = FALSE;
  31.     m_penSize = 0;
  32.     //}}AFX_DATA_INIT
  33. }
  34.  
  35. void CRectDlg::DoDataExchange(CDataExchange* pDX)
  36. {
  37.     CDialog::DoDataExchange(pDX);
  38.     //{{AFX_DATA_MAP(CRectDlg)
  39.     DDX_Control(pDX, IDC_SPIN1, m_SpinCtrl);
  40.     DDX_Check(pDX, IDC_NOFILL, m_bNoFill);
  41.     DDX_Text(pDX, IDC_WEIGHT, m_penSize);
  42.     DDV_MinMaxUInt(pDX, m_penSize, 0, 100);
  43.     //}}AFX_DATA_MAP
  44. }
  45.  
  46. BEGIN_MESSAGE_MAP(CRectDlg, CDialog)
  47.     //{{AFX_MSG_MAP(CRectDlg)
  48.     //}}AFX_MSG_MAP
  49. END_MESSAGE_MAP()
  50.  
  51. /////////////////////////////////////////////////////////////////////////////
  52. // CRectDlg message handlers
  53.  
  54. BOOL CRectDlg::OnInitDialog()
  55. {
  56.     CDialog::OnInitDialog();
  57.  
  58.     m_SpinCtrl.SetRange(0, 100);
  59.     m_SpinCtrl.SetBase(10);
  60.     m_SpinCtrl.SetPos(1);
  61.     return TRUE;
  62. }
  63.