Dev-tools

When i code, I sometimes need a tool. Just something to get things done. Then I just trow together a tool myself so it is to my liking. Takes a bit time, but this is my hobby, so I don't mind. These apps are portable. I have included the code as well as the .exe file in the zip-file. There is no license on them, so public domain!

 

 

IconViewer

This one shows the icon included in Windows' dlls and their index number. Click on it and it copies the icon dll and number to the clipboard. These are icons I use in my apps because they are always there and handy to use

 

Code to add (C++)

wchar_t shell32[MAX_PATH];
GetSystemDirectoryW(shell32, MAX_PATH);
wcscat_s(shell32, L"\\shell32.dll");

HICON hLarge, hSmall;
ExtractIconExW(shell32, 70, &hLarge, &hSmall, 1); // 70 = any index you want

SendMessageW(hwnd, WM_SETICON, ICON_BIG, (LPARAM)hLarge);
SendMessageW(hwnd, WM_SETICON, ICON_SMALL, (LPARAM)hSmall);

Code to clean up on VM_DESTROY:

DestroyIcon(hLarge);
DestroyIcon(hSmall);

The other dlls are almost the same:

// imageres.dll (modern Windows icons)
GetSystemDirectoryW(path, MAX_PATH);
wcscat_s(path, L"\\imageres.dll");
ExtractIconExW(path, 15, &hLarge, &hSmall, 1); // 15 = folder

// user32.dll (very basic: error/warning/info etc.)
GetSystemDirectoryW(path, MAX_PATH);
wcscat_s(path, L"\\user32.dll");
ExtractIconExW(path, 1, &hLarge, &hSmall, 1);

Download here!

 

System Restore Point handler

I am working on a project where the user can alter Registry, so I added a button so the user can add a System Restore Pioint, so any errors could be undone. To test that, i needed a quick and dirty handler for that. 

 

 

Download here!

Note: Windows Defender do not like it, so before running it first time, make an exeption for it in Windows defender:


How to Make Windows Defender Ignore a File It Would Quarantine
If Windows Defender is quarantining a file that you trust and want to keep, you can add that file to the exclusion list so Defender will ignore it in the future. Follow these steps:

Open Windows Security:
Click on the Start menu and type Windows Security, then open the app.


Go to Virus & Threat Protection:
In Windows Security, select Virus & threat protection from the menu.


Manage Settings:
Under the Virus & threat protection settings section, click on Manage settings.


Add Exclusions:
Scroll down to the Exclusions section and click on Add or remove exclusions.
Add the File to Exclusions:
Click Add an exclusion and choose File.
Browse to the file you want Defender to ignore and select it.

Confirm:
The file will now be excluded from future scans and will not be quarantined.

Additional Notes:
If the file has already been quarantined, you may need to restore it first from the Quarantine section in Windows Security before adding it to exclusions.

 

NSBEdit

Windows 11 has no WordPad so to handle rtf, I had to use LibreOffice. I needed a rtf editor in a project I am working in, so I made a .h and a.cpp and an API -file for myself, so I could reuse the code for my rtf editor in other projects. Then it struck me. I could add a menu and som file handling and also a print routine, and then I had a standalone editor for rtf. So I did that. It is raw - I have not bothered making it look nice, but it do work fine. It do not support print preview in the printer dialog (NSB arew my initials). 

NSBEdit's homepage!



SvgView

I use AI to generate .svg files for me that I use for icons.

However I needed a good .svg viewer, that did a bit more.

So i made this one that can do the following:

  • View high resolution .svg
  • Zoom in and out.
  • Auto reload when file changes on disk
  • Convert to many image formats
  • Changee between white/none/chequer background
  • Zoom to fit window
  • Zoom to 1:1 - correct size.

Now this is a tool I needed, not a project as such. Just unzip and run from the folder. In the README.txt you will find a simple user guide.

 

Download here!