Setting Background Color of a CRichEdit
-
Hi, After I create and populate the my Rich Edit there is light blue Back ground when I hit enter it goes away I was hoping the Following code snipet would solove the problem it hasn't the rich edit is completely coverd up
CDC *richdc = Myrich->GetDC();
COLORREF prevcolor, currcolor;
currcolor = RGB(255,255,255);
prevcolor = richdc->SetBkColor(currcolor); -
Hi, After I create and populate the my Rich Edit there is light blue Back ground when I hit enter it goes away I was hoping the Following code snipet would solove the problem it hasn't the rich edit is completely coverd up
CDC *richdc = Myrich->GetDC();
COLORREF prevcolor, currcolor;
currcolor = RGB(255,255,255);
prevcolor = richdc->SetBkColor(currcolor); -
Don't paint controls in random places, it will never have the results you want. You should only do it in response to
WM_PAINT
messages, which are usually handled in theOnDraw
orOnPaint
method.Hi, I don't have a message map for my rich edit so this the code for OnPaint for the Parent Dialog After I streamin my data the data is displayed with a thin blue background this backgrounds surrounds just this text so I when I streamin 2 lines there is blue background white line following it. next line of text surrounded by the blue background I am trying to get rid of blue background when I inserted the OnPaint the entire rich edit is covered up
afx_msg void Show_storage::OnPaint()
{
CPaintDC richdc(Myrich);
richdc.SetBkColor(RGB(255,255,255));}
-
Hi, I don't have a message map for my rich edit so this the code for OnPaint for the Parent Dialog After I streamin my data the data is displayed with a thin blue background this backgrounds surrounds just this text so I when I streamin 2 lines there is blue background white line following it. next line of text surrounded by the blue background I am trying to get rid of blue background when I inserted the OnPaint the entire rich edit is covered up
afx_msg void Show_storage::OnPaint()
{
CPaintDC richdc(Myrich);
richdc.SetBkColor(RGB(255,255,255));}