Browse Source

fixed border issue when resizing tooltip window

git-svn-id: svn://svn.code.sf.net/p/ditto-cp/code/trunk@694 595ec19a-5cb4-439b-94a8-42fb3063c22c
sabrogden 12 years ago
parent
commit
bd8cc0deb8
2 changed files with 6 additions and 6 deletions
  1. 4 4
      DittoWindow.cpp
  2. 2 2
      ToolTipEx.cpp

+ 4 - 4
DittoWindow.cpp

@@ -59,10 +59,10 @@ void CDittoWindow::DoCreate(CWnd *pWnd)
 void CDittoWindow::DoNcCalcSize(BOOL bCalcValidRects, NCCALCSIZE_PARAMS FAR* lpncsp)
 {
 	//Decrease the client area
-	lpncsp->rgrc[0].left+= m_lLeftBorder;
-	lpncsp->rgrc[0].top+= m_lTopBorder;
-	lpncsp->rgrc[0].right-= m_lRightBorder;
-	lpncsp->rgrc[0].bottom-= m_lBottomBorder;
+	lpncsp->rgrc[0].left += m_lLeftBorder;
+	lpncsp->rgrc[0].top += m_lTopBorder;
+	lpncsp->rgrc[0].right -= m_lRightBorder;
+	lpncsp->rgrc[0].bottom -= m_lBottomBorder;
 }
 
 UINT CDittoWindow::DoNcHitTest(CWnd *pWnd, CPoint point) 

+ 2 - 2
ToolTipEx.cpp

@@ -67,7 +67,7 @@ BOOL CToolTipEx::Create(CWnd *pParentWnd)
         LoadCursor(NULL, IDC_ARROW));
 
     // Create the window - just don't show it yet.
-    if( !CWnd::CreateEx(WS_EX_TOPMOST, szClassName, _T(""), WS_POPUP | WS_BORDER,
+    if( !CWnd::CreateEx(WS_EX_TOPMOST, szClassName, _T(""), WS_POPUP,
        0, 0, 0, 0, pParentWnd->GetSafeHwnd(), 0, NULL))
     {
         return FALSE;
@@ -564,7 +564,7 @@ void CToolTipEx::OnSize(UINT nType, int cx, int cy)
 
 	m_optionsButton.MoveWindow(cr.left, cr.bottom + theApp.m_metrics.ScaleY(2), theApp.m_metrics.ScaleX(17), theApp.m_metrics.ScaleY(17));
 
-	this->Invalidate();
+	//this->Invalidate();
 
 	m_DittoWindow.DoSetRegion(this);
 }