Set same Pixel size for each character
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 14 of 14

Thread: Set same Pixel size for each character

  1. #1
    Join Date
    Aug 2012
    Posts
    21

    How to set same pixel size for each character ?

    Hi! All,


    Does anybody know how to set same pixel size for each character ?

    Please do the needful..

    Thanks in advance..


    Regards
    Sam
    Last edited by mr.sam1024; August 23rd, 2012 at 02:02 AM.

  2. #2
    Join Date
    Sep 2004
    Location
    Holland (land of the dope)
    Posts
    4,123

    Re: How to set same pixel size for each character ?

    What are you talking about ? What character ?

  3. #3
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Wallisellen (ZH), Switzerland
    Posts
    17,470

    Re: How to set same pixel size for each character ?

    Quote Originally Posted by mr.sam1024 View Post
    Does anybody know how to set same pixel size for each character ?
    As usual, your question is NOT clear.
    However, if you still continue to struggle with your Richedit control then I'd recommend you to look at the Monospaced font
    IOW you need to choose some of available monospaced fonts (like courier or some others)
    Victor Nijegorodov

  4. #4
    Join Date
    Aug 2012
    Posts
    21

    Re: How to set same pixel size for each character ?

    Yes, Monospaced font have fixed-wdith, but other fonts like "Terminal" "MS Gothic" "Times New Roman" Each character (A - Z , a -Z , 0 - 9) have occupy different size (in pixels). So that can we do it programmetically to set same size for each character ?

  5. #5
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Wallisellen (ZH), Switzerland
    Posts
    17,470

    Re: How to set same pixel size for each character ?

    Quote Originally Posted by mr.sam1024 View Post
    Yes, Monospaced font have fixed-wdith, but other fonts like "Terminal" "MS Gothic" "Times New Roman" Each character (A - Z , a -Z , 0 - 9) have occupy different size (in pixels). So that can we do it programmetically to set same size for each character ?
    No, we cannot! Period.
    Or you would have to implement your own window class where you'd make all drawing with your own fonts (but again, these "your own fonts" will have nothing to do with the standard ones)
    Victor Nijegorodov

  6. #6
    Join Date
    Nov 2000
    Location
    Voronezh, Russia
    Posts
    6,022

    Re: How to set same pixel size for each character ?

    Quote Originally Posted by mr.sam1024 View Post
    Yes, Monospaced font have fixed-wdith, but other fonts like "Terminal" "MS Gothic" "Times New Roman" Each character (A - Z , a -Z , 0 - 9) have occupy different size (in pixels). So that can we do it programmetically to set same size for each character ?
    To do that you set some mono space font for your window.
    Best regards,
    Igor

  7. #7
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Posts
    12,121

    Re: How to set same pixel size for each character ?

    Quote Originally Posted by mr.sam1024 View Post
    Yes, Monospaced font have fixed-wdith, but other fonts like "Terminal" "MS Gothic" "Times New Roman" Each character (A - Z , a -Z , 0 - 9) have occupy different size (in pixels). So that can we do it programmetically to set same size for each character ?
    You can't. But as you've been told, you're headed in the wrong direction. I'd still like to know why you're insisting on a RichEdit Control. There are other, much more appropriate ways to do what you're trying to do.

  8. #8
    Join Date
    Aug 2012
    Posts
    21

    Re: Set same Pixel size for each character

    GCDEF,
    can you tell me what are the other appropriate ways to do ?

    I'm implementing terminal (lly like Hyper Terminal) So that i choosen RichEdit Control and Need to implement VT-100 Emulation type to support ANSI escape sequences. I'd discussed about this in other thread.

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

    Re: Set same Pixel size for each character

    I'd be looking at CWnd or perhaps CView.

  10. #10
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Wallisellen (ZH), Switzerland
    Posts
    17,470

    Re: Set same Pixel size for each character

    Quote Originally Posted by mr.sam1024 View Post
    ... and Need to implement VT-100 Emulation type to support ANSI escape sequences. I'd discussed about this in other thread.
    No, you did not.
    Instead you only asked some meaningless questions about rows/columns in the empty rich edit control!
    Note also that "Hyper Terminal" window is not a rich edit control nor does it support any row/column concept.
    Victor Nijegorodov

  11. #11
    Join Date
    Aug 2012
    Posts
    21

    Re: Set same Pixel size for each character

    How Hyper Terminal is implemented ? which control is used ? or is it a CView ?

  12. #12
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Wallisellen (ZH), Switzerland
    Posts
    17,470

    Re: Set same Pixel size for each character

    Quote Originally Posted by mr.sam1024 View Post
    How Hyper Terminal is implemented ?
    Well, I guess only Hyper Terminal developers could answer this question
    Quote Originally Posted by mr.sam1024 View Post
    which control is used ? or is it a CView ?
    No, it is NOT a CView. You could find it out using Spy++.
    Victor Nijegorodov

  13. #13
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Posts
    12,121

    Re: Set same Pixel size for each character

    Quote Originally Posted by mr.sam1024 View Post
    How Hyper Terminal is implemented ? which control is used ? or is it a CView ?
    I doubt it's a control at all. Quite possibly not even MFC.

  14. #14
    Join Date
    Aug 2012
    Posts
    21

    Re: Set same Pixel size for each character

    If i check in Spy++. It is showing the class of the window: TermClass.

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
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center