Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

resource dll problems

6 REPLIES 6
SOLVED
Reply
Message 1 of 7
CWernung
1549 Views, 6 Replies

resource dll problems

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

Tags (1)
6 REPLIES 6
Message 2 of 7
Rob
Contributor
in reply to: CWernung

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.

Message 3 of 7
CWernung
in reply to: Rob

Thanks Rob,

I have an additional question; Is it possible to handle dark/light themes using only a cuix file with the bitmap files inside it?
Message 4 of 7
pendean
in reply to: CWernung

Elaborate?
Message 5 of 7
CWernung
in reply to: CWernung

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

 

Message 6 of 7
Rob
Contributor
in reply to: pendean

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!

Message 7 of 7
Rob
Contributor
in reply to: CWernung

Glad you found a solution Christian!

 

I may have to look into this as another option to using bitmap images.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

”Boost