Skip to content


C/C++ RichEdit turn off line wrap

When you create a RichEdit (with CreateWindow for example), the default behavior includes line wrap. But there doesnt seem to be an option to turn that off.

The solution is random as well:

  • Turn off Line wrap: SendMessage(childWin, EM_SETTARGETDEVICE, NULL, 1);
  • Turn on Line wrap:┬áSendMessage(childWin, EM_SETTARGETDEVICE, NULL, 0);

Posted in C/C++. Tagged with , , .