GuiServerExplorer.cpp
上传用户:wlkj888
上传日期:2022-08-01
资源大小:806k
文件大小:2k
源码类别:

对话框与窗口

开发平台:

Visual C++

  1. #include "StdAfx.h"
  2. #include "guiserverexplorer.h"
  3. #include "resource.h"
  4. #define ID_REFRESH 0x355
  5. #define ID_CONNECT 0x356
  6. #define ID_CONSERVER 0x367
  7. CGuiServerExplorer::CGuiServerExplorer(void)
  8. {
  9. }
  10. CGuiServerExplorer::~CGuiServerExplorer(void)
  11. {
  12. }
  13. BEGIN_MESSAGE_MAP(CGuiServerExplorer, CGuiControlBar)
  14. ON_WM_CREATE()
  15. END_MESSAGE_MAP()
  16. int CGuiServerExplorer::OnCreate(LPCREATESTRUCT lpCreateStruct)
  17. {
  18. if (CGuiControlBar::OnCreate(lpCreateStruct) == -1)
  19. return -1;
  20. const DWORD dwStyle =WS_CHILD | WS_VISIBLE | TVS_HASLINES | TVS_LINESATROOT | TVS_HASBUTTONS ;
  21. if (!m_Splitter.Create(this))
  22. return -1;
  23. if (!m_Splitter1.Create(&m_Splitter))
  24. return -1;
  25. if (!m_Folder.Create(WS_VISIBLE|WS_CHILD,
  26. CRect(0,0,0,0),&m_Splitter, 0xfff))
  27. return -1;
  28. if (!m_Folder1.Create(WS_VISIBLE|WS_CHILD,
  29. CRect(0,0,0,0),&m_Splitter1, 0xfff1))
  30. return -1;
  31. /*if (!m_panelAccess.Create(WS_VISIBLE,
  32. CRect(0,0,0,0), &m_Folder, 1))
  33. return -1;
  34. */
  35. m_Splitter.SeTypeALing(CGuiSplitter::ALINGVERT);//ALINGHORZ
  36. m_Splitter.SetPixelWidht(2);
  37. m_Splitter.AddLeftCtrl(&m_Splitter1,3);
  38. m_Splitter.AddRightCtrl(&m_Folder,4);
  39. m_Splitter.SetStyleSeparator(CGuiSplitter::STYLE3D,
  40. GuiDrawLayer::GetRGBColorShadow(),GuiDrawLayer::GetRGBColorShadow());
  41. m_Splitter1.SeTypeALing(CGuiSplitter::ALINGHORZ);//ALINGHORZ
  42. m_Splitter1.SetPixelWidht(2);
  43. m_Splitter1.AddLeftCtrl(&m_Splitter1,3);
  44. m_Splitter1.AddRightCtrl(&m_Folder,4);
  45. m_Splitter1.SetStyleSeparator(CGuiSplitter::STYLE3D,
  46. GuiDrawLayer::GetRGBColorShadow(),GuiDrawLayer::GetRGBColorShadow());
  47. if(!m_TreeServerExplorer.Create(dwStyle,CRect(0,0,0,0),&m_Folder,3 ))
  48. return -1;
  49. if(!m_TreeServerExplorer1.Create(dwStyle,CRect(0,0,0,0),&m_Folder1,4 ))
  50. return -1;
  51. if(!m_TreeServerExplorer2.Create(dwStyle,CRect(0,0,0,0),&m_Splitter1,3 ))
  52. return -1;
  53. m_Splitter1.AddLeftCtrl(&m_Folder1,3);
  54. m_Splitter1.AddRightCtrl(&m_TreeServerExplorer2,4);
  55. m_Folder.AddFolder(&m_TreeServerExplorer,"Objetos");
  56. m_Folder1.AddFolder(&m_TreeServerExplorer1,"Objetos1");
  57. /* m_panelAccess.SetImageList(IDB_BITMAP1, 16, 3, RGB(255,0,0));
  58. m_tb1=m_panelAccess.AddButton(890,0);
  59. m_tb2=m_panelAccess.AddButton(891,1);
  60. */
  61. // TODO:  Add your specialized creation code here
  62. return 0;
  63. }