Monday, 4 March 2013

To add the string


·  To add the string “Welcome to menus in the StringData object when the user clicks Print
Welcome, we add the following code in xxWelcomeView.cpp.
void xxWelcomeView::OnFilePrintwelcome()
{
xxWelcomeDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
pDoc->StringData = "Welcome to menus!";
//Invalidate calls the OnDraw()method to display the new string
Invalidate();
}

No comments:

Post a Comment