Compile png for toolbar buttons to dll?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I realized a few users liked the "dark" theme so wanted to make my toolbar button backgrounds transparent instead of 192,192,192.
I first saved the images to png using (free) image magick using "convert *.bmp *.png" (or similar I forget, its trivial if you look at the help).
I then replaced the grey with transparency also with image magick and this batch code (not trivial):
"C:\Program Files\ImageMagick-7.0.5-Q8\magick.exe" mogrify -fuzz 3% -transparent "rgb(192,192,192)" "C:\CAD_Support\Menu Bitmap Dlls 2015+\HATools\*.png"
So, now I have happy png's with transparent backgrounds.
I use .mnu and a typical toolbar button looks like this:
[_Button("HATCHOFF", 03_HATOFF, 03_HATOFF)]-LAYER;OFF;*HATCH*;;
I tested and found if I add .png like this:
[_Button("HATCHOFF", 03_HATOFF.png, 03_HATOFF.png)]-LAYER;OFF;*HATCH*;;
and put the png's in the menu folder, it works. The pngs get included in the cuix when it loads the mnu.
I prefer imaged compiled to dll though, as its separate from the .cuix so easier to manage since I support multiple versions of acad (down to 2015).
What I want to do is compile the png's to dll, and I use rc.exe to make the .res file in VS, but its not working with .png.
It says they are not "version 3.0..." which I read is saying they are not types valid for resource file.
Is dll not an optionif you want png's?
Also, I tried hand "packing" the png's into a cuix, instead of having them in same folder as .mnu.
It did not work. Maybe I forgot something but I loaded the .mnu without images, got all ?'s, then added the png's later. Its like if they are not there when the cuix compiles from .mnu, it will not "find" them in the cuix later. Does that sound right?
thanks
internal protected virtual unsafe Human() : mostlyHarmless
I'm just here for the Shelties