[摘要]DT_NOPREFIX); // Do not call CWnd::OnPaint() for painting messages void CShadowWnd::ShowReadOnlyTe...
DT_NOPREFIX);
// Do not call CWnd::OnPaint() for painting messages
}
void CShadowWnd::ShowReadOnlyText(CString sText)
{
m_sShowText=sText; //存入显示字符串
CDC dc;
dc.CreateDC("DISPLAY",NULL,NULL,NULL); //创建一个显示设备描述表
dc.SelectObject(GetStockObject(SYSTEM_FONT)); //选择字体到设备描述表
CRect rect(0,0,MAXWIDTH,0);
//获得待显示的字符串 sText 的实际高度和宽度
dc.DrawText(sText,rect,DT_WORDBREAK
关键词:完成带阴影弹出的窗口