Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Getting a specific version of rich edit

Getting a specific version of rich edit

Scheduled Pinned Locked Moved C / C++ / MFC
announcement
3 Posts 2 Posters 3 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    ForNow
    wrote on last edited by
    #1

    It seem like I remember that rich edit used to line break on CR/LF 0x0d + 0X0D now it seems either 0x0a 0x0c (form feed) of 0x0d (carriage return causes) causes a line break Is there a way to look for a specific version of rich edit I means the class names for 1.0 thru 3.0 the doc says use RICHEDIT_CLASS which loads Riched20.dll more so I remember that rich edit would only line break on CR AND LF not sure which version as I would like to use that version

    L 1 Reply Last reply
    0
    • F ForNow

      It seem like I remember that rich edit used to line break on CR/LF 0x0d + 0X0D now it seems either 0x0a 0x0c (form feed) of 0x0d (carriage return causes) causes a line break Is there a way to look for a specific version of rich edit I means the class names for 1.0 thru 3.0 the doc says use RICHEDIT_CLASS which loads Riched20.dll more so I remember that rich edit would only line break on CR AND LF not sure which version as I would like to use that version

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Hi, You can override both the word and line breaking behaviors. Have a look at using the EM_SETWORDBREAKPROC message[^] to set the EDITWORDBREAKPROCA function[^]. Best Wishes, -David Delaune

      F 1 Reply Last reply
      0
      • L Lost User

        Hi, You can override both the word and line breaking behaviors. Have a look at using the EM_SETWORDBREAKPROC message[^] to set the EDITWORDBREAKPROCA function[^]. Best Wishes, -David Delaune

        F Offline
        F Offline
        ForNow
        wrote on last edited by
        #3

        Hi here is my wordbreak function

        int CALLBACK EditWordBreakProc(LPTSTR lpszEditText, int ichCurrent, int cchEditText, int code)
        {
        char FAR* lpCurrentChar;
        int nIndex;
        int nLastAction;

        switch (code)
        {
        
        case WB\_ISDELIMITER:
        
        	
        
        	if (lpszEditText\[ichCurrent\] == 0x0a0d)
        		return TRUE;
        	else
        		return FALSE;
        
        	break;
        }
        

        }

        Here is where I invoke it

        fptrx = &EditWordBreakProc;
        storagepointer->SendMessage(EM\_SETWORDBREAKPROC, 0,(LPARAM) fptrx);
        

        long numstream = storagepointer->StreamIn(SF_TEXT,STORAGESTREAM);

        variable definition

        funcptrx fptrx;

        int CALLBACK EditWordBreakProc(LPTSTR lpszEditText, int ichCurrent, int cchEditText, int code);

        typedef int (CALLBACK *funcptrx) (LPTSTR, int, int, int);

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups