Hi,
1. Is it possible to use .ico or .png bitmaps in resource dll for toolbar and ribbons and in that case under what resource type should they be added.
I have tried under ICO and PNG but they are not recognized by AutoCAD.
2. When I use .bmp in the resource dll it works for the ribbons but not for the toolbar, they show a '?'. Are there any known problems with this?
I have added both 16x16 and 32x32 images.
3. How do I get the transparency of a .bmp to work for the ribbon?
If I add the .ico files to the cuix file (and add .ico to the bitmap names in the commands) it works so the cui files are correct.
Regards
Christian
Solved! Go to Solution.
Solved by CWernung. Go to Solution.
1. I don't think you can use anything but .bmp for AutoCAD icons in the resource file, but I have honestly not tried it.
2. Not sure... I gave up on tool bars looooong ago as one day I guarantee they will dissapear! 🙂
3. Use color 192,192,192 as your background for both the dark and light themes to get transparency to work.
Hi,
By examining the resource DLLs distributed with AutoCAD 2015 I have found how to use .ico files in the resource DLLs .
The following line should be used in the .rc file:
RCDATA_IMAGENAME RCDATA "Path\\to\\iconfile.ico"
Then you just use RCDATA_IMAGENAME in the MenuGoup.cui file as image name.
The important thing here seems to be the RCDATA_ in the beginning of the name which inform AutoCAD on in which resource section the image is found.
This works perfectly for me so now I can have two resource DLLs for light/dark theme using .ico files.
Thank you for your help!
Christian
Hi Christian,
Not that I am aware of. The documentation makes no mention of it.
http://help.autodesk.com/view/ACD/2015/ENU/?guid=GUID-9AA3EEC1-031C-4E88-A966-4CBC07AD112C
I think the issue is that there is no way to tell the command which image inside of the CUIx file to use. You can certainly add both the light and dark images to the CUIx, but not sure how you would go about telling each command which image to use when wanting it to switch between two different themes. This is unfortuante becasue using/building resouce files is a major pain!