AndrewWPhillips / HexEdit

Binary file editor for Windows
MIT License
173 stars 62 forks source link

HexEdit 5 does not take system text scaling into account #5

Open d0vgan opened 8 years ago

d0vgan commented 8 years ago

HexEdit 5 build 1349, under Windows 8.1 64-bit. I have a laptop with a crazy display resolution of 2560x1440. This seems to be common for new laptop displays and probably for new monitors.. It's clear that such display resolution gives very small GUI items, so the only way to work with it is to set the "size of all items" under the Control Panel -> Display to the value of "Larger - 150%" or "Extra Large - 200%". This makes most of the things, including different windows, icons and texts in these windows to be acceptable in size. But HexEdit 5 seems to use its own drawing technique of its hex editing window (where the file content is viewed and edited) that does not take this system's "size of all items" into account. So this editing window looks very small for me. Can this be fixed by applying the system's scaling to HexEdit's editing window?

d0vgan commented 8 years ago

Here is how it looks for me: HexEdit screenshot

AndrewWPhillips commented 8 years ago

All you need to do is increase the display font size. There are several ways:

The font (including size) is remembered for every file you open but for new files you can change the default. To do this you can use the "Save Current as Default" in Doc/General options page. In detail:

  1. Open any file in HexEdit
  2. Open the Options dialog
  3. Go to Document/General page
  4. Click "Use default settings"
  5. Go to Document/Display page
  6. Click the font button (eg "Normal Font")
  7. Select a new size from the list or enter a value in the Size box (eg 32)
  8. Click OK
  9. Go back to Document/General page
  10. Click save current as default

Alternately after step 4

  1. Click OK to go back to file edit mode
  2. Adjust the font size as above (and any other display settings)
  3. Open Options dialog
  4. Click save current as default
  5. Click OK

Note that there were a few display problems for non-std DPI (ie not 100%). However, I have been running my work laptop at 125% for a few months and only noticed one (that I fixed about 2 months ago). But if you notice anything please tell me.

d0vgan commented 8 years ago

Thank you, it is fixed for me now.

dconnet commented 7 years ago

I'm running at 250% (4K monitor) - the about box third party list is ... messy. Windows assumes a program is dpi-aware if it has no manifest. If I force hexedit.exe to be not-aware, then everything draws properly.

By setting the registry entry: [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\SideBySide] "PreferExternalManifest"=dword:00000001

and then creating a "hexedit.exe.manifest": ` <?xml version='1.0' encoding='UTF-8' standalone='yes'?>

false

`

AndrewWPhillips commented 7 years ago

HexEdit.exe should have a manifest file - it's embedded in the .EXE as a resource. I have fixed a few DPI problems that I noticed when running at 125% but 250% obviously makes things more noticeable. The 3rd party list in the About box is from a 3rd party (CodeProject project), but I have the source and will look into it.

Thanks for reproting that.

dconnet commented 7 years ago

Whoops - you're right - darn semicolons on the mt cmd! So my previous fix for anyone watching is:

Alternatively, open the exe as a resource in Visual Studio and directly manipulate the manifest.