Ghost
Ghost

Reputation: 1835

How do you print text onto a view in an mfc application?

What function of the CDC class allows you to display a string onto the client area?

This doesn't work:

  void CpuzzleView::OnDraw(CDC* pDC)
 {
  CpuzzleDoc* pDoc = GetDocument();
  ASSERT_VALID(pDoc);
  if (!pDoc)
    return;

  pDC->Rectangle(50,50,100,100);
  pDC->MoveTo(75,75);
  std::cout << "3";

}

Upvotes: 0

Views: 1493

Answers (1)

Mark Ransom
Mark Ransom

Reputation: 308206

You can use CDC::TextOut or CDC::DrawTextEx.

Upvotes: 1

Related Questions