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.

71 lines
2.0 KiB

  1. // pageset.cpp : implementation file
  2. //
  3. // This is a part of the Microsoft Foundation Classes C++ library.
  4. // Copyright (C) 1992-1995 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. #include "stdafx.h"
  13. #include "wordpad.h"
  14. #include "resource.h"
  15. #include "pageset.h"
  16. #include "ruler.h"
  17. #include "ddxm.h"
  18. #include "helpids.h"
  19. #ifdef _DEBUG
  20. #undef THIS_FILE
  21. static char BASED_CODE THIS_FILE[] = __FILE__;
  22. #endif
  23. /////////////////////////////////////////////////////////////////////////////
  24. // CPageSetupDlg dialog
  25. const DWORD CPageSetupDlg::m_nHelpIDs[] =
  26. {
  27. IDC_EDIT_TM, IDH_WORDPAD_TOPMARGIN,
  28. IDC_EDIT_BM, IDH_WORDPAD_BOTTOMMARGIN,
  29. IDC_EDIT_LM, IDH_WORDPAD_LEFTMARGIN,
  30. IDC_EDIT_RM, IDH_WORDPAD_RIGHTMARGIN,
  31. IDC_BOX, (DWORD) -1,
  32. 0, 0
  33. };
  34. CPageSetupDlg::CPageSetupDlg(CWnd* pParent /*=NULL*/)
  35. : CCSDialog(CPageSetupDlg::IDD, pParent)
  36. {
  37. //{{AFX_DATA_INIT(CPageSetupDlg)
  38. m_nTopMargin = 0;
  39. m_nRightMargin = 0;
  40. m_nLeftMargin = 0;
  41. m_nBottomMargin = 0;
  42. //}}AFX_DATA_INIT
  43. }
  44. void CPageSetupDlg::DoDataExchange(CDataExchange* pDX)
  45. {
  46. CCSDialog::DoDataExchange(pDX);
  47. //{{AFX_DATA_MAP(CPageSetupDlg)
  48. DDX_Twips(pDX, IDC_EDIT_TM, m_nTopMargin);
  49. DDV_MinMaxTwips(pDX, m_nTopMargin, -31680, 31680);
  50. DDX_Twips(pDX, IDC_EDIT_RM, m_nRightMargin);
  51. DDV_MinMaxTwips(pDX, m_nRightMargin, -31680, 31680);
  52. DDX_Twips(pDX, IDC_EDIT_LM, m_nLeftMargin);
  53. DDV_MinMaxTwips(pDX, m_nLeftMargin, -31680, 31680);
  54. DDX_Twips(pDX, IDC_EDIT_BM, m_nBottomMargin);
  55. DDV_MinMaxTwips(pDX, m_nBottomMargin, -31680, 31680);
  56. //}}AFX_DATA_MAP
  57. }
  58. BEGIN_MESSAGE_MAP(CPageSetupDlg, CCSDialog)
  59. //{{AFX_MSG_MAP(CPageSetupDlg)
  60. //}}AFX_MSG_MAP
  61. END_MESSAGE_MAP()
  62. /////////////////////////////////////////////////////////////////////////////
  63. // CPageSetupDlg message handlers