From ec1b6fdff8c3aebc01525edadfa6f7c007a2c204 Mon Sep 17 00:00:00 2001 From: "locka%iol.ie" Date: Thu, 27 May 1999 21:28:46 +0000 Subject: [PATCH] New tab dialogs --- .../embed/ActiveX/tests/cbrowse/TabDOM.cpp | 66 +++++++++++ webshell/embed/ActiveX/tests/cbrowse/TabDOM.h | 0 .../ActiveX/tests/cbrowse/TabMessages.cpp | 46 ++++++++ .../embed/ActiveX/tests/cbrowse/TabMessages.h | 53 +++++++++ .../embed/ActiveX/tests/cbrowse/TabTests.cpp | 110 ++++++++++++++++++ .../embed/ActiveX/tests/cbrowse/TabTests.h | 0 6 files changed, 275 insertions(+) create mode 100644 webshell/embed/ActiveX/tests/cbrowse/TabDOM.cpp create mode 100644 webshell/embed/ActiveX/tests/cbrowse/TabDOM.h create mode 100644 webshell/embed/ActiveX/tests/cbrowse/TabMessages.cpp create mode 100644 webshell/embed/ActiveX/tests/cbrowse/TabMessages.h create mode 100644 webshell/embed/ActiveX/tests/cbrowse/TabTests.cpp create mode 100644 webshell/embed/ActiveX/tests/cbrowse/TabTests.h diff --git a/webshell/embed/ActiveX/tests/cbrowse/TabDOM.cpp b/webshell/embed/ActiveX/tests/cbrowse/TabDOM.cpp new file mode 100644 index 00000000000..9814646b5ad --- /dev/null +++ b/webshell/embed/ActiveX/tests/cbrowse/TabDOM.cpp @@ -0,0 +1,66 @@ +// TabDOM.cpp : implementation file +// + +#include "stdafx.h" +#include "cbrowse.h" +#include "TabDOM.h" +#include "CBrowseDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CTabDOM property page + +IMPLEMENT_DYNCREATE(CTabDOM, CPropertyPage) + +CTabDOM::CTabDOM() : CPropertyPage(CTabDOM::IDD, CTabDOM::IDD) +{ + //{{AFX_DATA_INIT(CTabDOM) + // NOTE: the ClassWizard will add member initialization here + //}}AFX_DATA_INIT +} + +CTabDOM::~CTabDOM() +{ +} + +void CTabDOM::DoDataExchange(CDataExchange* pDX) +{ + CPropertyPage::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CTabDOM) + DDX_Control(pDX, IDC_DOMLIST, m_tcDOM); + //}}AFX_DATA_MAP +} + + +BEGIN_MESSAGE_MAP(CTabDOM, CPropertyPage) + //{{AFX_MSG_MAP(CTabDOM) + ON_BN_CLICKED(IDC_REFRESHDOM, OnRefreshDOM) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CTabDOM message handlers + +void CTabDOM::OnRefreshDOM() +{ + if (m_pBrowseDlg) + { + m_pBrowseDlg->OnRefreshDOM(); + } +} + +BOOL CTabDOM::OnInitDialog() +{ + CPropertyPage::OnInitDialog(); + + // Create the DOM tree + m_tcDOM.SetImageList(&m_pBrowseDlg->m_cImageList, TVSIL_NORMAL); + + return TRUE; // return TRUE unless you set the focus to a control + // EXCEPTION: OCX Property Pages should return FALSE +} diff --git a/webshell/embed/ActiveX/tests/cbrowse/TabDOM.h b/webshell/embed/ActiveX/tests/cbrowse/TabDOM.h new file mode 100644 index 00000000000..e69de29bb2d diff --git a/webshell/embed/ActiveX/tests/cbrowse/TabMessages.cpp b/webshell/embed/ActiveX/tests/cbrowse/TabMessages.cpp new file mode 100644 index 00000000000..43cb2dc1894 --- /dev/null +++ b/webshell/embed/ActiveX/tests/cbrowse/TabMessages.cpp @@ -0,0 +1,46 @@ +// TabMessages.cpp : implementation file +// + +#include "stdafx.h" +#include "cbrowse.h" +#include "TabMessages.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CTabMessages property page + +IMPLEMENT_DYNCREATE(CTabMessages, CPropertyPage) + +CTabMessages::CTabMessages() : CPropertyPage(CTabMessages::IDD, CTabMessages::IDD) +{ + //{{AFX_DATA_INIT(CTabMessages) + // NOTE: the ClassWizard will add member initialization here + //}}AFX_DATA_INIT +} + +CTabMessages::~CTabMessages() +{ +} + +void CTabMessages::DoDataExchange(CDataExchange* pDX) +{ + CPropertyPage::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CTabMessages) + DDX_Control(pDX, IDC_OUTPUT, m_lbMessages); + //}}AFX_DATA_MAP +} + + +BEGIN_MESSAGE_MAP(CTabMessages, CPropertyPage) + //{{AFX_MSG_MAP(CTabMessages) + // NOTE: the ClassWizard will add message map macros here + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CTabMessages message handlers diff --git a/webshell/embed/ActiveX/tests/cbrowse/TabMessages.h b/webshell/embed/ActiveX/tests/cbrowse/TabMessages.h new file mode 100644 index 00000000000..6417009f3ef --- /dev/null +++ b/webshell/embed/ActiveX/tests/cbrowse/TabMessages.h @@ -0,0 +1,53 @@ +#if !defined(AFX_TABMESSAGES_H__33D0A350_12E1_11D3_9407_000000000000__INCLUDED_) +#define AFX_TABMESSAGES_H__33D0A350_12E1_11D3_9407_000000000000__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 +// TabMessages.h : header file +// + +class CBrowseDlg; + +///////////////////////////////////////////////////////////////////////////// +// CTabMessages dialog + +class CTabMessages : public CPropertyPage +{ + DECLARE_DYNCREATE(CTabMessages) + +// Construction +public: + CTabMessages(); + ~CTabMessages(); + + CBrowseDlg *m_pBrowseDlg; + +// Dialog Data + //{{AFX_DATA(CTabMessages) + enum { IDD = IDD_TAB_MESSAGES }; + CListBox m_lbMessages; + //}}AFX_DATA + + +// Overrides + // ClassWizard generate virtual function overrides + //{{AFX_VIRTUAL(CTabMessages) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + // Generated message map functions + //{{AFX_MSG(CTabMessages) + // NOTE: the ClassWizard will add member functions here + //}}AFX_MSG + DECLARE_MESSAGE_MAP() + +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_TABMESSAGES_H__33D0A350_12E1_11D3_9407_000000000000__INCLUDED_) diff --git a/webshell/embed/ActiveX/tests/cbrowse/TabTests.cpp b/webshell/embed/ActiveX/tests/cbrowse/TabTests.cpp new file mode 100644 index 00000000000..a0c673219c0 --- /dev/null +++ b/webshell/embed/ActiveX/tests/cbrowse/TabTests.cpp @@ -0,0 +1,110 @@ +// TabTests.cpp : implementation file +// + +#include "stdafx.h" +#include "cbrowse.h" +#include "TabTests.h" +#include "CBrowseDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CTabTests property page + +IMPLEMENT_DYNCREATE(CTabTests, CPropertyPage) + +CTabTests::CTabTests() : CPropertyPage(CTabTests::IDD, CTabTests::IDD) +{ + //{{AFX_DATA_INIT(CTabTests) + m_szTestDescription = _T(""); + //}}AFX_DATA_INIT +} + +CTabTests::~CTabTests() +{ +} + +void CTabTests::DoDataExchange(CDataExchange* pDX) +{ + CPropertyPage::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CTabTests) + DDX_Control(pDX, IDC_RUNTEST, m_btnRunTest); + DDX_Control(pDX, IDC_TESTLIST, m_tcTests); + DDX_Text(pDX, IDC_TESTDESCRIPTION, m_szTestDescription); + //}}AFX_DATA_MAP +} + + +BEGIN_MESSAGE_MAP(CTabTests, CPropertyPage) + //{{AFX_MSG_MAP(CTabTests) + ON_BN_CLICKED(IDC_RUNTEST, OnRunTest) + ON_NOTIFY(TVN_SELCHANGED, IDC_TESTLIST, OnSelchangedTestlist) + ON_NOTIFY(NM_DBLCLK, IDC_TESTLIST, OnDblclkTestlist) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CTabTests message handlers + +void CTabTests::OnRunTest() +{ + m_pBrowseDlg->OnRunTest(); +} + +void CTabTests::OnSelchangedTestlist(NMHDR* pNMHDR, LRESULT* pResult) +{ + NM_TREEVIEW* pNMTreeView = (NM_TREEVIEW*)pNMHDR; + + BOOL bItemSelected = FALSE; + m_szTestDescription.Empty(); + + HTREEITEM hItem = m_tcTests.GetNextItem(NULL, TVGN_FIRSTVISIBLE); + while (hItem) + { + UINT nState; + + nState = m_tcTests.GetItemState(hItem, TVIS_SELECTED); + if (nState & TVIS_SELECTED) + { + bItemSelected = TRUE; + if (m_tcTests.ItemHasChildren(hItem)) + { + TestSet *pTestSet = (TestSet *) m_tcTests.GetItemData(hItem); + m_szTestDescription = pTestSet->szDesc; + } + else + { + Test *pTest = (Test *) m_tcTests.GetItemData(hItem); + m_szTestDescription = pTest->szDesc; + } + } + + hItem = m_tcTests.GetNextItem(hItem, TVGN_NEXTVISIBLE); + } + + UpdateData(FALSE); + m_btnRunTest.EnableWindow(bItemSelected); + + *pResult = 0; +} + + +void CTabTests::OnDblclkTestlist(NMHDR* pNMHDR, LRESULT* pResult) +{ + OnRunTest(); + *pResult = 0; +} + +BOOL CTabTests::OnInitDialog() +{ + CPropertyPage::OnInitDialog(); + + m_pBrowseDlg->PopulateTests(); + + return TRUE; // return TRUE unless you set the focus to a control + // EXCEPTION: OCX Property Pages should return FALSE +} diff --git a/webshell/embed/ActiveX/tests/cbrowse/TabTests.h b/webshell/embed/ActiveX/tests/cbrowse/TabTests.h new file mode 100644 index 00000000000..e69de29bb2d