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

对话框与窗口

开发平台:

Visual C++

  1. // GuiFolderVisio.cpp: implementation of the CGuiFolderVisio class.
  2. //
  3. //////////////////////////////////////////////////////////////////////
  4. #include "stdafx.h"
  5. #include "GuiVisioDemo.h"
  6. #include "GuiFolderVisio.h"
  7. #ifdef _DEBUG
  8. #undef THIS_FILE
  9. static char THIS_FILE[]=__FILE__;
  10. #define new DEBUG_NEW
  11. #endif
  12. //////////////////////////////////////////////////////////////////////
  13. // Construction/Destruction
  14. //////////////////////////////////////////////////////////////////////
  15. CGuiFolderVisio::CGuiFolderVisio()
  16. {
  17. }
  18. CGuiFolderVisio::~CGuiFolderVisio()
  19. {
  20. }
  21. BEGIN_MESSAGE_MAP(CGuiFolderVisio, CGuiControlBar)
  22. ON_WM_CREATE()
  23. END_MESSAGE_MAP()
  24. int CGuiFolderVisio::OnCreate(LPCREATESTRUCT lpCreateStruct)
  25. {
  26. if (CGuiControlBar::OnCreate(lpCreateStruct) == -1)
  27. return -1;
  28. if (!m_ctServer.Create(WS_CHILD|WS_VISIBLE,CRect(0,0,0,0),this,124))
  29. return -1;
  30. // TODO:  Add your specialized creation code here
  31.  if (!m_fv.Create(WS_CHILD|WS_VISIBLE, CRect(0,0,0,0), &m_ctServer, 125))
  32.   return -1;
  33.  
  34. m_ctServer.AddComponen(&m_fv); 
  35. m_fv.SetImageList(IDB_BITMAP1,16,3,RGB(255,0,0));
  36. m_tree.Create(WS_CHILD | WS_VISIBLE | TVS_HASLINES | TVS_LINESATROOT | TVS_HASBUTTONS,CRect(0,0,0,0),&m_fv,126);
  37. m_fv.AddFolder(&m_tree,"ToolBox1",0);
  38. return 0;
  39. }