tts

	m_img.Load(oControl.strText);
	m_bmpBkImage.Attach(m_img.Detach());
	BLAZE_UTILITY::DrawRectBitmap(pDC->GetSafeHdc(),m_bmpBkImage,oControl.rcControl,TRUE);
	m_bmpBkImage.Detach();


	CFont font;
	LOGFONT lf;
	memset(&lf, 0, sizeof(LOGFONT));       
	lf.lfHeight = oControl.nFontSize;                      
	_tcscpy(lf.lfFaceName, oControl.strFontName);     
	VERIFY(font.CreateFontIndirect(&lf));  

	COLORREF clrOld = pDC->SetTextColor(oControl.clrText);
	CFont* def_font = pDC->SelectObject(&font);
	int nMode = pDC->GetBkMode();
	pDC->SetBkMode(TRANSPARENT);
	pDC->DrawText(oControl.strText,oControl.rcControl,DT_LEFT|DT_BOTTOM);
	pDC->SelectObject(def_font);
	font.DeleteObject();
	pDC->SetBkMode(nMode);
	pDC->SetTextColor(clrOld);



                                    
发布了13 篇原创文章 · 获赞 0 · 访问量 3万+
展开阅读全文

没有更多推荐了,返回首页

©️2019 CSDN 皮肤主题: 大白 设计师: CSDN官方博客

分享到微信朋友圈

×

扫一扫,手机浏览