fork download
  1. // DutyView.cpp : implementation file
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include "CorpNet.h"
  6. #include "DutyFrame.h"
  7. #include "DutyView.h"
  8. #include "resource.h"
  9.  
  10.  
  11. // CDutyView
  12.  
  13. IMPLEMENT_DYNCREATE(CDutyView, CXTPReportView)
  14.  
  15. CDutyView::CDutyView()
  16. {
  17.  
  18. }
  19.  
  20. CDutyView::~CDutyView()
  21. {
  22. }
  23.  
  24. BEGIN_MESSAGE_MAP(CDutyView, CXTPReportView)
  25. ON_WM_CREATE()
  26. END_MESSAGE_MAP()
  27.  
  28.  
  29. // CDutyView drawing
  30.  
  31. void CDutyView::OnDraw(CDC* pDC)
  32. {
  33. CDocument* pDoc = GetDocument();
  34. // TODO: add draw code here
  35. }
  36.  
  37.  
  38. // CDutyView diagnostics
  39.  
  40. #ifdef _DEBUG
  41. void CDutyView::AssertValid() const
  42. {
  43. CXTPReportView::AssertValid();
  44. }
  45.  
  46. #ifndef _WIN32_WCE
  47. void CDutyView::Dump(CDumpContext& dc) const
  48. {
  49. CXTPReportView::Dump(dc);
  50. }
  51. #endif
  52. #endif //_DEBUG
  53.  
  54.  
  55. // CDutyView message handlers
  56.  
  57.  
  58. void CDutyView::OnInitialUpdate()
  59. {
  60. CXTPReportView::OnInitialUpdate();
  61.  
  62. CDutyFrame* pFrame = (CDutyFrame*)GetParentFrame();
  63.  
  64. m_wndFilterEdit.SubclassDlgItem(IDC_FILTEREDIT, &pFrame->m_wndFilterEdit);
  65. GetReportCtrl().GetColumns()->GetReportHeader()->SetFilterEditCtrl(&m_wndFilterEdit);
  66.  
  67. m_wndFilterEdit.SetHint(_T("Введите символы фильтра..."));
  68. }
  69.  
  70. void CDutyView::InsertColumn(UINT nIndex, LPCTSTR szTitle, UINT nWidth, UINT nImage)
  71. {
  72. CXTPReportControl& wndReport = GetReportCtrl();
  73. CXTPReportColumn* pColumn;
  74.  
  75. pColumn = wndReport.AddColumn(new CXTPReportColumn(nIndex, szTitle, nWidth, FALSE, nImage));
  76. pColumn->AllowRemove(FALSE);
  77. pColumn->EnableResize(TRUE);
  78. }
  79.  
  80. int CDutyView::OnCreate(LPCREATESTRUCT lpCreateStruct)
  81. {
  82. if (CXTPReportView::OnCreate(lpCreateStruct) == -1)
  83. return -1;
  84.  
  85. VERIFY(m_ilIcons.Create(16, 16, ILC_COLOR24 | ILC_MASK, 0, 1));
  86. CBitmap bmp;
  87. VERIFY(bmp.LoadBitmap(IDB_BMREPORT));
  88. m_ilIcons.Add(&bmp, RGB(255, 0, 255));
  89.  
  90. CXTPReportControl& wndReport = GetReportCtrl();
  91. wndReport.SetImageList(&m_ilIcons);
  92.  
  93. InsertColumn(0, _T("Статус"), 80, 0);
  94. InsertColumn(1, _T("Исполнитель"), 80, -1);
  95. InsertColumn(2, _T("Контракт"), 80, -1);
  96. InsertColumn(3, _T("Дата начала производства"), 80, -1);
  97. InsertColumn(4, _T("Дата окончания производства"), 80, -1);
  98. InsertColumn(5, _T("Проект"), 80, -1);
  99. InsertColumn(6, _T("Налогоплательщик"), 80, -1);
  100. InsertColumn(7, _T("Клиент"), 80, -1);
  101. InsertColumn(8, _T("Описание контракта"), 80, -1);
  102. InsertColumn(9, _T("Цена контракта"), 80, -1);
  103. InsertColumn(10, _T("Сумма НДС"), 80, -1);
  104. InsertColumn(11, _T("Сумма Налогов"), 80, -1);
  105. InsertColumn(12, _T("Примечание"), 80, -1);
  106.  
  107. wndReport.ShowGroupBy(TRUE);
  108.  
  109. return 0;
  110. }
  111.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:4:20: fatal error: stdafx.h: No such file or directory
 #include "stdafx.h"
                    ^
compilation terminated.
stdout
Standard output is empty