Septimiu
March 29th, 1999, 06:26 AM
hello,
I tried to put a pattern on the background of a crichedit control.
OnInitDialog()
{
CBrush myBrush;
CBitmap m_Bmp;
m_Bmp.LoadBitmap(IDB_PAT);
myBrush.CreatePatternBrush(&m_Bmp);
...//set the text in richedit
}
CPaint()
{
CDC * pCDC;
CRect rect;
rect.SetRect(x,y,l,h);
pCDC->m_Rich.GetDC();
pCDC->FillRect(rect, &myBrush);
}
The problem is the pattern appears on the text, not under it.
Any suggestion is appreciated.
Septimiu
I tried to put a pattern on the background of a crichedit control.
OnInitDialog()
{
CBrush myBrush;
CBitmap m_Bmp;
m_Bmp.LoadBitmap(IDB_PAT);
myBrush.CreatePatternBrush(&m_Bmp);
...//set the text in richedit
}
CPaint()
{
CDC * pCDC;
CRect rect;
rect.SetRect(x,y,l,h);
pCDC->m_Rich.GetDC();
pCDC->FillRect(rect, &myBrush);
}
The problem is the pattern appears on the text, not under it.
Any suggestion is appreciated.
Septimiu