Browse Source

removed similuted button click, this was causing ditto to regain focus when it was set as top most and a copy was made

git-svn-id: svn://svn.code.sf.net/p/ditto-cp/code/trunk@542 595ec19a-5cb4-439b-94a8-42fb3063c22c
sabrogden 15 years ago
parent
commit
0f04696203
3 changed files with 2 additions and 24 deletions
  1. 2 2
      Misc.cpp
  2. 0 19
      QListCtrl.cpp
  3. 0 3
      QPasteWnd.cpp

+ 2 - 2
Misc.cpp

@@ -57,9 +57,9 @@ void AppendToFile(const TCHAR* fn, const TCHAR* msg)
 	if(file != NULL)
 	{
 		#ifdef _UNICODE
-			fwprintf(file, msg);
+			fwprintf(file, _T("%s"), msg);
 		#else
-			fprintf(file, msg);
+			fprintf(file, _T("%s"),msg);
 		#endif
 
 		fclose(file);	

+ 0 - 19
QListCtrl.cpp

@@ -284,25 +284,6 @@ BOOL CQListCtrl::SetListPos( int index )
 	SetSelection(index);
 	EnsureVisible(index,FALSE);
 
-	//similutate a click on the selected item
-	//I was having a problem with the previous selection still be there
-	//when you shift selected it would still have the previous selection as the anchor
-
-	CWnd *pFocus = GetFocus();
-	if(pFocus == NULL || pFocus == this)
-	{
-		CRect rect;
-		if(GetItemRect(index, rect, LVIR_BOUNDS))
-		{
-			CPoint pt(rect.TopLeft());
-			pt.x += 2;
-			pt.y += 2;
-
-			PostMessage(WM_LBUTTONDOWN, MK_LBUTTON, MAKELPARAM(pt.x, pt.y));
-			PostMessage(WM_LBUTTONUP, MK_LBUTTON, MAKELPARAM(pt.x, pt.y));
-		}
-	}
-
 	return TRUE;
 }
 

+ 0 - 3
QPasteWnd.cpp

@@ -354,9 +354,6 @@ void CQPasteWnd::OnSetFocus(CWnd *pOldWnd)
 {
     CWndEx::OnSetFocus(pOldWnd);
 
-    //::SetWindowPos(m_hWnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE | SWP_SHOWWINDOW);
-
-    // Set the focus to the list control
     if(::IsWindow(m_lstHeader.m_hWnd))
     {
         m_lstHeader.SetFocus();