· Finally we add the code to the end of OnDraw() in xxWelcomeView.cpp to display
the text in StringData
void xxWelcomeView::OnDraw(CDC* pDC)
{
. // This represents existing code
.
CSize menuSize = pDC->GetTextExtent(pDoc->StringData);
xxx -= menuSize.cx/2;
yyy -= 20 ;
pDC->TextOut(xxx, yyy, pDoc->StringData);
}
· Build your code with the F7 function key. When it is free of errors, run
your code. What happens when you click on the Print Welcome menu item?
No comments:
Post a Comment