0

I have a class that implements OnDraw to draw text and images to a CView. At certain times (ie onClick) I would like this text to be editable in place. What would be the best way to implement this?

  • Have the class have a CEdit object that I hide and show and draw over the top of my text.
  • Handle key presses in the class and implement my own editing
  • Have something external to the class control whether to show the edit box or my class
  • Something else?
DanDan
  • 10,462
  • 8
  • 53
  • 69

1 Answers1

2

Go with your first idea, create a CEdit box when you need some text editing. If you look at how a ListCtrl handles rename functionality it does exactly that.

snowdude
  • 3,854
  • 1
  • 18
  • 27