atari
asked on
print preview doesn't work !!!
I have implemented a print preview in my mdi-application. When the print preview is called the following OnDraw-function will be executed:
void CMyView::OnDraw(CDC* pDC)
{
CString text=_T("This is a test");
pDC->SetTextColor(RGB(255, 0,0)); // or any other color
pDC->SetBkColor(::GetSysCo lor(COLOR_ WINDOW));
GetClientRect(rect);
pDC->DrawText(text,-1,rect ,DT_SINGLE LINE|DT_CE NTER|DT_VC ENTER);
}
There is now a problem:
In print preview the text color will not be displayed !!!
The text string will always painted in black !!!
How can I change the color to that I want to have in print preview ?
I can debug the above code and the text color is the one I wanted to have but the screen shows always a black text !!!
Any ideas about that ?
void CMyView::OnDraw(CDC* pDC)
{
CString text=_T("This is a test");
pDC->SetTextColor(RGB(255,
pDC->SetBkColor(::GetSysCo
GetClientRect(rect);
pDC->DrawText(text,-1,rect
}
There is now a problem:
In print preview the text color will not be displayed !!!
The text string will always painted in black !!!
How can I change the color to that I want to have in print preview ?
I can debug the above code and the text color is the one I wanted to have but the screen shows always a black text !!!
Any ideas about that ?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Cannot try it at once, so I will graduade you before.
Bye,
atari