vs 2010报错error C2664: “BOOL CDC::TextOutW(int,int,const CString &)”: 不能将参数
voidCBPsbView::OnDraw(CDC*pDC){CBPsbDoc*pDoc=GetDocument();ASSERT_VALID(pDoc);/*if(!p...
void CBPsbView::OnDraw(CDC* pDC)
{
CBPsbDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
/* if (!pDoc)
return;
*/
// TODO: 在此处为本机数据添加绘制代码
CBrush Brush (RGB (80, 10, 10) );
CBrush* pOldBrush = pDC->SelectObject (&Brush);
CRect rcClip;
pDC->GetClipBox (&rcClip);
pDC-> PatBlt (rcClip.left , rcClip.top , rcClip.Width ( ) , rcClip.Height( ) , PATCOPY );
pDC->SelectObject (pOldBrush );
CBrush BrushBoard (RGB (255, 255 , 255) );
pOldBrush = pDC->SelectObject (&BrushBoard);
pDC-> PatBlt (10,10,200,200, PATCOPY );
pDC->SelectObject (pOldBrush );
pDC->SetTextColor(RGB(255,255,255));
pDC->SetTextAlign(TA_CENTER|TA_TOP);
pDC->SetBkMode(TRANSPARENT);
pDC->TextOut(310,175,"123");
//pDC->TextOut(310,200,"写慢一点");
} 展开
{
CBPsbDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
/* if (!pDoc)
return;
*/
// TODO: 在此处为本机数据添加绘制代码
CBrush Brush (RGB (80, 10, 10) );
CBrush* pOldBrush = pDC->SelectObject (&Brush);
CRect rcClip;
pDC->GetClipBox (&rcClip);
pDC-> PatBlt (rcClip.left , rcClip.top , rcClip.Width ( ) , rcClip.Height( ) , PATCOPY );
pDC->SelectObject (pOldBrush );
CBrush BrushBoard (RGB (255, 255 , 255) );
pOldBrush = pDC->SelectObject (&BrushBoard);
pDC-> PatBlt (10,10,200,200, PATCOPY );
pDC->SelectObject (pOldBrush );
pDC->SetTextColor(RGB(255,255,255));
pDC->SetTextAlign(TA_CENTER|TA_TOP);
pDC->SetBkMode(TRANSPARENT);
pDC->TextOut(310,175,"123");
//pDC->TextOut(310,200,"写慢一点");
} 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询