.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Again about supporting dark and light themes for custom CUI

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
mcicognani
818 Views, 2 Replies

Again about supporting dark and light themes for custom CUI

We faced this problem back with 2015 release, when was firstly released this sort of theming, even thought limited to just dark and light versions.

 

At that time, given a custom.cuix, then best practice for supporting two sets of icons was to build two resource dlls, one named custom.dll for dark icons and one named custom_light.dll for light theme.

Apart some little weird behavior the system worked, but only with bitmaps. At that time we (us and Autodesk) weren't able to find a workaround to use PNG inside the resource file, since PNG is not a supported type, and so we stuck with BMPs with the color 192,192,192 as transparent background.

 

Now, with 2017, BMPs with that special grey as background is not supported anymore, we must use PNGs.

 

The question here is almost automatic: how do we create resource dlls with PNG files, so that we can support the changing colortheme in our custom CUIx?

 

An old suggestion was to rename PNG into BMP to fool VisualStudio, but with VS2015 doesn't work, since during DLL compilation it checks the validity of the BMPs and return an error stating the BMPs must be of version 3.0. Obviously it wasn't able to understand the PNGs format.

 

So, anyone has solved this old problem and was able to support COLORTHEME change in a custom CUIx?

 

Is there an official 'best practice' released by Autodesk?

 

Thank you!

 

2 REPLIES 2
Message 2 of 3

Using CUIx resource dll with image transparency - AutoCAD DevBlog

 

Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | Do you find the posts helpful? "LIKE" these posts!
Находите сообщения полезными? Поставьте "НРАВИТСЯ" этим сообщениям!
На ваше запитання відповіли? Натисніть кнопку "ПРИЙНЯТИ РІШЕННЯ" | Have your question been answered successfully? Click "ACCEPT SOLUTION" button.
На ваш вопрос успешно ответили? Нажмите кнопку "УТВЕРДИТЬ РЕШЕНИЕ"


Alexander Rivilis / Александр Ривилис / Олександр Рівіліс
Programmer & Teacher & Helper / Программист - Учитель - Помощник / Програміст - вчитель - помічник
Facebook | Twitter | LinkedIn
Expert Elite Member

Message 3 of 3

Ah, I see, they use icon files instead of PNGs... I'll give it a try...

So thanks to Michael Csikos (the author) and to you Alex for pointing it out!

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

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost