PropertyFormView.cpp 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. // PropertyFormView.cpp : implementation file
  2. //
  3. #include "stdafx.h"
  4. #include "demo.h"
  5. #include "PropertyFormView.h"
  6. #ifdef _DEBUG
  7. #define new DEBUG_NEW
  8. #undef THIS_FILE
  9. static char THIS_FILE[] = __FILE__;
  10. #endif
  11. /////////////////////////////////////////////////////////////////////////////
  12. // CPropertyFormView
  13. IMPLEMENT_DYNCREATE(CPropertyFormView, CResizableFormView)
  14. CPropertyFormView::CPropertyFormView()
  15. : CResizableFormView(CPropertyFormView::IDD)
  16. {
  17. //{{AFX_DATA_INIT(CPropertyFormView)
  18. // NOTE: the ClassWizard will add member initialization here
  19. //}}AFX_DATA_INIT
  20. }
  21. CPropertyFormView::~CPropertyFormView()
  22. {
  23. }
  24. void CPropertyFormView::DoDataExchange(CDataExchange* pDX)
  25. {
  26. CResizableFormView::DoDataExchange(pDX);
  27. //{{AFX_DATA_MAP(CPropertyFormView)
  28. // NOTE: the ClassWizard will add DDX and DDV calls here
  29. //}}AFX_DATA_MAP
  30. }
  31. BEGIN_MESSAGE_MAP(CPropertyFormView, CResizableFormView)
  32. //{{AFX_MSG_MAP(CPropertyFormView)
  33. //}}AFX_MSG_MAP
  34. END_MESSAGE_MAP()
  35. /////////////////////////////////////////////////////////////////////////////
  36. // CPropertyFormView diagnostics
  37. #ifdef _DEBUG
  38. void CPropertyFormView::AssertValid() const
  39. {
  40. CResizableFormView::AssertValid();
  41. }
  42. void CPropertyFormView::Dump(CDumpContext& dc) const
  43. {
  44. CResizableFormView::Dump(dc);
  45. }
  46. #endif //_DEBUG
  47. /////////////////////////////////////////////////////////////////////////////
  48. // CPropertyFormView message handlers
  49. BOOL CPropertyFormView::OnInitDialog()
  50. {
  51. CResizableFormView::OnInitDialog();
  52. CWnd* pWnd = GetDlgItem(IDC_SHEETHOLDER);
  53. CRect rc;
  54. pWnd->GetWindowRect(&rc);
  55. pWnd->DestroyWindow();
  56. ::MapWindowPoints(NULL, m_hWnd, (LPPOINT)&rc, 2);
  57. //m_Sheet.SetWizardMode();
  58. //m_Sheet.m_psh.dwFlags |= PSH_HASHELP;
  59. m_Sheet.Create(this, WS_CHILD, 0);
  60. m_Sheet.SetWindowPos(NULL, rc.left, rc.top, rc.Width(), rc.Height(),
  61. SWP_NOZORDER | SWP_NOACTIVATE | SWP_SHOWWINDOW);
  62. m_Sheet.SetDlgCtrlID(IDC_SHEETHOLDER);
  63. AddAnchor(IDC_TEXT, TOP_LEFT, TOP_LEFT);
  64. AddAnchor(IDC_SHEETHOLDER, TOP_LEFT, BOTTOM_RIGHT);
  65. return TRUE; // return TRUE unless you set the focus to a control
  66. // EXCEPTION: OCX Property Pages should return FALSE
  67. }