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-serv8249/src/DQSDSearchWiz
Modified Files:
AboutDlg.cpp AboutDlg.h ChangeLog.txt DQSDSearchWiz.cpp
DQSDSearchWiz.dsp DQSDSearchWiz.rc DQSDWizardDlg.cpp
DQSDWizardDlg.h OptionsDlg.h StdAfx.h resource.h
Added Files:
DialogToolTipCtrl.cpp DialogToolTipCtrl.h
Log Message:
Version 0.9 (beta) 20-Sep-2002
* Added links to DQSD search wizard web site on About dialog
* Added help in the form of tooltips which can be turned on and off
* Rearranged some of the controls and cleaned up some code
--- NEW FILE: DialogToolTipCtrl.cpp ---
// DialogToolTipCtrl.cpp: implementation of the CDialogToolTipCtrl class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "DialogToolTipCtrl.h"
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CDialogToolTipCtrl::CDialogToolTipCtrl()
: m_hWndParent( NULL )
{
}
CDialogToolTipCtrl::~CDialogToolTipCtrl()
{
}
HWND CDialogToolTipCtrl::Create(HWND hWndParent, _U_RECT rect, LPCTSTR szWindowName,
DWORD dwStyle, DWORD dwExStyle, _U_MENUorID MenuOrID, LPVOID lpCreateParam)
{
m_hWndParent = hWndParent;
HWND hwnd = CToolTipCtrl::Create( hWndParent, rect, szWindowName, dwStyle,
dwExStyle, MenuOrID, lpCreateParam );
// ??? Should these be options? Probably.
SetMaxTipWidth( 300 );
SetDelayTime( TTDT_INITIAL, 0 );
SetDelayTime( TTDT_AUTOPOP, 30 * 1000 );
return hwnd;
}
BOOL CDialogToolTipCtrl::AddTool( int nCtrlID, LPTSTR pszTip )
{
ATLASSERT( ::IsWindow( m_hWnd ) ); // Need to call Create first
HWND hwndCtrl = ::GetDlgItem( m_hWndParent, nCtrlID );
ATLASSERT( hwndCtrl );
CWindow( hwndCtrl ).ModifyStyleEx( WS_EX_NOPARENTNOTIFY, 0 ); // This is off
by default for dialog controls
CToolInfo cti( TTF_IDISHWND| TTF_SUBCLASS, hwndCtrl, (WPARAM)hwndCtrl, 0,
pszTip );
return CToolTipCtrl::AddTool( &cti );
}
--- NEW FILE: DialogToolTipCtrl.h ---
// DialogToolTipCtrl.h: interface for the CDialogToolTipCtrl class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_DialogToolTIPCTRL_H__BD9E58D7_B31B_463E_BF99_314ED69C9F1B__INCLUDED_)
#define AFX_DialogToolTIPCTRL_H__BD9E58D7_B31B_463E_BF99_314ED69C9F1B__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class CDialogToolTipCtrl : public CToolTipCtrl
{
public:
CDialogToolTipCtrl();
virtual ~CDialogToolTipCtrl();
HWND Create( HWND hWndParent, _U_RECT rect = NULL, LPCTSTR szWindowName =
NULL, DWORD dwStyle = 0, DWORD dwExStyle = 0, _U_MENUorID MenuOrID = 0U, LPVOID
lpCreateParam = NULL );
BOOL AddTool( int nCtrlID, LPTSTR pszTip );
private:
HWND m_hWndParent;
};
#endif //
!defined(AFX_DialogToolTIPCTRL_H__BD9E58D7_B31B_463E_BF99_314ED69C9F1B__INCLUDED_)
Index: AboutDlg.cpp
===================================================================
RCS file: /cvsroot/dqsd/dqsd/src/DQSDSearchWiz/AboutDlg.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** AboutDlg.cpp 30 Aug 2002 23:20:28 -0000 1.2
--- AboutDlg.cpp 20 Sep 2002 22:59:13 -0000 1.3
***************
*** 7,8 ****
--- 7,76 ----
/////////////////////////////////////////////////////////////////////////////
// CAboutDlg
+ CAboutDlg::CAboutDlg()
+ {
+ }
+
+ CAboutDlg::~CAboutDlg()
+ {
+ }
+
+ LRESULT CAboutDlg::OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL&
+bHandled)
+ {
+ CenterWindow( GetActiveWindow() );
+
+ // Get file version
+ TCHAR szModule[ MAX_PATH + 1 ];
+ if ( GetModuleFileName( _Module.GetResourceInstance(), szModule,
+LENGTHOF(szModule) ) )
+ {
+ CModuleVersion moduleVersion;
+ if ( moduleVersion.GetFileVersionInfo( szModule ) )
+ {
+ CWindow( GetDlgItem( IDC_Version ) ).SetWindowText( (
+_T("Version ") + moduleVersion.GetValue( _T("ProductVersion") ) + _T(" ") +
+moduleVersion.GetValue( _T("SpecialBuild") ) ).c_str() );
+ }
+ }
+
+ // Get change log history
+ HRSRC hrsc = FindResource( _Module.GetResourceInstance(),
+MAKEINTRESOURCE(IDR_CHANGELOG), _T("TEXT") );
+ if ( hrsc )
+ {
+ HGLOBAL hdata = LoadResource( _Module.GetResourceInstance(), hrsc );
+ if ( hdata )
+ {
+ const DWORD dwResLen = SizeofResource(
+_Module.GetResourceInstance(), hrsc );
+ LPTSTR pszChangeLog = (LPTSTR)LockResource( hdata );
+ if ( pszChangeLog )
+ {
+ pszChangeLog[ dwResLen * sizeof TCHAR ] = _T('\0');
+ CWindow ctlHistory( GetDlgItem( IDC_ChangeHistory ) );
+ ctlHistory.SetWindowText( pszChangeLog );
+ UnlockResource( hdata );
+ }
+ FreeResource( hdata );
+ }
+ }
+
+ // Make the caption a hyperlink to the DQSD web site
+ CString csURL;
+ csURL.LoadString( IDS_AboutURL );
+ m_hlAboutURL.SetHyperLink( csURL );
+ m_hlAboutURL.SubclassWindow( GetDlgItem( IDC_Caption ) );
+
+ // mailto: hyperlink
+ csURL.LoadString( IDS_MailToGlennCarr );
+ m_hlAboutMailTo.SetHyperLink( csURL );
+ m_hlAboutMailTo.SubclassWindow( GetDlgItem( IDC_GlennCarr ) );
+
+ return 1; // Let the system set the focus
+ }
+
+ LRESULT CAboutDlg::OnOK(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled)
+ {
+ EndDialog(wID);
+ return 0;
+ }
+
+ LRESULT CAboutDlg::OnCancel(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled)
+ {
+ EndDialog(wID);
+ return 0;
+ }
Index: AboutDlg.h
===================================================================
RCS file: /cvsroot/dqsd/dqsd/src/DQSDSearchWiz/AboutDlg.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** AboutDlg.h 20 Sep 2002 05:10:32 -0000 1.9
--- AboutDlg.h 20 Sep 2002 22:59:13 -0000 1.10
***************
*** 14,24 ****
{
public:
! CAboutDlg()
! {
! }
!
! ~CAboutDlg()
! {
! }
enum { IDD = IDD_ABOUTDLG };
--- 14,19 ----
{
public:
! CAboutDlg();
! ~CAboutDlg();
enum { IDD = IDD_ABOUTDLG };
***************
*** 28,139 ****
COMMAND_ID_HANDLER(IDOK, OnOK)
COMMAND_ID_HANDLER(IDCANCEL, OnCancel)
- MESSAGE_RANGE_HANDLER(WM_MOUSEFIRST, WM_MOUSELAST, OnMouseMessage)
END_MSG_MAP()
- // Handler prototypes:
- // LRESULT MessageHandler(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
- // LRESULT CommandHandler(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
- // LRESULT NotifyHandler(int idCtrl, LPNMHDR pnmh, BOOL& bHandled);
-
- LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
- {
- CenterWindow( GetActiveWindow() );
-
- // Get file version
- TCHAR szModule[ MAX_PATH + 1 ];
- if ( GetModuleFileName( _Module.GetResourceInstance(), szModule,
LENGTHOF(szModule) ) )
- {
- CModuleVersion moduleVersion;
- if ( moduleVersion.GetFileVersionInfo( szModule ) )
- {
- CWindow( GetDlgItem( IDC_Version ) ).SetWindowText( (
_T("Version ") + moduleVersion.GetValue( _T("ProductVersion") ) + _T(" ") +
moduleVersion.GetValue( _T("SpecialBuild") ) ).c_str() );
- }
- }
-
- // Get change log history
- HRSRC hrsc = FindResource( _Module.GetResourceInstance(),
MAKEINTRESOURCE(IDR_CHANGELOG), _T("TEXT") );
- if ( hrsc )
- {
- HGLOBAL hdata = LoadResource( _Module.GetResourceInstance(),
hrsc );
- if ( hdata )
- {
- const DWORD dwResLen = SizeofResource(
_Module.GetResourceInstance(), hrsc );
- LPTSTR pszChangeLog = (LPTSTR)LockResource( hdata );
- if ( pszChangeLog )
- {
- pszChangeLog[ dwResLen * sizeof TCHAR ] =
_T('\0');
- CWindow ctlHistory( GetDlgItem(
IDC_ChangeHistory ) );
- ctlHistory.SetWindowText( pszChangeLog );
- UnlockResource( hdata );
- }
- FreeResource( hdata );
- }
- }
-
- CString csURL;
- csURL.LoadString( IDS_AboutURL );
- m_hlAboutURL.SetHyperLink( csURL );
- m_hlAboutURL.SubclassWindow( GetDlgItem( IDC_Caption ) );
-
- // create a tool tip
- m_tip.Create(m_hWnd);
- ATLASSERT(m_tip.IsWindow());
! RECT rcDlg;
! GetWindowRect( &rcDlg );
!
! RECT rcDlgItem;
! CWindow( GetDlgItem( IDC_ChangeHistory ) ).GetWindowRect( &rcDlgItem );
!
! rcDlgItem.top -= rcDlg.top;
! rcDlgItem.left -= rcDlg.left;
! rcDlgItem.bottom -= rcDlg.top;
! rcDlgItem.right -= rcDlg.left;
!
! m_tip.AddTool( m_hWnd, _T("change history"), &rcDlgItem,
IDC_ChangeHistory );
!
! m_tip.Activate(TRUE);
!
! return 1; // Let the system set the focus
! }
!
! LRESULT OnOK(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled)
! {
! EndDialog(wID);
! return 0;
! }
!
! LRESULT OnCancel(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled)
! {
! EndDialog(wID);
! return 0;
! }
!
! // Override to change message filtering
! /* virtual BOOL PreTranslateMessage(MSG* pMsg)
! {
! switch(pMsg->message)
! {
! case WM_LBUTTONDOWN:
! case WM_LBUTTONUP:
! case WM_MOUSEMOVE:
! m_tip.RelayEvent(pMsg);
! }
! return CDialogImplBase<CAboutDlg>::PreTranslateMessage(pMsg);
! }
! */
!
! LRESULT OnMouseMessage(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
! {
! MSG msg = { m_hWnd, uMsg, wParam, lParam };
! if(m_tip.IsWindow())
! m_tip.RelayEvent(&msg);
! bHandled = FALSE;
! return 1;
! }
private:
CHyperLink m_hlAboutURL;
! CToolTipCtrl m_tip;
!
};
--- 23,35 ----
COMMAND_ID_HANDLER(IDOK, OnOK)
COMMAND_ID_HANDLER(IDCANCEL, OnCancel)
END_MSG_MAP()
! LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
! LRESULT OnOK(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
! LRESULT OnCancel(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
private:
CHyperLink m_hlAboutURL;
! CHyperLink m_hlAboutMailTo;
};
Index: ChangeLog.txt
===================================================================
RCS file: /cvsroot/dqsd/dqsd/src/DQSDSearchWiz/ChangeLog.txt,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** ChangeLog.txt 19 Sep 2002 21:57:10 -0000 1.20
--- ChangeLog.txt 20 Sep 2002 22:59:13 -0000 1.21
***************
*** 1,10 ****
! Version 0.9 (beta) ???
! * Added link to DQSD search wizard page on About dialog
Version 0.8 (beta) 16-Sep-2002
* Added options for including switches and examples in description
! * Changed options for selected FORM CSS styles
Version 0.7 (beta) 9-Sep-2002
--- 1,12 ----
! Version 0.9 (beta) 20-Sep-2002
! * Added links to DQSD search wizard web site on About dialog
! * Added help in the form of tooltips which can be turned on and off
! * Rearranged some of the controls and cleaned up some code
Version 0.8 (beta) 16-Sep-2002
* Added options for including switches and examples in description
! * Changed options for selected form CSS styles
Version 0.7 (beta) 9-Sep-2002
Index: DQSDSearchWiz.cpp
===================================================================
RCS file: /cvsroot/dqsd/dqsd/src/DQSDSearchWiz/DQSDSearchWiz.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** DQSDSearchWiz.cpp 3 Aug 2002 06:05:00 -0000 1.1
--- DQSDSearchWiz.cpp 20 Sep 2002 22:59:13 -0000 1.2
***************
*** 15,19 ****
! CComModule _Module;
BEGIN_OBJECT_MAP(ObjectMap)
--- 15,19 ----
! CAppModule _Module;
BEGIN_OBJECT_MAP(ObjectMap)
Index: DQSDSearchWiz.dsp
===================================================================
RCS file: /cvsroot/dqsd/dqsd/src/DQSDSearchWiz/DQSDSearchWiz.dsp,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** DQSDSearchWiz.dsp 12 Aug 2002 13:25:01 -0000 1.8
--- DQSDSearchWiz.dsp 20 Sep 2002 22:59:13 -0000 1.9
***************
*** 115,118 ****
--- 115,122 ----
# Begin Source File
+ SOURCE=.\DialogToolTipCtrl.cpp
+ # End Source File
+ # Begin Source File
+
SOURCE=.\DQSDSearchWiz.cpp
# End Source File
***************
*** 166,169 ****
--- 170,177 ----
SOURCE=.\AboutDlg.h
+ # End Source File
+ # Begin Source File
+
+ SOURCE=.\DialogToolTipCtrl.h
# End Source File
# Begin Source File
Index: DQSDSearchWiz.rc
===================================================================
RCS file: /cvsroot/dqsd/dqsd/src/DQSDSearchWiz/DQSDSearchWiz.rc,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** DQSDSearchWiz.rc 19 Sep 2002 21:57:10 -0000 1.21
--- DQSDSearchWiz.rc 20 Sep 2002 22:59:13 -0000 1.22
***************
*** 117,166 ****
//
! IDD_DQSDWIZARDDLG DIALOGEX 0, 0, 380, 271
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
! EXSTYLE WS_EX_CONTEXTHELP
! FONT 8, "MS Sans Serif", 0, 0, 0x1
BEGIN
! RTEXT "* &Name:",IDC_STATIC,32,9,33,8
! EDITTEXT IDC_SearchName,67,6,102,14,ES_LOWERCASE | ES_AUTOHSCROLL
! RTEXT "* &Title:",IDC_STATIC,32,24,33,8
! EDITTEXT IDC_SearchTitle,67,21,102,14,ES_AUTOHSCROLL
! RTEXT "&Link:",IDC_STATIC,20,38,45,8
! EDITTEXT IDC_Link,67,35,102,14,ES_AUTOHSCROLL
! RTEXT "&Category:",IDC_STATIC,172,9,45,8
! COMBOBOX IDC_Category,219,6,102,127,CBS_DROPDOWN |
CBS_AUTOHSCROLL | CBS_SORT | WS_VSCROLL | WS_TABSTOP
! RTEXT "C&ontributor:",IDC_STATIC,172,22,45,8
! EDITTEXT IDC_Contributor,219,19,102,14,ES_AUTOHSCROLL
! RTEXT "&Email:",IDC_STATIC,172,38,45,8
! EDITTEXT IDC_Email,219,34,102,14,ES_AUTOHSCROLL
! GROUPBOX "&Description",IDC_STATIC,6,51,165,69
! EDITTEXT IDC_Description,12,61,154,43,ES_MULTILINE |
ES_WANTRETURN | WS_VSCROLL
CONTROL "Include e&xamples",IDC_DescExamples,"Button",
! BS_AUTOCHECKBOX | WS_TABSTOP,12,107,71,10
! GROUPBOX "&Switches (comma-separated)",IDC_STATIC,172,51,149,69
! EDITTEXT IDC_Switches,177,61,138,34,ES_MULTILINE | ES_WANTRETURN |
WS_VSCROLL
CONTROL "&Mutually exclusive",IDC_MutuallyExclusiveSwitches,
! "Button",BS_AUTOCHECKBOX | WS_TABSTOP,177,96,73,10
CONTROL "&Include in description",IDC_DescSwitches,"Button",
! BS_AUTOCHECKBOX | WS_TABSTOP,177,107,104,10
! LTEXT "* &FORMs on current page:",IDC_STATIC,6,123,84,8
CONTROL "List2",IDC_FormList2,"SysListView32",LVS_REPORT |
LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_NOSORTHEADER |
! WS_BORDER | WS_TABSTOP,6,133,315,49,WS_EX_CLIENTEDGE
! DEFPUSHBUTTON "OK",1,324,6,50,14
! PUSHBUTTON "Cancel",2,324,22,50,14
! PUSHBUTTON "O&ptions...",IDC_Options,324,39,50,14
! PUSHBUTTON "&About...",IDC_About,324,55,50,14
! PUSHBUTTON "&HTML >>",IDC_ShowHideHTML,324,168,50,14
! EDITTEXT IDC_FormFields,6,193,368,74,ES_MULTILINE |
ES_AUTOVSCROLL | ES_READONLY | WS_VSCROLL
! ICON IDI_WIZARD,IDC_STATIC,7,4,20,20
LTEXT "* = Required",IDC_STATIC,6,183,40,8
END
! IDD_OPTIONSDLG DIALOG DISCARDABLE 0, 0, 253, 110
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "DQSD Search Wizard Options"
--- 117,168 ----
//
! IDD_DQSDWIZARDDLG DIALOGEX 0, 0, 394, 271
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
! FONT 8, "MS Sans Serif"
BEGIN
! RTEXT "* &Abbreviation:",IDC_STATIC,29,9,49,8
! EDITTEXT IDC_SearchName,80,6,102,14,ES_LOWERCASE | ES_AUTOHSCROLL
! RTEXT "* &Title:",IDC_STATIC,45,24,33,8
! EDITTEXT IDC_SearchTitle,80,21,102,14,ES_AUTOHSCROLL
! RTEXT "&Link:",IDC_STATIC,33,38,45,8
! EDITTEXT IDC_Link,80,35,102,14,ES_AUTOHSCROLL
! RTEXT "&Category:",IDC_STATIC,185,9,45,8
! COMBOBOX IDC_Category,232,6,102,127,CBS_DROPDOWN |
CBS_AUTOHSCROLL | CBS_SORT | WS_VSCROLL | WS_TABSTOP
! RTEXT "C&ontributor:",IDC_STATIC,185,22,45,8
! EDITTEXT IDC_Contributor,232,19,102,14,ES_AUTOHSCROLL
! RTEXT "&Email:",IDC_STATIC,185,38,45,8
! EDITTEXT IDC_Email,232,34,102,14,ES_AUTOHSCROLL
! GROUPBOX "&Description",IDC_STATIC,7,51,165,69
! EDITTEXT IDC_Description,13,61,154,43,ES_MULTILINE |
ES_WANTRETURN | WS_VSCROLL
CONTROL "Include e&xamples",IDC_DescExamples,"Button",
! BS_AUTOCHECKBOX | WS_TABSTOP,13,107,71,10
! GROUPBOX "&Switches (comma-separated)",IDC_STATIC,177,51,157,69
! EDITTEXT IDC_Switches,184,61,145,34,ES_MULTILINE | ES_WANTRETURN |
WS_VSCROLL
CONTROL "&Mutually exclusive",IDC_MutuallyExclusiveSwitches,
! "Button",BS_AUTOCHECKBOX | WS_TABSTOP,184,96,73,10
CONTROL "&Include in description",IDC_DescSwitches,"Button",
! BS_AUTOCHECKBOX | WS_TABSTOP,184,107,104,10
! LTEXT "* &FORMs on current page:",IDC_STATIC,7,123,84,8
CONTROL "List2",IDC_FormList2,"SysListView32",LVS_REPORT |
LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_NOSORTHEADER |
! WS_BORDER | WS_TABSTOP,6,133,330,49,WS_EX_CLIENTEDGE
! DEFPUSHBUTTON "OK",IDOK,338,6,50,14
! PUSHBUTTON "Cancel",IDCANCEL,338,22,50,14
! PUSHBUTTON "O&ptions...",IDC_Options,338,39,50,14
! PUSHBUTTON "&About...",IDC_About,338,55,50,14
! CONTROL "&Show help",IDC_ShowTips,"Button",BS_AUTOCHECKBOX |
! BS_PUSHLIKE | BS_NOTIFY | WS_TABSTOP,338,71,50,14,
! WS_EX_STATICEDGE
! PUSHBUTTON "&HTML >>",IDC_ShowHideHTML,338,168,50,14
! EDITTEXT IDC_FormFields,6,192,382,75,ES_MULTILINE |
ES_AUTOVSCROLL | ES_READONLY | WS_VSCROLL
! ICON IDI_WIZARD,IDC_STATIC,6,5,20,20
LTEXT "* = Required",IDC_STATIC,6,183,40,8
END
! IDD_OPTIONSDLG DIALOGEX 0, 0, 253, 110
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "DQSD Search Wizard Options"
***************
*** 169,175 ****
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 |
--- 171,177 ----
CONTROL "&Edit generated search file",IDC_EditXML,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,6,6,96,10
! RTEXT "E&ditor:",IDC_EditLabel,13,20,25,8
! EDITTEXT IDC_Editor,40,17,138,14,ES_AUTOHSCROLL
! PUSHBUTTON "&...",IDC_Browse,179,17,11,14
CONTROL "Include &comments in generated search file",
IDC_IncludeComments,"Button",BS_AUTOCHECKBOX |
***************
*** 180,185 ****
EDITTEXT IDC_CSS,6,72,241,32,ES_MULTILINE | ES_AUTOVSCROLL |
WS_VSCROLL
! DEFPUSHBUTTON "OK",1,197,7,50,14
! PUSHBUTTON "Cancel",2,197,24,50,14
END
--- 182,189 ----
EDITTEXT IDC_CSS,6,72,241,32,ES_MULTILINE | ES_AUTOVSCROLL |
WS_VSCROLL
! DEFPUSHBUTTON "OK",1,197,6,50,14
! PUSHBUTTON "Cancel",2,197,23,50,14
! CONTROL "&Show help",IDC_ShowTips,"Button",BS_AUTOCHECKBOX |
! BS_PUSHLIKE | WS_TABSTOP,197,40,50,14,WS_EX_STATICEDGE
END
***************
*** 189,204 ****
FONT 8, "MS Sans Serif"
BEGIN
DEFPUSHBUTTON "OK",1,218,5,50,14
PUSHBUTTON "Cancel",2,218,22,50,14
ICON IDI_WIZARD,IDC_STATIC,6,5,20,20
! LTEXT "Dave's Quick Search Deskbar Search Wizard",IDC_Caption,
! 38,8,174,8,WS_TABSTOP
! LTEXT "Copyright (c) 2002 Glenn Carr\nDistributed under the terms of
the\nGNU General Public License, Version 2",
! IDC_STATIC,38,42,171,25
LTEXT "<version>",IDC_Version,38,18,175,15
LTEXT "",IDC_STATIC,91,78,176,1,SS_SUNKEN | NOT WS_GROUP
! LTEXT "Version History",IDC_STATIC,38,74,48,8
! EDITTEXT IDC_ChangeHistory,38,84,230,45,ES_MULTILINE |
! ES_READONLY | WS_VSCROLL | NOT WS_TABSTOP
END
--- 193,210 ----
FONT 8, "MS Sans Serif"
BEGIN
+ LTEXT "Dave's Quick Search Deskbar Search Wizard",IDC_Caption,
+ 38,8,174,8,WS_TABSTOP
+ LTEXT "Glenn Carr",IDC_GlennCarr,97,36,34,8,WS_TABSTOP
+ LTEXT "&Version History",IDC_STATIC,38,74,48,8
+ EDITTEXT IDC_ChangeHistory,38,84,230,45,ES_MULTILINE |
+ ES_READONLY | WS_VSCROLL
DEFPUSHBUTTON "OK",1,218,5,50,14
PUSHBUTTON "Cancel",2,218,22,50,14
ICON IDI_WIZARD,IDC_STATIC,6,5,20,20
! LTEXT "Distributed under the terms of the\nGNU General Public License,
Version 2",
! IDC_STATIC,38,44,173,17
LTEXT "<version>",IDC_Version,38,18,175,15
LTEXT "",IDC_STATIC,91,78,176,1,SS_SUNKEN | NOT WS_GROUP
! LTEXT "Copyright (c) 2002",IDC_STATIC,38,36,58,8
END
***************
*** 215,221 ****
BEGIN
LEFTMARGIN, 6
! RIGHTMARGIN, 374
! VERTGUIDE, 307
! VERTGUIDE, 321
TOPMARGIN, 6
BOTTOMMARGIN, 268
--- 221,225 ----
BEGIN
LEFTMARGIN, 6
! RIGHTMARGIN, 388
TOPMARGIN, 6
BOTTOMMARGIN, 268
***************
*** 262,265 ****
--- 266,305 ----
BEGIN
IDS_AboutURL "http://www.dqsd.net/searchwizard.htm"
+ IDS_MailToGlennCarr "mailto:[EMAIL PROTECTED]"
+ END
+
+ STRINGTABLE DISCARDABLE
+ BEGIN
+ 1001 "Enter the abbreviation for the search. This is used to
+invoke the search and should be a short abbreviation which isn't a common word. You
+also won't be able to enter uppercase or non-alphanumeric characters."
+ 1002 "Enter the title or name of the search. This is what
+will be displayed in the menu."
+ 1003 "Enter the URL that this search should default to if no
+parameters are entered for the search. The wizard will try to guess this based on
+the current URL, but it may not be the best default, so you should double-check it."
+ 1004 "Enter the category for this search. You can select one
+from the list or enter a unique category. If you don't enter a category the search
+will be grouped in the ""Other"" category in the menu and the help."
+ 1005 "If you want to receive lavish quantities of praise for
+writing this search enter your name here. Or, if you feel you are not deserving of
+such praise because the most excellent DQSD Search Wizard did most of the work for
+you, then enter my name, Glenn Carr <just kidding>."
+ 1006 "If you want to be able to be contacted about this
+search enter your email address here. Please note that if this search ends up being
+distributed with DQSD, your email will be out there for everyone to see, which isn't
+necessarily bad, but I like to enter my email in the form 'glenn at glenncarr dot
+com' just to keep bot email harvesters from finding it."
+ 1007 "Enter a helpful description for this search. It can be
+as long or as short as you prefer."
+ END
+
+ STRINGTABLE DISCARDABLE
+ BEGIN
+ 1008 "Enter switches, if any, that you want to use with this
+search. Script will be generated for parsing the switches if you do enter some."
+ 1009 "Do you want to include examples in the description? If
+so, check this box and some placeholders with the standard formatting will be
+inserted in the description."
+ 1010 "OK, so what this really means is... ""Does it make
+sense for this search to get only one switch at a time (i.e., they are mutually
+exclusive), or does it use a combination of switches?"" The switch parsing code
+which is generated will be a little different depending on your choice here."
+ 1011 "Do you want to include the switches in the description?
+ I don't really see why you wouldn't want to, but if so uncheck this box."
+ 1012 "This is a list of the form elements on the current web
+page. Check the box next to the form(s) which are required for your search. If you
+selected, or made active, an input field before you started up this wizard, its form
+should be checked below. If you select or highlight a form, an attempt will be made
+to make it visually standout according to the CSS styles (check the options). This
+can be helpful if you aren't quite sure which form to include in your search."
+ 1013 "This button will hide or display the HTML for the
+selected form. This was simply provided as another aid in determining the correct
+form(s) to include in your search."
+ 1014 "This should display the HTML for the selected form.
+This was simply provided as another aid in determining the correct form(s) to include
+in your search."
+ 1015 "Change various options."
+ 1016 "Check out who wrote this wizard and recent changes."
+ 1017 "Show help in the form of tool tips."
+ END
+
+ STRINGTABLE DISCARDABLE
+ BEGIN
+ 2001 "Check this box if you want to edit the new search after
+the wizard generates it."
+ 2002 "Choose the editor your want to use here. If none is
+specified, then Notepad will be used."
+ 2003 "Browse for your favorite editor executable."
+ 2004 "Include helpful comments in the generated search file."
+ 2005 "Prompt with a message if you start up the wizard, but a
+search field hasn't been selected. Selecting or activating the field which receives
+the search string, will cause a more complete search to be generated."
+ 2006 "Enter CSS (cascading style sheet) attributes for form
+selected in the list of forms. A good default value is: ""background: yellow;
+border: 2px dotted red"". Check a good CSS reference for more options."
END
Index: DQSDWizardDlg.cpp
===================================================================
RCS file: /cvsroot/dqsd/dqsd/src/DQSDSearchWiz/DQSDWizardDlg.cpp,v
retrieving revision 1.35
retrieving revision 1.36
diff -C2 -d -r1.35 -r1.36
*** DQSDWizardDlg.cpp 16 Sep 2002 11:31:27 -0000 1.35
--- DQSDWizardDlg.cpp 20 Sep 2002 22:59:13 -0000 1.36
***************
*** 62,65 ****
--- 62,105 ----
USES_CONVERSION;
+ // Create tooltip for controls
+
+ m_tip.Create( m_hWnd );
+
+ int rgCtrlIDs[] = {
+ IDC_SearchName,
+ IDC_SearchTitle,
+ IDC_Link,
+ IDC_Category,
+ IDC_Contributor,
+ IDC_Email,
+ IDC_Description,
+ IDC_Switches,
+ IDC_DescExamples,
+ IDC_MutuallyExclusiveSwitches,
+ IDC_DescSwitches,
+ IDC_FormList2,
+ IDC_ShowHideHTML,
+ IDC_FormFields,
+ IDC_Options,
+ IDC_About,
+ IDC_ShowTips,
+ };
+
+ for ( int iCtrl = 0; iCtrl < LENGTHOF( rgCtrlIDs ); iCtrl++ )
+ {
+ CString csTip;
+ if ( csTip.LoadString( rgCtrlIDs[ iCtrl ] ) )
+ {
+ m_tip.AddTool( rgCtrlIDs[ iCtrl ], csTip.LockBuffer()
+);
+ csTip.UnlockBuffer();
+ }
+ }
+
+ ATLTRACE( "CWindow( GetDlgItem( IDC_ShowTips ) ).SendMessage(
+BM_GETCHECK, 0, 0 ): %d\n", CWindow( GetDlgItem( IDC_ShowTips ) ).SendMessage(
+BM_GETCHECK, 0, 0 ) );
+ ATLTRACE( "BST_CHECKED: %d\n", BST_CHECKED );
+ m_tip.Activate( ( CWindow( GetDlgItem( IDC_ShowTips ) ).SendMessage(
+BM_GETCHECK, 0, 0 ) == BST_CHECKED ) );
+
+ // Shrink dialog initially
+
RECT rcDialog;
GetWindowRect( &rcDialog );
***************
*** 68,82 ****
ShrinkDialog();
OnChangeSwitches( 0, 0, NULL, bHandled );
! #ifdef _DEBUG
CWindow( GetDlgItem( IDC_SearchName ) ).SetWindowText( _T("xyzzy") );
CWindow( GetDlgItem( IDC_SearchTitle ) ).SetWindowText( _T("xyzzy
Search") );
! #endif
CenterWindow( GetActiveWindow() ); // ??? should probably use the
actual browser window
m_editSearchName.SubclassWindow( GetDlgItem( IDC_SearchName ) );
TCHAR szModule[ MAX_PATH + 1 ];
if ( GetModuleFileName( _Module.GetResourceInstance(), szModule,
LENGTHOF(szModule) ) )
--- 108,130 ----
ShrinkDialog();
+ // Disable controls dependent on having switches
+
OnChangeSwitches( 0, 0, NULL, bHandled );
! // Just for debugging
!
! #ifdef _DEBUG
CWindow( GetDlgItem( IDC_SearchName ) ).SetWindowText( _T("xyzzy") );
CWindow( GetDlgItem( IDC_SearchTitle ) ).SetWindowText( _T("xyzzy
Search") );
! #endif
CenterWindow( GetActiveWindow() ); // ??? should probably use the
actual browser window
+ // Subclass search name to restrict to lowercase and no spaces
+
m_editSearchName.SubclassWindow( GetDlgItem( IDC_SearchName ) );
+ // Get the copyright for use in various places
+
TCHAR szModule[ MAX_PATH + 1 ];
if ( GetModuleFileName( _Module.GetResourceInstance(), szModule,
LENGTHOF(szModule) ) )
***************
*** 1011,1014 ****
--- 1059,1064 ----
rk.SetValue( CWindow( GetDlgItem( IDC_DescExamples ) ).SendMessage(
BM_GETCHECK, 0, 0 ) == BST_CHECKED, _T("IncludeDescriptionExamples") );
+ rk.SetValue( CWindow( GetDlgItem( IDC_ShowTips ) ).SendMessage(
+BM_GETCHECK, 0, 0 ) == BST_CHECKED, _T("ShowTips") );
+
rk.Close();
}
***************
*** 1054,1057 ****
--- 1104,1111 ----
rk.QueryValue( dwValue, _T("IncludeDescriptionExamples") );
CWindow( GetDlgItem( IDC_DescExamples ) ).SendMessage(
BM_SETCHECK, dwValue ? BST_CHECKED : BST_UNCHECKED );
+
+ dwValue = 0;
+ rk.QueryValue( dwValue, _T("ShowTips") );
+ CWindow( GetDlgItem( IDC_ShowTips ) ).SendMessage(
+BM_SETCHECK, dwValue ? BST_CHECKED : BST_UNCHECKED );
}
else
Index: DQSDWizardDlg.h
===================================================================
RCS file: /cvsroot/dqsd/dqsd/src/DQSDSearchWiz/DQSDWizardDlg.h,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** DQSDWizardDlg.h 16 Sep 2002 11:31:27 -0000 1.20
--- DQSDWizardDlg.h 20 Sep 2002 22:59:13 -0000 1.21
***************
*** 8,16 ****
#include "Options.h"
#include "resource.h" // main symbols
/////////////////////////////////////////////////////////////////////////////
// CDQSDWizardDlg
class CDQSDWizardDlg :
! public CAxDialogImpl<CDQSDWizardDlg>
{
public:
--- 8,17 ----
#include "Options.h"
#include "resource.h" // main symbols
+ #include "DialogToolTipCtrl.h"
/////////////////////////////////////////////////////////////////////////////
// CDQSDWizardDlg
class CDQSDWizardDlg :
! public CDialogImpl<CDQSDWizardDlg>
{
public:
***************
*** 40,43 ****
--- 41,45 ----
COMMAND_HANDLER(IDC_ShowHideHTML, BN_CLICKED, OnClickedShowHideHTML)
COMMAND_HANDLER(IDC_Switches, EN_CHANGE, OnChangeSwitches)
+ COMMAND_HANDLER(IDC_ShowTips, BN_CLICKED, OnClickedShowtips)
END_MSG_MAP()
// Handler prototypes:
***************
*** 62,66 ****
return 0;
}
-
LRESULT OnFormListItemChanged(int idCtrl, LPNMHDR pNMHDR, BOOL& bHandled);
LRESULT OnClickedAbout(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL&
bHandled);
--- 64,67 ----
***************
*** 68,71 ****
--- 69,77 ----
LRESULT OnClickedShowHideHTML(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL&
bHandled);
LRESULT OnChangeSwitches(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL&
bHandled);
+ LRESULT OnClickedShowtips(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL&
+bHandled)
+ {
+ m_tip.Activate( ( CWindow( GetDlgItem( IDC_ShowTips ) ).SendMessage(
+BM_GETCHECK, 0, 0 ) == BST_CHECKED ) );
+ return 0;
+ }
public:
***************
*** 86,89 ****
--- 92,96 ----
CComPtr< IHTMLStyle > m_spSelectedStyle;
int m_nTallDialogHeight;
+ CDialogToolTipCtrl m_tip;
private:
Index: OptionsDlg.h
===================================================================
RCS file: /cvsroot/dqsd/dqsd/src/DQSDSearchWiz/OptionsDlg.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** OptionsDlg.h 16 Sep 2002 11:31:27 -0000 1.7
--- OptionsDlg.h 20 Sep 2002 22:59:13 -0000 1.8
***************
*** 7,10 ****
--- 7,11 ----
#include "resource.h" // main symbols
#include "options.h"
+ #include "DialogToolTipCtrl.h"
/////////////////////////////////////////////////////////////////////////////
***************
*** 31,34 ****
--- 32,36 ----
COMMAND_HANDLER(IDC_EditXML, BN_CLICKED, OnClickedEditXML)
COMMAND_HANDLER(IDC_Browse, BN_CLICKED, OnClickedBrowse)
+ COMMAND_HANDLER(IDC_ShowTips, BN_CLICKED, OnClickedShowtips)
END_MSG_MAP()
// Handler prototypes:
***************
*** 39,42 ****
--- 41,70 ----
LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
+ // Create tooltip for controls
+
+ m_tip.Create( m_hWnd );
+
+ int rgCtrlIDs[] = {
+ IDC_EditXML,
+ IDC_Editor,
+ IDC_Browse,
+ IDC_IncludeComments,
+ IDC_WarnNotActive,
+ IDC_CSS,
+ IDC_ShowTips,
+ };
+
+ for ( int iCtrl = 0; iCtrl < LENGTHOF( rgCtrlIDs ); iCtrl++ )
+ {
+ CString csTip;
+ if ( csTip.LoadString( rgCtrlIDs[ iCtrl ] ) )
+ {
+ m_tip.AddTool( rgCtrlIDs[ iCtrl ], csTip.LockBuffer()
+);
+ csTip.UnlockBuffer();
+ }
+ }
+
+ m_tip.Activate( ( CWindow( GetDlgItem( IDC_ShowTips ) ).SendMessage(
+BM_GETCHECK, 0, 0 ) == BST_CHECKED ) );
+
CenterWindow( GetActiveWindow() );
***************
*** 90,97 ****
--- 118,134 ----
}
+ LRESULT OnClickedShowtips(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL&
+bHandled)
+ {
+ m_tip.Activate( ( CWindow( GetDlgItem( IDC_ShowTips ) ).SendMessage(
+BM_GETCHECK, 0, 0 ) == BST_CHECKED ) );
+ return 0;
+ }
+
LRESULT OnClickedBrowse(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL&
bHandled);
public:
COptions m_options;
+
+ private:
+ CDialogToolTipCtrl m_tip;
};
Index: StdAfx.h
===================================================================
RCS file: /cvsroot/dqsd/dqsd/src/DQSDSearchWiz/StdAfx.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** StdAfx.h 19 Sep 2002 21:57:10 -0000 1.10
--- StdAfx.h 20 Sep 2002 22:59:13 -0000 1.11
***************
*** 17,23 ****
#include <atlbase.h>
//You may derive a class from CComModule and use it if you want to override
//something, but do not change the name of _Module
! extern CComModule _Module;
#include <ExDisp.h>
#include <MsHtml.h>
--- 17,26 ----
#include <atlbase.h>
+ #include <atlapp.h>
+
//You may derive a class from CComModule and use it if you want to override
//something, but do not change the name of _Module
! extern CAppModule _Module;
!
#include <ExDisp.h>
#include <MsHtml.h>
***************
*** 31,35 ****
#include <time.h>
#include <atlhost.h>
- #include <atlapp.h>
#include <atlctrls.h>
#include <atlctrlx.h>
--- 34,37 ----
Index: resource.h
===================================================================
RCS file: /cvsroot/dqsd/dqsd/src/DQSDSearchWiz/resource.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** resource.h 19 Sep 2002 21:57:10 -0000 1.10
--- resource.h 20 Sep 2002 22:59:13 -0000 1.11
***************
*** 12,47 ****
#define IDI_NORMAL 201
#define IDC_FormList 201
! #define IDS_AboutURLText 201
#define IDI_HOT 202
- #define IDC_FormList2 202
- #define IDC_SearchTitle 203
- #define IDC_Switches 204
#define IDI_WIZARD 204
- #define IDC_Contributor 205
#define IDR_CHANGELOG 205
- #define IDC_Description 206
- #define IDC_Category 207
- #define IDC_Link 208
- #define IDC_Email 209
- #define IDC_FormFields 210
- #define IDC_SearchName 211
- #define IDC_About 212
- #define IDC_Options 213
- #define IDC_EditXML 214
- #define IDC_Editor 215
#define IDC_Version 217
#define IDC_DontAskAgain 218
#define IDC_Message 223
- #define IDC_IncludeComments 224
#define IDC_ChangeHistory 228
- #define IDC_Browse 231
- #define IDC_WarnNotActive 232
#define IDC_EditLabel 233
- #define IDC_CSS 234
- #define IDC_MutuallyExclusiveSwitches 236
- #define IDC_ShowHideHTML 237
- #define IDC_DescSwitches 238
- #define IDC_DescExamples 239
#define IDC_Caption 240
// Next default values for new objects
--- 12,49 ----
#define IDI_NORMAL 201
#define IDC_FormList 201
! #define IDS_MailToGlennCarr 201
#define IDI_HOT 202
#define IDI_WIZARD 204
#define IDR_CHANGELOG 205
#define IDC_Version 217
#define IDC_DontAskAgain 218
#define IDC_Message 223
#define IDC_ChangeHistory 228
#define IDC_EditLabel 233
#define IDC_Caption 240
+ #define IDC_GlennCarr 242
+ #define IDC_SearchName 1001
+ #define IDC_SearchTitle 1002
+ #define IDC_Link 1003
+ #define IDC_Category 1004
+ #define IDC_Contributor 1005
+ #define IDC_Email 1006
+ #define IDC_Description 1007
+ #define IDC_Switches 1008
+ #define IDC_DescExamples 1009
+ #define IDC_MutuallyExclusiveSwitches 1010
+ #define IDC_DescSwitches 1011
+ #define IDC_FormList2 1012
+ #define IDC_ShowHideHTML 1013
+ #define IDC_FormFields 1014
+ #define IDC_Options 1015
+ #define IDC_About 1016
+ #define IDC_ShowTips 1017
+ #define IDC_EditXML 2001
+ #define IDC_Editor 2002
+ #define IDC_Browse 2003
+ #define IDC_IncludeComments 2004
+ #define IDC_WarnNotActive 2005
+ #define IDC_CSS 2006
// Next default values for new objects
***************
*** 51,55 ****
#define _APS_NEXT_RESOURCE_VALUE 206
#define _APS_NEXT_COMMAND_VALUE 32768
! #define _APS_NEXT_CONTROL_VALUE 241
#define _APS_NEXT_SYMED_VALUE 106
#endif
--- 53,57 ----
#define _APS_NEXT_RESOURCE_VALUE 206
#define _APS_NEXT_COMMAND_VALUE 32768
! #define _APS_NEXT_CONTROL_VALUE 243
#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/