Source code of Windows XP (NT5)
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.

70 lines
1.4 KiB

  1. #include "Document.h"
  2. #include "MNLBUIData.h"
  3. #include "resource.h"
  4. IMPLEMENT_DYNCREATE( Document, CDocument )
  5. Document::Document()
  6. {
  7. //
  8. // load the images which are used.
  9. //
  10. m_images48x48 = new CImageList;
  11. m_images48x48->Create( 16, // x
  12. 16, // y
  13. ILC_COLOR16, // 16 bit color
  14. 0, // initially image list is empty
  15. 10 ); // max images is 10. This value arbitrary.
  16. // Add the icons which we are going to use.
  17. m_images48x48->Add( AfxGetApp()->LoadIcon( IDI_WORLD));
  18. m_images48x48->Add( AfxGetApp()->LoadIcon( IDI_CLUSTER));
  19. m_images48x48->Add( AfxGetApp()->LoadIcon( IDI_HOST_STARTED));
  20. m_images48x48->Add( AfxGetApp()->LoadIcon( IDI_HOST_STOPPED));
  21. m_images48x48->Add( AfxGetApp()->LoadIcon( IDI_PORTRULE) );
  22. m_images48x48->Add( AfxGetApp()->LoadIcon( IDI_PENDING ));
  23. }
  24. void
  25. Document::registerLeftPane( CTreeView* treeView )
  26. {
  27. m_treeView = treeView;
  28. }
  29. CTreeCtrl&
  30. Document::getLeftPane()
  31. {
  32. return m_treeView->GetTreeCtrl();
  33. }
  34. void
  35. Document::registerStatusPane( CEditView* editView )
  36. {
  37. m_editView = editView;
  38. }
  39. CEdit&
  40. Document::getStatusPane()
  41. {
  42. return m_editView->GetEditCtrl();
  43. }
  44. void
  45. Document::registerListPane( CListView* listView )
  46. {
  47. m_listView = listView;
  48. }
  49. CListCtrl&
  50. Document::getListPane()
  51. {
  52. return m_listView->GetListCtrl();
  53. }