RightForm.cpp
上传用户:qhonly
上传日期:2013-06-10
资源大小:487k
文件大小:2k
源码类别:

界面编程

开发平台:

Visual C++

  1. // RightForm.cpp : 实现文件
  2. //
  3. #include "stdafx.h"
  4. #include "WebGet.h"
  5. #include "RightForm.h"
  6. #include "MainFrm.h"
  7. // CRightForm 对话框
  8. IMPLEMENT_DYNAMIC(CRightForm, CPropertyPage)
  9. CRightForm::CRightForm()
  10. : CPropertyPage(CRightForm::IDD)
  11. {
  12. }
  13. CRightForm::~CRightForm()
  14. {
  15. }
  16. void CRightForm::DoDataExchange(CDataExchange* pDX)
  17. {
  18. CPropertyPage::DoDataExchange(pDX);
  19. DDX_Control(pDX, IDC_TabRight, m_TabRight);
  20. DDX_Control(pDX, IDC_ListDownFile, m_ListDwonFile);
  21. DDX_Control(pDX, IDC_ListWebDown, m_ListWebDown);
  22. DDX_Control(pDX, IDC_ListWebMgr, m_ListWebMgr);
  23. DDX_Control(pDX, IDC_ListWebMgrInfo, m_ListWebMgrInfo);
  24. DDX_Control(pDX, IDC_ListWebDownInfo, m_ListWebDownInfo);
  25. DDX_Control(pDX, IDC_TreeFileDownInfo, m_TreeFileDownInfo);
  26. }
  27. BEGIN_MESSAGE_MAP(CRightForm, CPropertyPage)
  28. ON_WM_SIZE()
  29. ON_WM_ERASEBKGND()
  30. END_MESSAGE_MAP()
  31. // CRightForm 消息处理程序
  32. void CRightForm::OnSize(UINT nType, int cx, int cy)
  33. {
  34. CPropertyPage::OnSize(nType, cx, cy);
  35. if(IsWindow(m_TabRight.m_hWnd))m_TabRight.MoveWindow(0,0,cx,cy);
  36. }
  37. BOOL CRightForm::OnInitDialog()
  38. {
  39. CPropertyPage::OnInitDialog();
  40. m_TabRight.ShowTabItem(FALSE);
  41. m_SplitterFileDown.Create(WS_CHILD|WS_VISIBLE,CRect(0,0,0,0),this,ID_SP_FILEDOWN);
  42. m_SplitterWebDown.Create(WS_CHILD|WS_VISIBLE,CRect(0,0,0,0),this,ID_SP_WEBDOWN);
  43. m_SplitterWebMgr.Create(WS_CHILD|WS_VISIBLE,CRect(0,0,0,0),this,ID_SP_WEBMGR);
  44. m_SplitterFileDownInfo.Create(WS_CHILD|WS_VISIBLE,CRect(0,0,0,0),this,ID_SP_FILEDOWNINFO);
  45. m_FileDownInfo.Create(CFileDownInfo::IDD,&m_SplitterFileDownInfo);
  46. m_SplitterFileDownInfo.SetVertical(&m_TreeFileDownInfo.m_Container,&m_FileDownInfo,100,-1);
  47. m_SplitterFileDown.SetHorizoncal(&m_ListDwonFile.m_Container,&m_SplitterFileDownInfo,-1,150);
  48. m_SplitterWebDown.SetHorizoncal(&m_ListWebDown.m_Container,&m_ListWebDownInfo.m_Container,-1,150);
  49. m_SplitterWebMgr.SetHorizoncal(&m_ListWebMgr.m_Container,&m_ListWebMgrInfo.m_Container,-1,150);
  50. m_TabRight.Add(0,"文件下载",0,&m_SplitterFileDown);
  51. m_TabRight.Add(1,"站点下载",1,&m_SplitterWebDown);
  52. m_TabRight.Add(2,"站点管理",2,&m_SplitterWebMgr);
  53. return TRUE; 
  54. }
  55. void CRightForm::SetCurSel(int sel)
  56. {
  57. m_TabRight.SetCurSel(sel);
  58. }
  59. BOOL CRightForm::OnEraseBkgnd(CDC* pDC)
  60. {
  61. return TRUE;
  62. }