CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 11 of 11
  1. #1
    Join Date
    Aug 2012
    Posts
    21

    How to enter spaces in RichEditControl ?

    Hi All!

    How to enter spaces or empty characters in RichEditControl ?

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,430

    Re: How to enter spaces in RichEditControl ?

    The same way as any other character. Was is the problem?
    Victor Nijegorodov

  3. #3
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,430

    Re: How to enter spaces in RichEditControl ?

    The purpose of such an insertion is absolutely unclear. What for? Could you explain your main goal?
    Victor Nijegorodov

  4. #4
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,430

    Re: How to enter spaces in RichEditControl ?

    Quote Originally Posted by mr.sam1024 View Post
    i wanna to fill entire richedit controlwith empty characters or white spaces. So that i can put the text in any row and column.
    But it won't work either! (Well, with only one exception when using a monospaced font with some non-changeble size!)
    Victor Nijegorodov

  5. #5
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,430

    Re: How to enter spaces in RichEditControl ?

    Quote Originally Posted by mr.sam1024 View Post
    ... Then only i can put the text in any row and column (ofcourse richedit control may not have concept like row, column).
    Exactly! You cannot access something ("row and column" in your case) that does NOT exist!
    Maybe you need something like table?
    See
    http://www.codeproject.com/Articles/...-image-support
    Rich Edit Version 4.1
    Victor Nijegorodov

  6. #6
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,635

    Re: How to enter spaces in RichEditControl ?

    Your idea doesn't make much sense. richedits don't have columns and rows. If you change the font size or the window size, the position of your text will change. The wrapping is all done dynamically. Unless you specifically enter a NL, wrapping is done dynamically. That doesn't sound like an appropriate control. What are you trying to accomplish?

  7. #7
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,430

    Re: How to enter spaces in RichEditControl ?

    Quote Originally Posted by mr.sam1024 View Post
    .. and if you have any solution to my query please reply.
    "any solution" to your query??? Of course not!
    Because you haven't explained yet what your task is and what and why you are trying to accomplish!
    Victor Nijegorodov

  8. #8
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,430

    Re: How to enter spaces in RichEditControl ?

    Quote Originally Posted by mr.sam1024 View Post
    I'm trying to do if the cursor is in a certain location in RichEdit control, the cursor has to shift 5 rows up or 5 rows down (Horizontally). And the cursor has to shift 5 rows (vertically) forward or backward.
    But Why do you need it? What for?
    Victor Nijegorodov

  9. #9
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,635

    Re: How to enter spaces in RichEditControl ?

    Quote Originally Posted by mr.sam1024 View Post
    I'm trying to do if the cursor is in a certain location in RichEdit control, the cursor has to shift 5 rows up or 5 rows down (Horizontally). And the cursor has to shift 5 rows (vertically) forward or backward.
    Explain what you're trying to do without proposing a solution. Given that Rich Edit controls, don't really feature rows and columns, why is that your chosen control?

  10. #10
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,635

    Re: How to enter spaces in RichEditControl ?

    We're not asking specific question because we like to type. If you want help, you need to answer the questions that are being asked of you.

  11. #11
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,430

    Re: How to enter spaces in RichEditControl ?

    Quote Originally Posted by mr.sam1024 View Post
    But what does it have to do with the Windows programming? Window is NOT just a terminal (or its part)

    Quote Originally Posted by mr.sam1024 View Post
    I'm trying to implement "Cursor Control" in RichEditControl.
    Again: there is no any row/column in Richedit control. There is a client area and formatted rectangle instead.
    Yeah, if control contained some text then we could talk about the lines with text. We could also talk about a character position on the line (so called "column" number) but only makes sense on the current line! If we look at some other (existent) line then the "column" number for the position with the same x-coordinate may and may not be the same; it also may be not defined if the line contains no text or the text is shorter (in pixels, not in characters!)

    How can't you understand it?
    Victor Nijegorodov

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured