sabareesh 0 Newbie Poster
//  Edit window property
case WM_CREATE:

        hwndEdit = CreateWindow (TEXT ("edit"), NULL,

            WS_CHILD | WS_VISIBLE | WS_VSCROLL |
            ES_LEFT | ES_MULTILINE | ES_AUTOVSCROLL,

            0, 0, 0, 0,
            hwnd, (HMENU) EDITID,(HINSTANCE) GetWindowLong(hwnd, GWL_HINSTANCE), 
            NULL); 

word wrap calling

case ID_FORMAT_WORDWRAP:

            bFlag = !GetCheckedState(GetMenu(hwnd), ID_FORMAT_WORDWRAP, TRUE);

            if (bFlag)
            {
                SendMessage(hwndEdit, EM_SETWORDBREAKPROC, (WPARAM) 0, 
                    (LPARAM) (EDITWORDBREAKPROC) WordBreakProc); 

                SendMessage(hwndEdit, EM_FMTLINES, (WPARAM) TRUE, (LPARAM) 0); 

                SendMessage(hwndEdit, EM_SETSEL, 0, -1);  // select all text 

                SendMessage(hwndEdit, WM_CUT, 0, 0); 

                SendMessage(hwndEdit, WM_PASTE, 0, 0); 
                break; 

                /*SendDlgItemMessage(hwndEdit, ID_FORMAT_WORDWRAP, EM_SETWORDBREAKPROC, 0,
                           (LPARAM)(EDITWORDBREAKPROC) WordBreakProc) ;
                 break; */       
            }

Word Break function

int FAR PASCAL WordBreakProc(LPSTR lpszEditText, int nchCurrent,
                             int nchEditText, int nActionCode)
{
    char FAR *lpCurrentChar;
    int  nIndex;

    switch (nActionCode) 
    {
      case WB_LEFT:

          // Look for the beginning of a word to the left
          // of the current position.
          for ( lpCurrentChar = lpszEditText + nchCurrent,
              nIndex = nchCurrent; nIndex >= 0; nIndex--,
              lpCurrentChar = AnsiPrev(lpszEditText,
              lpCurrentChar) )

              if( *lpCurrentChar == '.' )
              {
                  return ++nIndex;
              }
              return 0;
              break;

      case WB_RIGHT:

          // Look for the beginning of a word to the right
          // of the current position.
          for ( lpCurrentChar = lpszEditText+nchCurrent,
              nIndex = nchCurrent; nIndex < nchEditText;
              nIndex++,

              lpCurrentChar = AnsiNext(lpCurrentChar) )

              if ( *lpCurrentChar == '.' ) 
              {
                  lpCurrentChar = AnsiNext(lpCurrentChar);
                  nIndex++;
                  while ( *lpCurrentChar == '.' )
                  {
                      lpCurrentChar = AnsiNext(lpCurrentChar);
                      nIndex++;
                  }
                  return nIndex;
              }
              return nchEditText;
              break;

      case WB_ISDELIMITER:

          // Is the character at the current position a delimiter?
          if ( lpszEditText[nchCurrent] == '.' )
          {
              return TRUE;
          }
          else
          {
              return FALSE;
          }
          break;
    }
    return FALSE;
}

this word wrap is not working ps help me?