0

I'm surprised that i haven't found much online concerning the display of ellipsis in a CEdit control in MFC. We have a control that can show only about 20 characters but the max length of the string that goes into the control is 32 characters. I am interested in showing a middle or end ellipsis if the string length goes beyond the visible length. Has anyone tried this? Something that concerns me is whether the string pulled out of that control using GetWindowText will return the actual string or the string with the displayed ellipsis?

Jason
  • 1,882
  • 6
  • 26
  • 37

1 Answers1

1

CEdit displays the window text. If you want to change the display, change the text.

You can change the window text to something more readable when the edit loses focus, and restore the original text when the window gain focus again. Also adjust your GetWindowText calls to read from a variable instead of a window.

Sheng Jiang 蒋晟
  • 14,859
  • 2
  • 26
  • 44