Menu

Word wrap in edit box

2006-04-01
2012-09-26
  • Nobody/Anonymous

    Hello,
    I want to do a word wrap in FileEditor (in examples of dev-c++). This can be done by cuting the WS_HSCROLL parametr. But can be this maked in real time, by clicking in the option "word wrap" in file menu?
    Sorry for my bad english ;)

     
    • Br5an

      Br5an - 2006-04-02
       
    • Nobody/Anonymous

      You can use SetWindowLong to change the styles of a Window.

       
    • Br5an

      Br5an - 2006-04-02

      When I read the question yesterday I thought it would be as easy as setting up and calling:

      case CM_WORDWRAP:
      //MessageBox (NULL, "WORD WRAP", "About...", MB_OK);
      SetWindowLong(editHwnd, GWL_STYLE, WS_CHILD | WS_VISIBLE | WS_VSCROLL | ES_MULTILINE | ES_WANTRETURN);
      break;
      // note WS_HSCROLL is left out, not a toggle, just trying to turn wordwrap off for the moment.

      It removed the hScroll bar (after redraw) but didn't seem to change the word wrap. I saw some other examples at:

      http://search.msdn.microsoft.com/search/results.aspx?view=msdn&qu=EDIT+wordwrap

      but I had been hoping my experiment above just had an easily repaired oversight...

      Regards,
      Brian

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.