AllocationOptionsDlg.cpp
上传用户:szled88
上传日期:2015-04-09
资源大小:43957k
文件大小:2k
源码类别:

对话框与窗口

开发平台:

Visual C++

  1. // AllocationOptionsDlg.cpp : implementation file
  2. //
  3. #include "stdafx.h"
  4. #include "reportcustomheap.h"
  5. #include "AllocationOptionsDlg.h"
  6. #ifdef _DEBUG
  7. #define new DEBUG_NEW
  8. #undef THIS_FILE
  9. static char THIS_FILE[] = __FILE__;
  10. #endif
  11. /////////////////////////////////////////////////////////////////////////////
  12. // CAllocationOptionsDlg dialog
  13. CAllocationOptionsDlg::CAllocationOptionsDlg(CWnd* pParent /*=NULL*/)
  14. : CDialog(CAllocationOptionsDlg::IDD, pParent)
  15. {
  16. //{{AFX_DATA_INIT(CAllocationOptionsDlg)
  17. // NOTE: the ClassWizard will add member initialization here
  18. //}}AFX_DATA_INIT
  19. }
  20. void CAllocationOptionsDlg::DoDataExchange(CDataExchange* pDX)
  21. {
  22. CDialog::DoDataExchange(pDX);
  23. //{{AFX_DATA_MAP(CAllocationOptionsDlg)
  24. DDX_Control(pDX, IDC_CHK_USE_CUSTOM_HEAP, m_ctrlUseCustomHeap);
  25. DDX_Control(pDX, IDC_CHK_ENABLE_ROW_BATCH_ALLOCATION, m_ctrlRowsBatchAlloc);
  26. //}}AFX_DATA_MAP
  27. }
  28. BEGIN_MESSAGE_MAP(CAllocationOptionsDlg, CDialog)
  29. //{{AFX_MSG_MAP(CAllocationOptionsDlg)
  30. //}}AFX_MSG_MAP
  31. END_MESSAGE_MAP()
  32. /////////////////////////////////////////////////////////////////////////////
  33. // CAllocationOptionsDlg message handlers
  34. BOOL CAllocationOptionsDlg::OnInitDialog() 
  35. {
  36. CDialog::OnInitDialog();
  37. m_ctrlUseCustomHeap.SetCheck(1);
  38. m_ctrlRowsBatchAlloc.SetCheck(1);
  39. return TRUE;  // return TRUE unless you set the focus to a control
  40.               // EXCEPTION: OCX Property Pages should return FALSE
  41. }
  42. void CAllocationOptionsDlg::OnOK() 
  43. {
  44. if (m_ctrlUseCustomHeap.GetCheck())
  45. {
  46. VERIFY(CXTPReportControl::UseReportCustomHeap());
  47. }
  48. if (m_ctrlRowsBatchAlloc.GetCheck())
  49. {
  50. CXTPReportControl::UseRowBatchAllocation();
  51. }
  52. CDialog::OnOK();
  53. }