pPanesPos[i] = 100 + cxLeft + arrBorders[2];
pPanesPos[i] = INT_MAX / 2;
	BOOL SetPanes(int* pPanes, int nPanes, bool bSetText = true)	{		ATLASSERT(::IsWindow(m_hWnd));		ATLASSERT(nPanes > 0);		m_nPanes = nPanes;		delete [] m_pPane;		m_pPane = NULL;		ATLTRY(m_pPane = new int[nPanes]);		ATLASSERT(m_pPane != NULL);		if(m_pPane == NULL)			return FALSE;		memcpy(m_pPane, pPanes, nPanes * sizeof(int));		int* pPanesPos = (int*)_alloca(nPanes * sizeof(int));		// get status bar DC and set font		CClientDC dc(m_hWnd);		HFONT hOldFont = dc.SelectFont(GetFont());		// get status bar borders		int arrBorders[3] = { 0 };		GetBorders(arrBorders);		const int cchBuff = 128;		TCHAR szBuff[cchBuff] = { 0 };		SIZE size = { 0, 0 };		int cxLeft = arrBorders[0];		// calculate right edge of each part		for(int i = 0; i < nPanes; i++)		{			if(pPanes[i] == ID_DEFAULT_PANE)			{				// will be resized later				pPanesPos[i] = 100 + cxLeft + arrBorders[2];			}			else			{#if (_ATL_VER >= 0x0700)				::LoadString(ATL::_AtlBaseModule.GetResourceInstance(), pPanes[i], szBuff, cchBuff);#else //!(_ATL_VER >= 0x0700)				::LoadString(_Module.GetResourceInstance(), pPanes[i], szBuff, cchBuff);#endif //!(_ATL_VER >= 0x0700)				dc.GetTextExtent(szBuff, lstrlen(szBuff), &size);				T* pT = static_cast<T*>(this);				pT;				pPanesPos[i] = cxLeft + size.cx + arrBorders[2] + 2 * pT->m_cxPaneMargin;			}			cxLeft = pPanesPos[i];		}		BOOL bRet = SetParts(nPanes, pPanesPos);		if(bRet && bSetText)		{			for(int i = 0; i < nPanes; i++)			{				if(pPanes[i] != ID_DEFAULT_PANE)				{#if (_ATL_VER >= 0x0700)					::LoadString(ATL::_AtlBaseModule.GetResourceInstance(), pPanes[i], szBuff, cchBuff);#else //!(_ATL_VER >= 0x0700)					::LoadString(_Module.GetResourceInstance(), pPanes[i], szBuff, cchBuff);#endif //!(_ATL_VER >= 0x0700)					SetPaneText(m_pPane[i], szBuff);				}			}		}		dc.SelectFont(hOldFont);		return bRet;	}