Author Topic: Ascii chart  (Read 5264 times)

jimg

  • Member
  • ***
  • Posts: 339
Ascii chart
« on: May 28, 2017, 12:57:36 PM »
With the last update to windows 10, the graphic ascii chart I've used for years as a quick reference is all fuzzy.  Rather than try to fix the problem, I just made a quickie out of an old program to show an ascii chart in a toolwindow.   Released to the public domain for all uses public and private.
All menus are in the right-click context menu.  Maybe you can get some use out of it, even if it's only a laugh at my coding style :)


Fixed terminal font problem.  Other minor changes

2/8/19  Fixed bug when using thin-black border

5/25/19  Added ability show image.   I have often needed a way to show a frameless, resizable, topmost image, so I finally got around to adding the capability to the Ascii chart program.  This version now also contains the show code pages code.

p.s.  ** I've found it convenient to have the program in the context menu for the desktop.  Just click on the desktop and select the program.  One way to do this is to add the appropriate entries to the registry.   Create a file name something.reg, and add the following lines-
Code: [Select]
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\Background\shell\Ascii Chart]

[HKEY_CLASSES_ROOT\Directory\Background\shell\Ascii Chart\command]
@="F:\\Progs\\Ascii\\Ascii.exe"   ( substitute in your path here!)


and run the file.  Note you do this at your own risk, so don't screw it up!

5/26/19 added image types emf, wmf, and ico.  fixed upper case problem with drag and drop.  fixed help bug.

**Special note:  This code requires uasm.   Apologies.   
« Last Edit: May 27, 2019, 03:44:55 PM by jimg »

jj2007

  • Member
  • *****
  • Posts: 9744
  • Assembler is fun ;-)
    • MasmBasic
Re: Ascii chart
« Reply #1 on: May 28, 2017, 05:14:06 PM »
Works fine, and there is nothing wrong with your coding style :t

felipe

  • Member
  • *****
  • Posts: 1250
  • Eagles are just great!
Re: Ascii chart
« Reply #2 on: May 30, 2017, 03:36:54 AM »
I did like it, i think it's a good job. The style it's personal (at least when you work by your own and not in some team). Thanks for share.  :icon14: :icon14:
Felipe.

jimg

  • Member
  • ***
  • Posts: 339
Re: Ascii chart
« Reply #3 on: June 18, 2017, 06:32:50 AM »
Fixed terminal font auto switch to wrong font problem.
Removed superfluous push esi.
Fixed select fixed spacing font.
Other minor cleanup.

felipe

  • Member
  • *****
  • Posts: 1250
  • Eagles are just great!
Re: Ascii chart
« Reply #4 on: June 18, 2017, 08:15:11 AM »
Fixed terminal font auto switch to wrong font problem.
Removed superfluous push esi.
Fixed select fixed spacing font.
Other minor cleanup.

That's great,   :icon14:
are you going to upload it?
Felipe.

jimg

  • Member
  • ***
  • Posts: 339
Re: Ascii chart
« Reply #5 on: June 18, 2017, 09:45:57 AM »
I updated the one in the first post.

FORTRANS

  • Member
  • *****
  • Posts: 1056
Re: Ascii chart
« Reply #6 on: June 18, 2017, 10:22:07 PM »
Hi,

   Runs well with W2k and Win98.

Regards,

Steve N.

jj2007

  • Member
  • *****
  • Posts: 9744
  • Assembler is fun ;-)
    • MasmBasic
Re: Ascii chart
« Reply #7 on: June 18, 2017, 11:38:23 PM »
I updated the one in the first post.

Problem with the vertical scrollbar hiding the a-z column persists (Win7-64). Four pixels extra would be enough:

        inv CreateWindowEx, WS_EX_TOOLWINDOW or WS_EX_TOPMOST , soff("RichEdit20A"),soff("Ascii"),
                WS_POPUP or WS_SIZEBOX or \
                WS_VISIBLE or ES_MULTILINE or ES_NOHIDESEL or ES_WANTRETURN or\
                ES_SAVESEL or WS_CLIPSIBLINGS or ES_READONLY or\
                WS_HSCROLL or ES_AUTOHSCROLL or WS_VSCROLL or ES_AUTOVSCROLL,
                0,0, 335, 604, 0, 0, hWin, NULL

jimg

  • Member
  • ***
  • Posts: 339
Re: Ascii chart
« Reply #8 on: June 18, 2017, 11:49:17 PM »
Done.  Thanks :)

jimg

  • Member
  • ***
  • Posts: 339
Re: Ascii chart
« Reply #9 on: February 09, 2019, 05:41:57 PM »
Fixed very strange bug.  When border was set to thin-black, upon restarting program, Windows does weird things.  When CreateWindowEx creates a window with  the style and exstyle to get a thin-black border,  and then you move or resize the window it makes every other open app blink or redo their captions.    The solution was to create a borderless window first, and then apply the desired border afterward using SetWindowLong for style and exstyle.  This only seemed to affect the thin-black border, my favorite.

AW

  • Member
  • *****
  • Posts: 2388
  • Let's Make ASM Great Again!
Re: Ascii chart
« Reply #10 on: March 05, 2019, 08:41:08 AM »
Note that this is the ASCII chart for code page 1252 (Windows Latin 1 ).
Historically, most people use to take as reference the OEM code page 437 and other ASCII charts which will be different after character 127 should explicitly mention what code page they refer to.
An even better approach is always mention to what code page the ASCII chart refers to.

HSE

  • Member
  • *****
  • Posts: 1130
  • <AMD>< 7-32>
Re: Ascii chart
« Reply #11 on: March 05, 2019, 09:25:51 PM »
Note that this ...
More simple, I think. The program show code page setted in your machine. Just that  8)
« Last Edit: March 05, 2019, 11:37:39 PM by HSE »

AW

  • Member
  • *****
  • Posts: 2388
  • Let's Make ASM Great Again!
Re: Ascii chart
« Reply #12 on: March 05, 2019, 10:12:00 PM »
More simple, I thing. The program show code page setted in your machine. Just that  8)
On a console my machine shows 437. So, I have 2 code pages.  ;)

jj2007

  • Member
  • *****
  • Posts: 9744
  • Assembler is fun ;-)
    • MasmBasic
Re: Ascii chart
« Reply #13 on: March 05, 2019, 10:22:02 PM »
The program show code page setted in your machine. Just that  8)

There is more than one code page in your system. Check HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Nls\CodePage

HSE

  • Member
  • *****
  • Posts: 1130
  • <AMD>< 7-32>
Re: Ascii chart
« Reply #14 on: March 05, 2019, 11:12:47 PM »
On a console my machine shows 437. So, I have 2 code pages.  ;)
:t Indeed I was thinking in "console output code page" (apparently by default "input console code page" is the same), but Jimg chart is using "system code page". In any case, usually you only access one code page.

There is more than one code page in your system. Check HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Nls\CodePage
Yes JJ. They are "supported" code pages, not necessarily active code pages.