Browse Source

fixed issue with editing the title of a clip on some computers, removed rich text and replaced it with a plain old edit control

git-svn-id: svn://svn.code.sf.net/p/ditto-cp/code/trunk@649 595ec19a-5cb4-439b-94a8-42fb3063c22c
sabrogden 14 years ago
parent
commit
f7b2e55a1b
4 changed files with 10 additions and 9 deletions
  1. 1 1
      CP_Main.rc
  2. 6 6
      CopyProperties.cpp
  3. 1 1
      CopyProperties.h
  4. 2 1
      Resource.h

+ 1 - 1
CP_Main.rc

@@ -571,7 +571,6 @@ STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_THICKFR
 CAPTION "Copy Properties"
 FONT 8, "MS Shell Dlg", 400, 0, 0x1
 BEGIN
-    CONTROL         "",IDC_RICHEDIT1,"RICHEDIT",TCS_HOTTRACK | TCS_VERTICAL | TCS_FOCUSONBUTTONDOWN | TCS_MULTISELECT | WS_BORDER | WS_VSCROLL | WS_TABSTOP,7,101,263,75
     CONTROL         "HotKey1",IDC_HOTKEY,"msctls_hotkey32",WS_BORDER | WS_TABSTOP,51,7,82,13
     EDITTEXT        IDC_DATE,51,23,82,13,ES_AUTOHSCROLL | WS_DISABLED | NOT WS_TABSTOP
     CONTROL         "&Never Auto Delete",IDC_NEVER_AUTO_DELETE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,137,25,105,10
@@ -591,6 +590,7 @@ BEGIN
     CONTROL         "Win",IDC_CHECK_WIN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,137,7,33,14
     EDITTEXT        IDC_DATE_LAST_USED,51,38,82,13,ES_AUTOHSCROLL | WS_DISABLED | NOT WS_TABSTOP
     LTEXT           "Last Used",IDC_STATIC_DATE2,8,38,43,13,SS_CENTERIMAGE
+    EDITTEXT        IDC_EDIT_PROPERTIES,7,102,263,74,ES_MULTILINE | ES_AUTOHSCROLL
 END
 
 IDD_ABOUT DIALOGEX 0, 0, 337, 206

+ 6 - 6
CopyProperties.cpp

@@ -41,7 +41,7 @@ void CCopyProperties::DoDataExchange(CDataExchange* pDX)
 	CDialog::DoDataExchange(pDX);
 	//{{AFX_DATA_MAP(CCopyProperties)
 	DDX_Control(pDX, IDC_EDIT_QUICK_PASTE, m_QuickPasteText);
-	DDX_Control(pDX, IDC_RICHEDIT1, m_RichEdit);
+	DDX_Control(pDX, IDC_EDIT_PROPERTIES, m_description);
 	DDX_Control(pDX, IDC_COMBO1, m_GroupCombo);
 	DDX_Control(pDX, IDC_HOTKEY, m_HotKey);
 	DDX_Control(pDX, IDC_COPY_DATA, m_lCopyData);
@@ -99,11 +99,11 @@ BOOL CCopyProperties::OnInitDialog()
 	}
 	else
 	{
-		m_RichEdit.SetFocus();
+		m_description.SetFocus();
 	}
 
 	m_Resize.SetParent(m_hWnd);
-	m_Resize.AddControl(IDC_RICHEDIT1, DR_SizeHeight | DR_SizeWidth);
+	m_Resize.AddControl(IDC_EDIT_PROPERTIES, DR_SizeHeight | DR_SizeWidth);
 	m_Resize.AddControl(IDC_STATIC_FORMATS, DR_MoveTop);
 	m_Resize.AddControl(IDC_COPY_DATA, DR_MoveTop | DR_SizeWidth);
 	m_Resize.AddControl(IDC_DELETE_COPY_DATA, DR_MoveTop);
@@ -125,8 +125,8 @@ void CCopyProperties::LoadDataFromCClip(CClip &Clip)
 	COleDateTime lastPasteDate(Clip.m_lastPasteDate.GetTime());
 	m_lastPasteDate = lastPasteDate.Format();
 
-	m_RichEdit.SetText(Clip.m_Desc);
-
+	m_description.SetWindowText(Clip.m_Desc);
+	
 	if(Clip.m_dontAutoDelete)
 	{
 		m_bNeverAutoDelete = TRUE;
@@ -285,7 +285,7 @@ void CCopyProperties::LoadDataIntoCClip(CClip &Clip)
 		theApp.m_db.execDMLEx(_T("UPDATE Main SET lShortCut = 0 where lShortCut = %d AND lID <> %d;"), Clip.m_shortCut, m_lCopyID);
 	}
 
-	Clip.m_Desc = m_RichEdit.GetText();
+	m_description.GetWindowText(Clip.m_Desc);
 	Clip.m_Desc.Replace(_T("'"), _T("''"));
 
 	m_QuickPasteText.GetWindowText(Clip.m_csQuickPaste);

+ 1 - 1
CopyProperties.h

@@ -25,7 +25,7 @@ public:
 	//{{AFX_DATA(CCopyProperties)
 	enum { IDD = IDD_COPY_PROPERTIES };
 	CEdit	m_QuickPasteText;
-	CRichEditCtrlEx	m_RichEdit;
+	CEdit m_description;
 	CGroupCombo	m_GroupCombo;
 	CHotKeyCtrl	m_HotKey;
 	CListBox	m_lCopyData;

+ 2 - 1
Resource.h

@@ -251,6 +251,7 @@
 #define IDC_COPY_3                      2099
 #define IDC_CHECK_WIN                   2099
 #define IDC_WIN_COPY_3                  2100
+#define IDC_EDIT_PROPERTIES             2100
 #define IDC_PASTE_3                     2101
 #define IDC_WIN_PASTE_3                 2102
 #define IDC_STATIC_COPY_3               2103
@@ -360,7 +361,7 @@
 #define _APS_3D_CONTROLS                     1
 #define _APS_NEXT_RESOURCE_VALUE        175
 #define _APS_NEXT_COMMAND_VALUE         32873
-#define _APS_NEXT_CONTROL_VALUE         2100
+#define _APS_NEXT_CONTROL_VALUE         2101
 #define _APS_NEXT_SYMED_VALUE           101
 #endif
 #endif