Thread: ASCII table going crazy?

  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,981
    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,981
    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

  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,829
    >>> 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.
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

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, 11: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, 01:47 PM