diff --git a/cck/driver/PropSheet.cpp b/cck/driver/PropSheet.cpp index 2e69d682b25..f9a64302928 100644 --- a/cck/driver/PropSheet.cpp +++ b/cck/driver/PropSheet.cpp @@ -26,6 +26,9 @@ #include "stdafx.h" #include "WizardMachine.h" #include "PropSheet.h" +#include "globals.h" //To access global variables +#include "Interpret.h" //Adding to enable OpenBrowser function. + #ifdef _DEBUG #define new DEBUG_NEW @@ -57,7 +60,43 @@ BEGIN_MESSAGE_MAP(CPropSheet, CPropertySheet) //{{AFX_MSG_MAP(CPropSheet) // NOTE - the ClassWizard will add and remove mapping macros here. //}}AFX_MSG_MAP + ON_BN_CLICKED(IDC_FEEDBACK_BUTTON, OnButtonCopy) END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CPropSheet message handlers +extern CInterpret *theInterpreter; +BOOL CPropSheet::OnInitDialog() +{ + BOOL bResult = CPropertySheet::OnInitDialog(); + + // TODO: Add your specialized code here + CRect rect, tabrect;// = CRect (800, 440, 950, 645);//, tabrect; + int width; + + //Get button sizes and positions + GetDlgItem(IDCANCEL)->GetWindowRect(rect); + GetTabControl()->GetWindowRect(tabrect); + ScreenToClient(rect); ScreenToClient(tabrect); + + //New button - width, height and Y-coordiate of IDOK + // - X-coordinate of tab control + width = rect.Width(); + rect.left = tabrect.left; rect.right = tabrect.left + width; + + //Create new "Add" button and set standard font + m_ButtonCopy.Create("Feedback", + BS_PUSHBUTTON|WS_CHILD|WS_VISIBLE|WS_TABSTOP, + rect, this, IDC_FEEDBACK_BUTTON); + m_ButtonCopy.SetFont(GetFont()); + + return bResult; +} + +void CPropSheet::OnButtonCopy() +{ + CString Feedback = GetGlobal("Feedback"); + + theInterpreter->OpenBrowser((char*)(LPCTSTR)Feedback); + +} diff --git a/cck/driver/PropSheet.h b/cck/driver/PropSheet.h index 78fd71c072c..34340b1fb2c 100644 --- a/cck/driver/PropSheet.h +++ b/cck/driver/PropSheet.h @@ -45,10 +45,15 @@ public: // Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CPropSheet) +public: + virtual BOOL OnInitDialog(); + //}}AFX_VIRTUAL // Implementation public: + void OnButtonCopy(); + CButton m_ButtonCopy; virtual ~CPropSheet(); // Generated message map functions diff --git a/cck/driver/resource.h b/cck/driver/resource.h index 4685e606fc8..fa21e991612 100644 --- a/cck/driver/resource.h +++ b/cck/driver/resource.h @@ -32,6 +32,7 @@ #define IDD_HELP_DLG 1537 #define IDD_SUMMARY 1538 #define IDD_WIZ_HELP 1539 +#define IDC_FEEDBACK_BUTTON 0x02000 // Next default values for new objects // diff --git a/cck/driver/wizardmachine.ini b/cck/driver/wizardmachine.ini index 2cc0c6bb595..3667df51cba 100644 --- a/cck/driver/wizardmachine.ini +++ b/cck/driver/wizardmachine.ini @@ -2,4 +2,5 @@ inifile=cck.ini DefaultName=Mozilla Organization=Netscape -Department=CCK \ No newline at end of file +Department=CCK +Feedback=Http://www.mozilla.org/feedback.html \ No newline at end of file