Like Tree1Likes

ASCII table going crazy?

This is a discussion on ASCII table going crazy? within the Windows Programming forums, part of the Platform Specific Boards category; the problem isnt having the characters show...its that after 127 they all get jumbled up....if anyone runs the program, itll ...

  1. #16
    Registered User
    Join Date
    Feb 2003
    Posts
    162
    the problem isnt having the characters show...its that after 127 they all get jumbled up....if anyone runs the program, itll have things such as accented characters (from other languages) as ascii characters 224 -> 255....its not a problem of displaying them, its that they get all out of order after that....

  2. #17
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,681
    they all get jumbled up...they get all out of order after that
    What are you talking about? Printable characters are between 0x20 and 0x7E, everthing else can be whatever the Font defines.

    Your program runs fine.

    gg

  3. #18
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,681
    If you want your characters to look just like the one's in the table, then use this code in your OnDraw()...
    Code:
        LOGFONT lf = {0};
        lf.lfCharSet = OEM_CHARSET;
        strcpy(lf.lfFaceName,"Terminal");
        CFont font;
        font.CreateFontIndirect(&lf);
        pDC->SelectObject(font);
    gg
    ronin likes this.

  4. #19
    Registered User
    Join Date
    Feb 2003
    Posts
    162
    ok thats exactly who i need it to be outputted!! thank you much !!....lastly, is there any way to make the font smaller? (or any other fonts that will work like this one?)

  5. #20
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,831
    >>> however, did u notice after 127 how things start to get crazy?

    No, I didn't, but if you're happy now, it's immaterial, (this is just the end, the rest of the table looked similar). Of course it has accented characters in it, that's what the font has in those positions!

    You can load different built in fonts with GetStockObject() or make your own with CreateFont(). I expect there are MFC versions of these, (I use the raw API). You'll be able to change the point size with these.
    Attached Images Attached Images  
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

Page 2 of 2 FirstFirst 12
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Writing array, to file
    By zootreeves in forum C Programming
    Replies: 9
    Last Post: 09-08-2007, 05:06 PM
  2. ASCII Table
    By peckitt99 in forum C Programming
    Replies: 21
    Last Post: 10-09-2006, 01:53 AM
  3. Replies: 11
    Last Post: 03-24-2006, 10:26 AM
  4. help! extended ascii table
    By godhand in forum Linux Programming
    Replies: 7
    Last Post: 10-07-2003, 05:20 PM
  5. Printing characters not in the ASCII table
    By Unregistered in forum C Programming
    Replies: 2
    Last Post: 01-21-2002, 12:47 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21