Index: src/ch/MiniViewDlg.cpp
===================================================================
diff -u -N -re701ed2460c2558eeefab55a1f3ed1d2c89a56c0 -r66e9ad9a512cec46d691cb1ba012424dc7ac8897
--- src/ch/MiniViewDlg.cpp	(.../MiniViewDlg.cpp)	(revision e701ed2460c2558eeefab55a1f3ed1d2c89a56c0)
+++ src/ch/MiniViewDlg.cpp	(.../MiniViewDlg.cpp)	(revision 66e9ad9a512cec46d691cb1ba012424dc7ac8897)
@@ -21,6 +21,7 @@
 #include "stdafx.h"
 #include "MiniViewDlg.h"
 #include "ch.h"
+#include <assert.h>
 
 #ifdef _DEBUG
 #define new DEBUG_NEW
@@ -738,6 +739,9 @@
 
 void CMiniViewDlg::ResizeDialog()
 {
+	if(!IsWindowVisible())
+		return;
+
 	// remember pos of listbox
 	CRect rcList, rcWindow, rcClient;
 	m_ctlStatus.GetWindowRect(&rcList);
@@ -753,13 +757,19 @@
 
 	NONCLIENTMETRICS ncm;
 	ncm.cbSize=sizeof(NONCLIENTMETRICS);
-	SystemParametersInfo(SPI_GETNONCLIENTMETRICS, ncm.cbSize, &ncm, 0);
+	if(!SystemParametersInfo(SPI_GETNONCLIENTMETRICS, ncm.cbSize, &ncm, 0))
+	{
+		TRACE(_T("Last error: %lu"), GetLastError());
+
+		assert(false);		// function call failed
+		return;
+	}
 	
 	CFont font;
 	font.CreateFontIndirect(&ncm.lfSmCaptionFont);
 	dc.SelectObject(&font);
 
-	CSize sSize=dc.GetTextExtent(strTitle);
+	CSize sSize=dc.GetOutputTextExtent(strTitle);
 
 	int iEdgeWidth=1;
 	int iBoxWidth=static_cast<int>(static_cast<double>(((9+2)-2*iEdgeWidth))*(2.0/3.0))+1;