View the DQSD CVS repository here:
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/dqsd/
Update of /cvsroot/dqsd/dqsd/src/DQSDSearchWiz
In directory usw-pr-cvs1:/tmp/cvs-serv22808/src/DQSDSearchWiz
Modified Files:
ChangeLog.txt DQSDSearchWiz.dsp DQSDSearchWiz.rc
DQSDWizardDlg.cpp DQSDWizardDlg.h OptionsDlg.cpp OptionsDlg.h
SearchWizard.cpp SearchWizard.h StdAfx.h resource.h
Added Files:
Options.cpp Options.h
Log Message:
Version 0.4 (beta) - 12-Aug-2002
* Form element names with weird characters ([^_a-zA-Z]) are now referenced correctly.
* Escape characters < > & in user text and HTML text
* Restrict search name to lowercase and valid filename characters
* Minor UI changes - about box, icon, etc.
* Fix XML and script generated for radio buttons, checkboxes, TEXTAREAs
* URL truncation bug fix
* Options for including comments and warning about active element
--- NEW FILE: Options.cpp ---
// Options.cpp: implementation of the COptions class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "Options.h"
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
COptions::COptions()
: m_bEditResults( TRUE )
, m_strEditor( _T("notepad.exe") )
, m_bWarnNotActive( TRUE )
, m_bIncludeComments( TRUE )
{
Load();
}
COptions::~COptions()
{
}
void COptions::Load()
{
CRegKey rk;
BOOL bEditResult = TRUE;
if ( ERROR_SUCCESS != rk.Open( HKEY_CURRENT_USER, _T("SOFTWARE\\Dave's Quick
Search Deskbar\\DQSDSearchWizard\\Settings") ) )
return;
DWORD dwValue = 0;
if ( ERROR_SUCCESS == rk.QueryValue( dwValue, _T("EditResult") ) )
m_bEditResults = dwValue;
TCHAR szValue[ MAX_PATH + 1 ];
DWORD dwSize = LENGTHOF( szValue );
if ( ERROR_SUCCESS == rk.QueryValue( szValue, _T("ResultEditor"), &dwSize ) )
m_strEditor = string( szValue );
dwValue = 0;
if ( ERROR_SUCCESS == rk.QueryValue( dwValue, _T("WarnNotActive") ) )
m_bWarnNotActive = dwValue;
dwValue = 0;
if ( ERROR_SUCCESS == rk.QueryValue( dwValue, _T("IncludeComments") ) )
m_bIncludeComments = dwValue;
}
void COptions::Save()
{
CRegKey rk;
BOOL bEditResult = TRUE;
if ( ERROR_SUCCESS != rk.Open( HKEY_CURRENT_USER, _T("SOFTWARE\\Dave's Quick
Search Deskbar\\DQSDSearchWizard\\Settings") ) )
return;
rk.SetValue( m_bEditResults, _T("EditResult") );
rk.SetValue( m_strEditor.c_str(), _T("ResultEditor") );
rk.SetValue( m_bIncludeComments, _T("IncludeComments") );
rk.SetValue( m_bWarnNotActive, _T("WarnNotActive") );
}
--- NEW FILE: Options.h ---
// Options.h: interface for the COptions class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_OPTIONS_H__C61B51EE_2914_446B_AF73_EA7F41FD447D__INCLUDED_)
#define AFX_OPTIONS_H__C61B51EE_2914_446B_AF73_EA7F41FD447D__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class COptions
{
public:
COptions();
virtual ~COptions();
public:
void Load();
void Save();
BOOL EditResults() { return m_bEditResults; }
void EditResults( BOOL bEditResults ) { m_bEditResults = bEditResults; }
string Editor() { return m_strEditor; }
void Editor( const string& rstrEditor ) { m_strEditor = rstrEditor; }
BOOL WarnNotActive() { return m_bWarnNotActive; }
void WarnNotActive( BOOL bWarnNotActive ) { m_bWarnNotActive = bWarnNotActive;
}
BOOL IncludeComments() { return m_bIncludeComments; }
void IncludeComments( BOOL bIncludeComments ) { m_bIncludeComments =
bIncludeComments; }
private:
BOOL m_bEditResults;
string m_strEditor;
BOOL m_bWarnNotActive;
BOOL m_bIncludeComments;
};
#endif // !defined(AFX_OPTIONS_H__C61B51EE_2914_446B_AF73_EA7F41FD447D__INCLUDED_)
Index: ChangeLog.txt
===================================================================
RCS file: /cvsroot/dqsd/dqsd/src/DQSDSearchWiz/ChangeLog.txt,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** ChangeLog.txt 10 Aug 2002 13:12:56 -0000 1.6
--- ChangeLog.txt 12 Aug 2002 13:25:01 -0000 1.7
***************
*** 1,3 ****
! Version 0.4 (beta) - 10-Aug-2002
* Form element names with weird characters ([^_a-zA-Z]) are now referenced correctly.
--- 1,3 ----
! Version 0.4 (beta) - 12-Aug-2002
* Form element names with weird characters ([^_a-zA-Z]) are now referenced correctly.
***************
*** 6,9 ****
--- 6,11 ----
* Minor UI changes - about box, icon, etc.
* Fix XML and script generated for radio buttons, checkboxes, TEXTAREAs
+ * URL truncation bug fix
+ * Options for including comments and warning about active element
Version 0.3 (beta) - 08-Aug-2002
Index: DQSDSearchWiz.dsp
===================================================================
RCS file: /cvsroot/dqsd/dqsd/src/DQSDSearchWiz/DQSDSearchWiz.dsp,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** DQSDSearchWiz.dsp 9 Aug 2002 14:07:09 -0000 1.7
--- DQSDSearchWiz.dsp 12 Aug 2002 13:25:01 -0000 1.8
***************
*** 140,143 ****
--- 140,147 ----
# Begin Source File
+ SOURCE=.\Options.cpp
+ # End Source File
+ # Begin Source File
+
SOURCE=.\OptionsDlg.cpp
# End Source File
***************
*** 170,173 ****
--- 174,181 ----
SOURCE=.\ModulVer.h
+ # End Source File
+ # Begin Source File
+
+ SOURCE=.\Options.h
# End Source File
# Begin Source File
Index: DQSDSearchWiz.rc
===================================================================
RCS file: /cvsroot/dqsd/dqsd/src/DQSDSearchWiz/DQSDSearchWiz.rc,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** DQSDSearchWiz.rc 9 Aug 2002 14:07:09 -0000 1.10
--- DQSDSearchWiz.rc 12 Aug 2002 13:25:01 -0000 1.11
***************
*** 157,171 ****
END
! IDD_OPTIONSDLG DIALOG DISCARDABLE 0, 0, 248, 46
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "DQSD Search Wizard Options"
FONT 8, "MS Sans Serif"
BEGIN
! CONTROL "&Edit search file",IDC_EditXML,"Button",BS_AUTOCHECKBOX |
! WS_TABSTOP,6,8,62,10
! RTEXT "E&ditor:",IDC_STATIC,72,9,25,8
! EDITTEXT IDC_Editor,99,6,138,14,ES_AUTOHSCROLL
! DEFPUSHBUTTON "OK",1,66,26,50,14
! PUSHBUTTON "Cancel",2,132,26,50,14
END
--- 157,177 ----
END
! IDD_OPTIONSDLG DIALOG DISCARDABLE 0, 0, 253, 63
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "DQSD Search Wizard Options"
FONT 8, "MS Sans Serif"
BEGIN
! CONTROL "&Edit generated search file",IDC_EditXML,"Button",
! BS_AUTOCHECKBOX | WS_TABSTOP,6,6,96,10
! RTEXT "E&ditor:",IDC_EditLabel,12,19,25,8
! EDITTEXT IDC_Editor,39,16,138,14,ES_AUTOHSCROLL
! PUSHBUTTON "&...",IDC_Browse,178,16,11,14
! CONTROL "Include &comments in generated search file",
! IDC_IncludeComments,"Button",BS_AUTOCHECKBOX |
! WS_TABSTOP,6,35,174,10
! CONTROL "&Warn if no active element",IDC_WarnNotActive,"Button",
! BS_AUTOCHECKBOX | WS_TABSTOP,6,48,97,10
! DEFPUSHBUTTON "OK",1,197,7,50,14
! PUSHBUTTON "Cancel",2,197,24,50,14
END
***************
*** 212,218 ****
BEGIN
LEFTMARGIN, 6
! RIGHTMARGIN, 242
TOPMARGIN, 6
! BOTTOMMARGIN, 40
END
--- 218,224 ----
BEGIN
LEFTMARGIN, 6
! RIGHTMARGIN, 247
TOPMARGIN, 6
! BOTTOMMARGIN, 57
END
Index: DQSDWizardDlg.cpp
===================================================================
RCS file: /cvsroot/dqsd/dqsd/src/DQSDSearchWiz/DQSDWizardDlg.cpp,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** DQSDWizardDlg.cpp 10 Aug 2002 13:11:25 -0000 1.19
--- DQSDWizardDlg.cpp 12 Aug 2002 13:25:01 -0000 1.20
***************
*** 6,10 ****
#include "OptionsDlg.h"
#include "ModulVer.h"
!
void srch_repl( string& s, const string& to_find, const string& repl_with )
--- 6,10 ----
#include "OptionsDlg.h"
#include "ModulVer.h"
! #include "Options.h"
void srch_repl( string& s, const string& to_find, const string& repl_with )
***************
*** 118,122 ****
// Save the base URL for later use
! szBaseURL[ _tcslen( szBaseURL ) - 1 ] = _T('\0');
m_strBaseURL = szBaseURL;
--- 118,122 ----
// Save the base URL for later use
! szBaseURL[ _tcslen( szBaseURL ) ] = _T('\0');
m_strBaseURL = szBaseURL;
***************
*** 342,355 ****
_tstrtime( szTime );
! strSearchFile += _T("\r\n <COMMENT>"
! "\r\n"
! "\r\n This search file was
initially created by Dave's Quick Search Deskbar"
! "\r\n Search Wizard version ") +
m_strVersion + _T(" on ") + string( szDate ) + _T(" at ") + string( szTime );
! strSearchFile += _T("\r\n"
! "\r\n Even though this XML search
will probably load and is a healthy start"
! "\r\n toward a completed search,
please be aware that this search will probably"
! "\r\n not work as is and will
require some human inspection and modification."
! "\r\n"
! "\r\n </COMMENT>");
CWindow( GetDlgItem( IDC_SearchTitle ) ).GetWindowText( &bstr );
--- 342,358 ----
_tstrtime( szTime );
! if ( m_options.IncludeComments() )
! {
! strSearchFile += _T("\r\n <COMMENT>"
! "\r\n"
! "\r\n This search file was
initially created by Dave's Quick Search Deskbar"
! "\r\n Search Wizard version
") + m_strVersion + _T(" on ") + string( szDate ) + _T(" at ") + string( szTime );
! strSearchFile += _T("\r\n"
! "\r\n Even though this XML
search will probably load and is a healthy start"
! "\r\n toward a completed
search, please be aware that this search will probably"
! "\r\n not work as is and
will require some human inspection and modification."
! "\r\n"
! "\r\n </COMMENT>");
! }
CWindow( GetDlgItem( IDC_SearchTitle ) ).GetWindowText( &bstr );
***************
*** 437,460 ****
// Throw the file up in an editor if they so choose
! CRegKey rk;
! BOOL bEditResult = TRUE;
! string strEditor = _T("notepad.exe");
! if ( ERROR_SUCCESS == rk.Open( HKEY_CURRENT_USER,
_T("SOFTWARE\\Dave's Quick Search Deskbar\\DQSDSearchWizard\\Settings") ) )
! {
! DWORD dwValue = 0;
! if ( ERROR_SUCCESS == rk.QueryValue( dwValue,
_T("EditResult") ) )
! bEditResult = dwValue;
!
! TCHAR szValue[ MAX_PATH + 1 ];
! DWORD dwSize = LENGTHOF( szValue );
! if ( ERROR_SUCCESS == rk.QueryValue( szValue,
_T("ResultEditor"), &dwSize ) )
! strEditor = string( szValue );
! }
! rk.Close();
!
! if ( bEditResult )
{
TCHAR szCommandLine[ 1024 ];
! _tcscpy( szCommandLine, ( _T("\"") + strEditor +
_T("\" \"") + string( ofn.lpstrFile ) + _T("\"") ).c_str() );
::WinExec( szCommandLine, SW_SHOW );
}
--- 440,449 ----
// Throw the file up in an editor if they so choose
! COptions options;
! options.Load();
! if ( options.EditResults() )
{
TCHAR szCommandLine[ 1024 ];
! _tcscpy( szCommandLine, ( _T("\"") + options.Editor()
+ _T("\" \"") + string( ofn.lpstrFile ) + _T("\"") ).c_str() );
::WinExec( szCommandLine, SW_SHOW );
}
***************
*** 611,615 ****
}
! if ( bActiveElement )
{
strFormXML += _T("\r\n\r\n
<COMMENT> The following field was active (i.e. had focus) when the search was
generated. </COMMENT>\r\n");
--- 600,604 ----
}
! if ( bActiveElement &&
m_options.IncludeComments() )
{
strFormXML += _T("\r\n\r\n
<COMMENT> The following field was active (i.e. had focus) when the search was
generated. </COMMENT>\r\n");
***************
*** 636,640 ****
}
! if ( !_tcsicmp( _T("checkbox"),
strInputType.c_str() ) )
{
strFormXML += _T("\r\n
<COMMENT>"
--- 625,629 ----
}
! if ( m_options.IncludeComments() &&
!_tcsicmp( _T("checkbox"), strInputType.c_str() ) )
{
strFormXML += _T("\r\n
<COMMENT>"
***************
*** 644,648 ****
}
! if ( !_tcsicmp( W2T( bstrTagName ),
_T("SELECT") ) )
{
strFormXML += _T("\r\n
<COMMENT>"
--- 633,637 ----
}
! if ( m_options.IncludeComments() &&
!_tcsicmp( W2T( bstrTagName ), _T("SELECT") ) )
{
strFormXML += _T("\r\n
<COMMENT>"
***************
*** 720,724 ****
strFormXML += strRadioElement;
! strFormXML += strRadioValues;
}
}
--- 709,717 ----
strFormXML += strRadioElement;
!
! if ( m_options.IncludeComments() )
! {
! strFormXML += strRadioValues;
! }
}
}
***************
*** 762,765 ****
--- 755,762 ----
strAction = W2A( varAction.bstrVal );
}
+ else if ( _tcslen( W2CT(varAction.bstrVal) ) == 0 )
+ {
+ strAction = m_strBaseURL;
+ }
else
{
***************
*** 784,804 ****
LPTSTR pszSwitch = _tcstok( szSwitches, _T("\r\n") );
strSwitches = _T("\r\n"
! "\r\n // Parse switches with
parseArgs:"
! "\r\n"
! "\r\n // parseArgs usage:"
! "\r\n // Arguments:"
! "\r\n // q -
string from the search function"
! "\r\n // expectedSwitches -
list or array of the expected switch values"
! "\r\n // expandSwitches -
optional parameter [default = true] used to determine "
! "\r\n //
if the switch shortcuts should be expanded (i.e. /f becomes /foo)"
! "\r\n // Returns an object with
these properties:"
! "\r\n // q - the input
string with the switches removed"
! "\r\n // switches - array of
objects with these two properties:"
! "\r\n // name:
expanded name of the matched switch (i.e. foo as in /foo:bar)"
! "\r\n // value:
value of switch (i.e. bar as in /foo:bar)"
! "\r\n // switch_val -
associative array with the switch name as the key with the switch value "
! "\r\n // as the
value. (i.e. switch_val[\"foo\"] = \"bar\" as in /foo:bar)"
! "\r\n"
! "\r\n //var args = parseArgs(q,
\"");
TCHAR pszDelim[ 16 ];
_tcscpy( pszDelim, _T("") );
--- 781,806 ----
LPTSTR pszSwitch = _tcstok( szSwitches, _T("\r\n") );
strSwitches = _T("\r\n"
! "\r\n // Parse switches with
parseArgs:");
!
! if ( m_options.IncludeComments() )
! {
! strSwitches += _T("\r\n"
! "\r\n // parseArgs
usage:"
! "\r\n // Arguments:"
! "\r\n // q
- string from the search function"
! "\r\n //
expectedSwitches - list or array of the expected switch values"
! "\r\n //
expandSwitches - optional parameter [default = true] used to determine "
! "\r\n //
if the switch shortcuts should be expanded (i.e. /f becomes /foo)"
! "\r\n // Returns an
object with these properties:"
! "\r\n // q -
the input string with the switches removed"
! "\r\n // switches -
array of objects with these two properties:"
! "\r\n //
name: expanded name of the matched switch (i.e. foo as in /foo:bar)"
! "\r\n //
value: value of switch (i.e. bar as in /foo:bar)"
! "\r\n // switch_val -
associative array with the switch name as the key with the switch value "
! "\r\n //
as the value. (i.e. switch_val[\"foo\"] = \"bar\" as in /foo:bar)"
! "\r\n");
! }
!
! strSwitches += _T("\r\n //var args = parseArgs(q, \"");
TCHAR pszDelim[ 16 ];
_tcscpy( pszDelim, _T("") );
***************
*** 840,844 ****
// srch_repl( xml, _T("'"), _T("'") );
// srch_repl( xml, _T("\""), _T(""") );
! srch_repl( xml, _T("\r\n"), _T("\\n") );
return xml;
--- 842,846 ----
// srch_repl( xml, _T("'"), _T("'") );
// srch_repl( xml, _T("\""), _T(""") );
! // srch_repl( xml, _T("\r\n"), _T("\\n") );
return xml;
***************
*** 907,940 ****
LRESULT CDQSDWizardDlg::OnClickedOptions(WORD wNotifyCode, WORD wID, HWND hWndCtl,
BOOL& bHandled)
{
- USES_CONVERSION;
-
- DWORD dwSize = 0;
- TCHAR szValue[ 1024 ];
- DWORD dwValue = 0;
-
COptionsDlg dlgOptions;
!
! CRegKey rk;
! if ( ERROR_SUCCESS == rk.Open( HKEY_CURRENT_USER, _T("SOFTWARE\\Dave's Quick
Search Deskbar\\DQSDSearchWizard\\Settings") ) )
! {
! if ( ERROR_SUCCESS == rk.QueryValue( dwValue, _T("EditResult") ) )
! {
! dlgOptions.m_bEditResult = dwValue;
! }
!
! dwSize = LENGTHOF( szValue );
! if ( ERROR_SUCCESS == rk.QueryValue( szValue, _T("ResultEditor"),
&dwSize ) )
! {
! dlgOptions.m_strEditor = string( szValue );
! }
! }
!
! if ( dlgOptions.DoModal() == IDOK )
! {
! rk.SetValue( dlgOptions.m_bEditResult, _T("EditResult") );
! rk.SetValue( dlgOptions.m_strEditor.c_str(), _T("ResultEditor") );
! }
!
! rk.Close();
return 0;
}
--- 909,915 ----
LRESULT CDQSDWizardDlg::OnClickedOptions(WORD wNotifyCode, WORD wID, HWND hWndCtl,
BOOL& bHandled)
{
COptionsDlg dlgOptions;
! if ( IDOK == dlgOptions.DoModal() )
! m_options.Load();
return 0;
}
Index: DQSDWizardDlg.h
===================================================================
RCS file: /cvsroot/dqsd/dqsd/src/DQSDSearchWiz/DQSDWizardDlg.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** DQSDWizardDlg.h 10 Aug 2002 13:11:25 -0000 1.11
--- DQSDWizardDlg.h 12 Aug 2002 13:25:01 -0000 1.12
***************
*** 5,9 ****
#include "SearchNameEdit.h"
!
#include "resource.h" // main symbols
--- 5,9 ----
#include "SearchNameEdit.h"
! #include "Options.h"
#include "resource.h" // main symbols
***************
*** 63,66 ****
--- 63,67 ----
string m_strVersion;
CSearchNameEdit m_editSearchName;
+ COptions m_options;
private:
Index: OptionsDlg.cpp
===================================================================
RCS file: /cvsroot/dqsd/dqsd/src/DQSDSearchWiz/OptionsDlg.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** OptionsDlg.cpp 6 Aug 2002 17:36:31 -0000 1.1
--- OptionsDlg.cpp 12 Aug 2002 13:25:01 -0000 1.2
***************
*** 5,6 ****
--- 5,28 ----
/////////////////////////////////////////////////////////////////////////////
// COptionsDlg
+
+ LRESULT COptionsDlg::OnClickedBrowse(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL&
+bHandled)
+ {
+
+ OPENFILENAME ofn;
+ memset( &ofn, 0, sizeof ofn );
+ ofn.lStructSize = sizeof ofn;
+ ofn.hwndOwner = m_hWnd;
+ ofn.lpstrFilter = _T("Executable Files (*.exe)\0*.exe\0\0");
+ TCHAR szFile[ MAX_PATH + 1 ];
+ memset( szFile, 0, sizeof szFile );
+ ofn.lpstrFile = szFile;
+ ofn.nMaxFile = LENGTHOF( szFile );
+ ofn.lpstrTitle = _T("Open Search Editor Application");
+ ofn.Flags = OFN_FILEMUSTEXIST;
+ if ( GetOpenFileName( &ofn ) )
+ {
+ CWindow( GetDlgItem( IDC_Editor ) ).SetWindowText( ofn.lpstrFile );
+ }
+
+ return 0;
+ }
Index: OptionsDlg.h
===================================================================
RCS file: /cvsroot/dqsd/dqsd/src/DQSDSearchWiz/OptionsDlg.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** OptionsDlg.h 7 Aug 2002 18:22:07 -0000 1.3
--- OptionsDlg.h 12 Aug 2002 13:25:01 -0000 1.4
***************
*** 5,8 ****
--- 5,9 ----
#include "resource.h" // main symbols
+ #include "options.h"
/////////////////////////////////////////////////////////////////////////////
***************
*** 13,19 ****
public:
COptionsDlg()
- : m_bEditResult( TRUE )
- , m_strEditor( _T("notepad.exe") )
{
}
--- 14,19 ----
public:
COptionsDlg()
{
+ m_options.Load();
}
***************
*** 29,32 ****
--- 29,33 ----
COMMAND_ID_HANDLER(IDCANCEL, OnCancel)
COMMAND_HANDLER(IDC_EditXML, BN_CLICKED, OnClickedEditXML)
+ COMMAND_HANDLER(IDC_Browse, BN_CLICKED, OnClickedBrowse)
END_MSG_MAP()
// Handler prototypes:
***************
*** 38,48 ****
{
CenterWindow( GetActiveWindow() );
-
- CWindow( GetDlgItem( IDC_EditXML ) ).SendMessage( BM_SETCHECK,
m_bEditResult ? BST_CHECKED : BST_UNCHECKED );
! CWindow( GetDlgItem( IDC_Editor ) ).SetWindowText( m_strEditor.c_str()
);
OnClickedEditXML(0, 0, 0, bHandled );
return 1; // Let the system set the focus
}
--- 39,51 ----
{
CenterWindow( GetActiveWindow() );
! CWindow( GetDlgItem( IDC_EditXML ) ).SendMessage( BM_SETCHECK,
m_options.EditResults() ? BST_CHECKED : BST_UNCHECKED );
! CWindow( GetDlgItem( IDC_Editor ) ).SetWindowText(
m_options.Editor().c_str() );
OnClickedEditXML(0, 0, 0, bHandled );
+ CWindow( GetDlgItem( IDC_WarnNotActive ) ).SendMessage( BM_SETCHECK,
+m_options.WarnNotActive() ? BST_CHECKED : BST_UNCHECKED );
+ CWindow( GetDlgItem( IDC_IncludeComments ) ).SendMessage( BM_SETCHECK,
+m_options.IncludeComments() ? BST_CHECKED : BST_UNCHECKED );
+
return 1; // Let the system set the focus
}
***************
*** 52,62 ****
USES_CONVERSION;
! m_bEditResult = CWindow( GetDlgItem( IDC_EditXML ) ).SendMessage(
BM_GETCHECK, 0, 0 ) == BST_CHECKED ? TRUE : FALSE;
!
BSTR bstrEditor = NULL;
CWindow( GetDlgItem( IDC_Editor ) ).GetWindowText( &bstrEditor );
! m_strEditor = W2T( bstrEditor );
::SysFreeString( bstrEditor );
!
EndDialog(wID);
return 0;
--- 55,68 ----
USES_CONVERSION;
! m_options.EditResults( CWindow( GetDlgItem( IDC_EditXML )
).SendMessage( BM_GETCHECK, 0, 0 ) == BST_CHECKED );
BSTR bstrEditor = NULL;
CWindow( GetDlgItem( IDC_Editor ) ).GetWindowText( &bstrEditor );
! m_options.Editor( W2T( bstrEditor ) );
::SysFreeString( bstrEditor );
!
! m_options.IncludeComments( CWindow( GetDlgItem( IDC_IncludeComments )
).SendMessage( BM_GETCHECK, 0, 0 ) == BST_CHECKED );
! m_options.WarnNotActive( CWindow( GetDlgItem( IDC_WarnNotActive )
).SendMessage( BM_GETCHECK, 0, 0 ) == BST_CHECKED );
! m_options.Save();
!
EndDialog(wID);
return 0;
***************
*** 72,81 ****
{
CWindow( GetDlgItem( IDC_Editor ) ).EnableWindow( CWindow( GetDlgItem(
IDC_EditXML ) ).SendMessage( BM_GETCHECK, 0, 0 ) == BST_CHECKED );
return 0;
}
public:
! BOOL m_bEditResult;
! string m_strEditor;
};
--- 78,90 ----
{
CWindow( GetDlgItem( IDC_Editor ) ).EnableWindow( CWindow( GetDlgItem(
IDC_EditXML ) ).SendMessage( BM_GETCHECK, 0, 0 ) == BST_CHECKED );
+ CWindow( GetDlgItem( IDC_Browse ) ).EnableWindow( CWindow( GetDlgItem(
+IDC_EditXML ) ).SendMessage( BM_GETCHECK, 0, 0 ) == BST_CHECKED );
+ CWindow( GetDlgItem( IDC_EditLabel ) ).EnableWindow( CWindow(
+GetDlgItem( IDC_EditXML ) ).SendMessage( BM_GETCHECK, 0, 0 ) == BST_CHECKED );
return 0;
}
+ LRESULT OnClickedBrowse(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL&
+bHandled);
+
public:
! COptions m_options;
};
Index: SearchWizard.cpp
===================================================================
RCS file: /cvsroot/dqsd/dqsd/src/DQSDSearchWiz/SearchWizard.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** SearchWizard.cpp 8 Aug 2002 07:37:35 -0000 1.3
--- SearchWizard.cpp 12 Aug 2002 13:25:01 -0000 1.4
***************
*** 1,5 ****
// SearchWizard.cpp : Implementation of CSearchWizard
#include "stdafx.h"
- #include "DQSDSearchWiz.h"
#include "SearchWizard.h"
#include "DQSDWizardDlg.h"
--- 1,4 ----
***************
*** 10,13 ****
--- 9,13 ----
#include <initguid.h>
#include <ShlGuid.h>
+ #include "Options.h"
STDMETHODIMP CSearchWizard::QueryStatus(const GUID* pguidCmdGroup, ULONG cCmds,
OLECMD prgCmds[], OLECMDTEXT* pCmdText)
***************
*** 49,52 ****
--- 49,55 ----
+ COptions options;
+
+
HWND hwndBrowser = NULL;
HR(spWB2->get_HWND(reinterpret_cast<long *>(&hwndBrowser)));
***************
*** 62,66 ****
}
}
! else
{
// Give the user a chance to select a FORM field
--- 65,69 ----
}
}
! else if ( options.WarnNotActive() )
{
// Give the user a chance to select a FORM field
Index: SearchWizard.h
===================================================================
RCS file: /cvsroot/dqsd/dqsd/src/DQSDSearchWiz/SearchWizard.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** SearchWizard.h 3 Aug 2002 06:05:00 -0000 1.1
--- SearchWizard.h 12 Aug 2002 13:25:01 -0000 1.2
***************
*** 5,10 ****
#include "resource.h" // main symbols
! #include <ExDisp.h>
! #include <MsHtml.h>
/////////////////////////////////////////////////////////////////////////////
--- 5,9 ----
#include "resource.h" // main symbols
! #include "DQSDSearchWiz.h"
/////////////////////////////////////////////////////////////////////////////
Index: StdAfx.h
===================================================================
RCS file: /cvsroot/dqsd/dqsd/src/DQSDSearchWiz/StdAfx.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** StdAfx.h 9 Aug 2002 22:58:25 -0000 1.8
--- StdAfx.h 12 Aug 2002 13:25:01 -0000 1.9
***************
*** 20,23 ****
--- 20,25 ----
//something, but do not change the name of _Module
extern CComModule _Module;
+ #include <ExDisp.h>
+ #include <MsHtml.h>
#include <atlcom.h>
#include <atlwin.h>
Index: resource.h
===================================================================
RCS file: /cvsroot/dqsd/dqsd/src/DQSDSearchWiz/resource.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** resource.h 9 Aug 2002 14:07:09 -0000 1.5
--- resource.h 12 Aug 2002 13:25:01 -0000 1.6
***************
*** 33,36 ****
--- 33,39 ----
#define IDC_IncludeComments 224
#define IDC_ChangeHistory 228
+ #define IDC_Browse 231
+ #define IDC_WarnNotActive 232
+ #define IDC_EditLabel 233
// Next default values for new objects
***************
*** 40,44 ****
#define _APS_NEXT_RESOURCE_VALUE 206
#define _APS_NEXT_COMMAND_VALUE 32768
! #define _APS_NEXT_CONTROL_VALUE 229
#define _APS_NEXT_SYMED_VALUE 106
#endif
--- 43,47 ----
#define _APS_NEXT_RESOURCE_VALUE 206
#define _APS_NEXT_COMMAND_VALUE 32768
! #define _APS_NEXT_CONTROL_VALUE 234
#define _APS_NEXT_SYMED_VALUE 106
#endif
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
DQSD-CVS mailing list
https://lists.sourceforge.net/lists/listinfo/dqsd-cvs
DQSD CVS repository:
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/dqsd/