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

对话框与窗口

开发平台:

Visual C++

  1. // DialSplitter.cpp : implementation file
  2. //
  3. #include "stdafx.h"
  4. #include "CGuiAccess.h"
  5. #include "DialSplitter.h"
  6. #ifdef _DEBUG
  7. #define new DEBUG_NEW
  8. #undef THIS_FILE
  9. static char THIS_FILE[] = __FILE__;
  10. #endif
  11. /////////////////////////////////////////////////////////////////////////////
  12. // CDialSplitter dialog
  13. CDialSplitter::CDialSplitter(CWnd* pParent /*=NULL*/)
  14. : CDialog(CDialSplitter::IDD, pParent)
  15. {
  16. //{{AFX_DATA_INIT(CDialSplitter)
  17. // NOTE: the ClassWizard will add member initialization here
  18. //}}AFX_DATA_INIT
  19. }
  20. void CDialSplitter::DoDataExchange(CDataExchange* pDX)
  21. {
  22. CDialog::DoDataExchange(pDX);
  23. //{{AFX_DATA_MAP(CDialSplitter)
  24. DDX_Control(pDX, IDC_SPLITTER, m_Splitter);
  25. //}}AFX_DATA_MAP
  26. }
  27. BEGIN_MESSAGE_MAP(CDialSplitter, CDialog)
  28. //{{AFX_MSG_MAP(CDialSplitter)
  29. //}}AFX_MSG_MAP
  30. END_MESSAGE_MAP()
  31. /////////////////////////////////////////////////////////////////////////////
  32. // CDialSplitter message handlers
  33. BOOL CDialSplitter::OnInitDialog() 
  34. {
  35. CDialog::OnInitDialog();
  36. const DWORD dwStyle =WS_CHILD | WS_VISIBLE | TVS_HASLINES | TVS_LINESATROOT | TVS_HASBUTTONS ;
  37. if(!m_TreeServerExplorer.Create(dwStyle,CRect(0,0,0,0),&m_Splitter,3 ))
  38. return -1;
  39. if(!m_TreeServerExplorer1.Create(dwStyle,CRect(0,0,0,0),&m_Splitter,4 ))
  40. return -1;
  41. m_Splitter.SeTypeALing(CGuiSplitter::ALINGHORZ);//ALINGHORZ
  42. m_Splitter.SetPixelWidht(2);
  43. m_Splitter.AddLeftCtrl(&m_TreeServerExplorer,3);
  44. m_Splitter.AddRightCtrl(&m_TreeServerExplorer1,4);
  45. m_Splitter.SetStyleSeparator(CGuiSplitter::STYLE3D,
  46. GuiDrawLayer::GetRGBColorShadow(),GuiDrawLayer::GetRGBColorShadow());
  47. // TODO: Add extra initialization here
  48. return TRUE;  // return TRUE unless you set the focus to a control
  49.               // EXCEPTION: OCX Property Pages should return FALSE
  50. }