if(m_ImageList.m_hImageList != NULL && (m_dwExtendedStyle & BMPBTN_AUTOSIZE) != 0) SizeToImage();
if(m_bPaintLabel) { ATL::CRegKey rk; LONG lRet = rk.Open(HKEY_CURRENT_USER, _T("Software\\Microsoft\\Internet Explorer\\Settings")); if(lRet == 0) { const int cchBuff = 12; TCHAR szBuff[cchBuff] = { 0 }; #if (_ATL_VER >= 0x0700) ULONG ulCount = cchBuff; lRet = rk.QueryStringValue(_T("Anchor Color"), szBuff, &ulCount); #else DWORD dwCount = cchBuff * sizeof(TCHAR); lRet = rk.QueryValue(szBuff, _T("Anchor Color"), &dwCount); #endif if(lRet == 0) { COLORREF clr = pT->_ParseColorString(szBuff); ATLASSERT(clr != CLR_INVALID); if(clr != CLR_INVALID) m_clrLink = clr; }  #if (_ATL_VER >= 0x0700) ulCount = cchBuff; lRet = rk.QueryStringValue(_T("Anchor Color Visited"), szBuff, &ulCount); #else dwCount = cchBuff * sizeof(TCHAR); lRet = rk.QueryValue(szBuff, _T("Anchor Color Visited"), &dwCount); #endif if(lRet == 0) { COLORREF clr = pT->_ParseColorString(szBuff); ATLASSERT(clr != CLR_INVALID); if(clr != CLR_INVALID) m_clrVisited = clr; } } }
	void Init()	{		// We need this style to prevent Windows from painting the button		ModifyStyle(0, BS_OWNERDRAW);		// create a tool tip		m_tip.Create(m_hWnd);		ATLASSERT(m_tip.IsWindow());		if(m_tip.IsWindow() && m_lpstrToolTipText != NULL)		{			m_tip.Activate(TRUE);			m_tip.AddTool(m_hWnd, m_lpstrToolTipText);		}		if(m_ImageList.m_hImageList != NULL && (m_dwExtendedStyle & BMPBTN_AUTOSIZE) != 0)			SizeToImage();	}